Hudson 2.0.1 and Maven 2.2.1 and cannot find symbol error
On doing a bit of research I found this Old Post with开发者_StackOverflow社区 a link to the Hudson issue tracker site with some information on an almost identical issue which claim to be fixed for the current versions of Hudson 2.0.1 and Maven 2.2.1 that I'm using.
It would seem that when I try to run my tests on Hudson I get a "cannot find symbol error" no it runs fine in eclipse which leads me to think it maybe related to Hudson and Maven, but I'm not sure.
Here is my stack trace with the parts that I believe (after reading the previous post) are relevant or somehow related
[WARNING]
************ WARNING ************
This Maven runtime contains a LifecycleExecutor component with an incomplete configuration.
LifecycleExecutor class: org.apache.maven.lifecycle.LifecycleExecutorInterceptor
Missing component requirement: org.apache.maven.project.MavenProjectBuilder
NOTE: This seems to be a third-party Maven derivative you are using. If so, please
notify the developers for this derivative project of the problem. The Apache Maven team is not
responsible for maintaining the integrity of third-party component overrides.
[WARNING]
************ WARNING ************
This Maven runtime contains a LifecycleExecutor component with an incomplete configuration.
LifecycleExecutor class: org.apache.maven.lifecycle.LifecycleExecutorInterceptor
Missing component requirement: org.apache.maven.project.interpolation.ModelInterpolator
NOTE: This seems to be a third-party Maven derivative you are using. If so, please
notify the developers for this derivative project of the problem. The Apache Maven team is not
responsible for maintaining the integrity of third-party component overrides.
[WARNING]
************ WARNING ************
This Maven runtime contains a LifecycleExecutor component with an incomplete configuration.
LifecycleExecutor class: org.apache.maven.lifecycle.LifecycleExecutorInterceptor
Missing component requirement: org.apache.maven.ConfigurationInterpolator
NOTE: This seems to be a third-party Maven derivative you are using. If so, please
notify the developers for this derivative project of the problem. The Apache Maven team is not
responsible for maintaining the integrity of third-party component overrides.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Lonely Planet Code Test
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting file set: /var/lib/hudson/jobs/Lonely Planet Coding Tests/workspace/trunk/com.lonelyplanet.codetest.wkallan/target (included: [**], excluded: [])
[INFO] [resources:resources {execution: default-resources}]
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 1 source file to /var/lib/hudson/jobs/Lonely Planet Coding Tests/workspace/trunk/com.lonelyplanet.codetest.wkallan/target/classes
[HUDSON] Archiving /var/lib/hudson/jobs/Lonely Planet Coding Tests/workspace/trunk/com.lonelyplanet.codetest.wkallan/pom.xml to /var/lib/hudson/jobs/Lonely Planet Coding Tests/modules/com.lonelyplanet.codetest.wkallan$com.lonelyplanet.codetest.wkallan/builds/2011-06-30_13-40-15/archive/com.lonelyplanet.codetest.wkallan/com.lonelyplanet.codetest.wkallan/0.0.1-SNAPSHOT/pom.xml
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
/var/lib/hudson/jobs/Lonely Planet Coding Tests/workspace/trunk/com.lonelyplanet.codetest.wkallan/src/main/java/com/lonelyplanet/codetest/wkallan/ContentGenerator.java:[30,15] cannot find symbol
symbol : method format(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
location: class java.lang.String
Seriously, I support Daniel's suggestion. Move to Jenkins. Pretty much all of the Hudson developers have moved to Jenkins and are not supporting or developing Hudson under it's old name, since the split from Oracle. I have migrated our Hudson to Jenkins. The migration is usually seamless. The upside on using Jenkins is that they make weekly (iteration-based) releases and they tend to fix a lot more things than Oracle does.
I'm not trying to start up a flame war here and this is just my personal opinion. Just suggesting. :-)
Could your Hudson server be running with an ancient jdk 1.4? The format
method in java.lang.String
was added in Java 5. You should also check if the maven compiler plugin is configured for source 1.5 in the pom. The default in Maven 2 was 1.4 or even 1.3.
精彩评论