Reputation: 13
After building my project in Jenkins, I ran into this error:
<===[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 /var/lib/jenkins/jobs/A/workspace/pom.xml mvn clean
integration-test -Dlog4j.configuration=file./src/test/
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Invalid task 'mvn': 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
This is a little weird, since I was to build the project using maven via the command line. Why is my repository, via Jenkins not able to build the project, while I could on my local machine?
Upvotes: 0
Views: 1137
Reputation: 168
I personally solved such an error doing a mere
rm -rf /var/lib/jenkins/jobs/A/workspace
which does equivalently reset everything clean when such a 'sandgrain' has gotten inside somehow and corrupted the build.
Upvotes: 0
Reputation: 619
It looks like you are specifying mvn as a goal to maven. The Goals and options line in jenkins project config should not include mvn: clean integration-test
for example.
Upvotes: 0
Reputation: 15528
The answer is right in your log file
Executing Maven: -B -f /var/lib/jenkins/jobs/A/workspace/pom.xml mvn clean
.
You have miss-configured the job, so it's now trying to execute an in-existent mvn
task. If your project type is "maven", just type clean compile package etc
in the input box. Otherwise please post a screenshot of your job's config so we can better understand what's going on
Upvotes: 1