-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Jenkins 1.532.1 (LTS); JRE 7; Unix Daemon
maven-plugin 2.0.3
The following scenario leads to failing builds because of faulty behaviour of Jenkins:
- create a global environment variable:
- create a job (maven or freestyle; did not test it on matrix)
- configure maven:
(enter the global env variable)
- run the job
- you get something like:
Modules changed, recalculating dependency graph maven-agent.jar already up to date classworlds.jar already up to date maven-interceptor.jar already up to date maven2.1-interceptor.jar already up to date [amavenjob] $ java -Xmx512m -XX:MaxPermSize=256m -cp PATH/jenkins-slave/maven-agent.jar:PATH/jenkins-slave/classworlds.jar hudson.maven.agent.Main PATH/maven/current PATH/jenkins-slave/slave.jar PATH/jenkins-slave/maven-interceptor.jar 40919 PATH/jenkins-slave/maven2.1-interceptor.jar <===[JENKINS REMOTING CAPACITY]===>channel started log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.converters.BooleanConverter). log4j:WARN Please initialize the log4j system properly. Executing Maven: -B -f PATH/jenkins-slave/workspace/amavenjob/pom.xml clean install ${JOB_MVN_PARAM} [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Invalid task '${JOB_MVN_PARAM}': you must specify a valid lifecycle phase, or a goal in the format plugin:goal or pluginGroupId:pluginArtifactId:pluginVersion:goal [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: < 1 second [INFO] Finished at: Fri Jan 31 09:12:40 CET 2014 [INFO] Final Memory: 3M/59M [INFO] ------------------------------------------------------------------------ channel stopped Finished: FAILURE
- is related to
-
JENKINS-18030 Unable to parameterized Maven module build
-
- Open
-
-
JENKINS-20884 Variable expansion in maven goals
-
- Resolved
-
Maven is not able to ignore a placeholder in its commandline. Jenkins has to do that just before calling maven.
Maybe other tools are affected too.
I propose to filter the maven goals before committing them to a Builder.
For a private hotfix I used this method:
to modify the calculated hudson.util.ArgumentListBuilder in hudson.maven.MavenModuleSetBuild.MavenModuleSetBuildExecution.doRun(BuildListener). This works well for Maven jobs but not for freestyle jobs.