Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Hudson execute maven plugin failed
icon9.gif  Hudson execute maven plugin failed [message #1734369] Tue, 07 June 2016 14:30 Go to next message
jianrui ding is currently offline jianrui dingFriend
Messages: 1
Registered: June 2016
Junior Member
Hi All, i got one problem which confused me a couple of days. I installed the Hudson and Maven 3 on an Ubuntu server. I actually didn't meet any issue if i run the command on the Shell like this
mvn clean package cf:push 
, but if i configure the same goal on the Hudson, actually the job will be failed, and the error information i got are below:
[ERROR] Failed to execute goal org.cloudfoundry:cf-maven-plugin:1.1.2:push (default-cli) on project gs-messaging-redis: Execution default-cli of goal org.cloudfoundry:cf-maven-plugin:1.1.2:push failed: An API incompatibility was encountered while executing org.cloudfoundry:cf-maven-plugin:1.1.2:push: java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V

I looked into the log which is generated by the Hudson job, i found something interesting as below:
 [workspace] $ /usr/share/maven/bin/mvn clean package cf:push -X -V -B -Dmaven.ext.class.path=/home/dingjianrui/hudson/maven/slavebundle/resources:/home/dingjianrui/hudson/maven/slavebundle/lib/maven3-eventspy-3.1.jar:/opt/tomcat/apache-tomcat-8.0.33/webapps/hudson/WEB-INF/lib/hudson-remoting-3.0.3.jar -Dhudson.eventspy.port=42006 -f pom.xml
[DEBUG] Waiting for connection on port: 42006
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_91, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "4.4.0-22-generic", arch: "amd64", family: "unix"
[DEBUG]   Included /home/dingjianrui/hudson/maven/slavebundle/resources
[DEBUG]   Included /home/dingjianrui/hudson/maven/slavebundle/lib/maven3-eventspy-3.1.jar
[DEBUG]   Included /opt/tomcat/apache-tomcat-8.0.33/webapps/hudson/WEB-INF/lib/hudson-remoting-3.0.3.jar
[DEBUG] Populating class realm maven.ext
[DEBUG]   Included /home/dingjianrui/hudson/maven/slavebundle/resources
[DEBUG]   Included /home/dingjianrui/hudson/maven/slavebundle/lib/maven3-eventspy-3.1.jar
[DEBUG]   Included /opt/tomcat/apache-tomcat-8.0.33/webapps/hudson/WEB-INF/lib/hudson-remoting-3.0.3.jar
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/dingjianrui/hudson/maven/slavebundle/lib/maven3-eventspy-runtime.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/share/maven/lib/slf4j-simple.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See for an explanation.

The Hudson job add some additional parameters to the command mvn clean package cf:push which cause the job dynamically import some other libraries, but i cannot find a way to remove them, and there must be some kind of conflicts between the libraries imported dynamically and the Libs used by my plugin. But i really don't know how to figure that out. the solution might be excluding the slf4j-simple.jar from the runtime, but how to get this done?
How to know the particular jar that was used by my plugin org.cloudfoundry:cf-maven-plugin:1.1.2? according to the log below and the dependency tree, i think the plugin load the proper dependencies:
[DEBUG] Created new class realm plugin>org.cloudfoundry:cf-maven-plugin:1.1.2
[DEBUG] Importing foreign packages into class realm plugin>org.cloudfoundry:cf-maven-plugin:1.1.2
[DEBUG]   Imported:  < maven.api
[DEBUG] Populating class realm plugin>org.cloudfoundry:cf-maven-plugin:1.1.2
[DEBUG]   Included: org.cloudfoundry:cf-maven-plugin:jar:1.1.2
[DEBUG]   Included: org.cloudfoundry:cloudfoundry-client-lib:jar:1.1.2
[DEBUG]   Included: org.springframework:spring-webmvc:jar:4.0.5.RELEASE
[DEBUG]   Included: org.springframework:spring-beans:jar:4.0.5.RELEASE
[DEBUG]   Included: org.springframework:spring-context:jar:4.0.5.RELEASE
[DEBUG]   Included: org.springframework:spring-aop:jar:4.0.5.RELEASE
[DEBUG]   Included: org.springframework:spring-core:jar:4.0.5.RELEASE
[DEBUG]   Included: org.springframework:spring-expression:jar:4.0.5.RELEASE
[DEBUG]   Included: org.springframework:spring-web:jar:4.0.5.RELEASE
[DEBUG]   Included:
[DEBUG]   Included:
[DEBUG]   Included: aopalliance:aopalliance:jar:1.0
[DEBUG]   Included:
[DEBUG]   Included:
[DEBUG]   Included: commons-codec:commons-codec:jar:1.6
[DEBUG]   Included: org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13
[DEBUG]   Included: org.codehaus.jackson:jackson-core-asl:jar:1.9.13
[DEBUG]   Included: org.apache.httpcomponents:httpclient:jar:4.3.6
[DEBUG]   Included: org.apache.httpcomponents:httpcore:jar:4.3.3
[DEBUG]   Included: commons-logging:commons-logging:jar:1.1.3
[DEBUG]   Included: commons-io:commons-io:jar:2.1
[DEBUG]   Included: com.esotericsoftware.yamlbeans:yamlbeans:jar:1.06
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-core:jar:2.3.3
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-databind:jar:2.3.3
[DEBUG]   Included: com.fasterxml.jackson.core:jackson-annotations:jar:2.3.0
[DEBUG]   Included: org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.0.15
[DEBUG]   Included: org.apache.tomcat.embed:tomcat-embed-core:jar:8.0.15
[DEBUG]   Included: org.apache.tomcat:tomcat-juli:jar:8.0.15
[DEBUG]   Included:
[DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:3.0
[DEBUG]   Included: org.codehaus.plexus:plexus-interpolation:jar:1.11
[DEBUG]   Included: org.slf4j:slf4j-jdk14:jar:1.5.6
[DEBUG]   Included: org.slf4j:jcl-over-slf4j:jar:1.5.6
[DEBUG]   Included: org.apache.maven.reporting:maven-reporting-api:jar:2.2.1
[DEBUG]   Included: org.apache.maven.doxia:doxia-sink-api:jar:1.1
[DEBUG]   Included: org.apache.maven.doxia:doxia-logging-api:jar:1.1
[DEBUG]   Included: junit:junit:jar:3.8.1
[DEBUG]   Included: commons-cli:commons-cli:jar:1.2
[DEBUG]   Included: org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4
[DEBUG]   Included: org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3
[DEBUG]   Included: org.sonatype.plexus:plexus-cipher:jar:1.4
[DEBUG]   Included: backport-util-concurrent:backport-util-concurrent:jar:3.1
[DEBUG]   Included: org.apache.commons:commons-lang3:jar:3.3.2

I attached the debug log for your reference, one is generated directly from the Shell, another is from the Hudson.

[Updated on: Thu, 09 June 2016 03:20]

Report message to a moderator

Re: Hudson execute maven plugin failed [message #1749872 is a reply to message #1734369] Tue, 13 December 2016 13:12 Go to previous message
Andreas Sewe is currently offline Andreas SeweFriend
Messages: 111
Registered: June 2013
Senior Member
I am facing a similar issue with an update to the maven-checkstyle-plugin. But maybe the workaround given in their JIRA can help you.
Previous Topic:Manual for plot?
Next Topic:Continuous integration
Goto Forum:

Current Time: Sun Jun 24 15:15:12 GMT 2018

Powered by FUDForum. Page generated in 0.02003 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top