I want to build a helloworld C program on a Windows machine with Maven and Cygwin's gcc. The build is succesful with nar-maven-plugin version 3.2.3, but if use a higher version like 3.4.0 the build always fails with
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.4.0:nar-validate (default-nar-validate) on project helloworld: msvc.version not specified and no VSCOMNTOOLS environment
Why is that? I do not want to use the Microsoft compiler.
My project structure:
src/main/c/helloworld.c
pom.xml
My pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.foo.bar</groupId>
<artifactId>helloworld</artifactId>
<packaging>nar</packaging>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>com.github.maven-nar</groupId>
<artifactId>nar-maven-plugin</artifactId>
<version>3.4.0</version>
<extensions>true</extensions>
<configuration>
<c>
<name>gcc</name>
<includes>
<include>**/*.c</include>
</includes>
</c>
<linker>
<name>gcc</name>
</linker>
<libraries>
<library>
<type>executable</type>
<run>false</run>
</library>
</libraries>
</configuration>
</plugin>
</plugins>
</build>
My build output:
C:\CC4\c_test>which gcc
C:\cygwin64\bin\gcc.EXE
C:\CC4\c_test>gcc --version
gcc (GCC) 5.3.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\CC4\c_test>mvn clean install
### C:\Users\jokroebe\mavenrc_pre.bat
### Set JAVA_HOME for maven to C:\Program Files\Java\jdk1.7.0_80
### Set MAVEN_OPTS to -Xmx1024m -XX:MaxPermSize=512m
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building helloworld 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # helloworld ---
[INFO] Deleting C:\CC4\c_test\target
[INFO]
[INFO] --- nar-maven-plugin:3.4.0:nar-validate (default-nar-validate) # helloworld ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.436 s
[INFO] Finished at: 2016-03-31T20:45:42+02:00
[INFO] Final Memory: 9M/154M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.github.maven-nar:nar-maven-plugin:3.4.0:nar-validate (default-nar-validate) on project helloworld: msvc.version not specified and no VS<Version>COMNTOOLS environment
variable can be found -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Related
I am trying to build JBPM from its source code. I am doing a maven build with skipTests=true. I believe it is failing because the maven archetype plugin is generating files during "integration-test"
[WARNING] Contents of file src\main\resources\rules.drl are not equal
[WARNING] Contents of file src\test\java\it\pkg\RuleTest.java are not equal
[WARNING] Contents of file src\test\resources\log4j.properties are not equal
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for KIE :: API Parent 7.39.0.Final-redhat-00007:
[INFO]
[INFO] KIE :: API Parent .................................. SUCCESS [ 8.784 s]
[INFO] KIE :: Public API .................................. SUCCESS [ 48.164 s]
[INFO] KIE :: Internal .................................... SUCCESS [ 34.910 s]
[INFO] KIE :: Maven Archetypes ............................ SUCCESS [ 0.175 s]
[INFO] KIE :: Drools Maven Archetype ...................... FAILURE [ 3.405 s]
[INFO] KIE :: Model Archetype ............................. SKIPPED
[INFO] KIE :: KJAR Archetype .............................. SKIPPED
[INFO] KIE :: Service Spring Boot Archetype ............... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:38 min
[INFO] Finished at: 2020-11-12T09:10:02-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:integration-test (default-integration-test) on project kie-drools-archetype:
[ERROR] Archetype IT 'integrationtestDefaults' failed: Some content are not equals
[ERROR] Archetype IT 'integrationtestWithCEP' failed: Some content are not equals
[ERROR] Archetype IT 'integrationtestWithEclipse' failed: Some content are not equals
However, I don't care about the archetype generation because I am not using that part of this build of the tool (i.e., the files it would generate are already being built by another tool). How can I remove the goal for or ignore the errors of "integration-test" for this maven plugin? The pom.file does not mention any goals explicitly nor does it execute the tasks explicitly (which seems required according to How do I run a maven plugin's integration tests?). This is the pom.xml (after the header):
<properties>
<dollar>$</dollar>
</properties>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.2</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.2</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
And the parent pom.xml simple declares this module. Thanks!
Simple solution:
<properties>
<archetype.test.skip>true</archetype.test.skip>
</properties>
Note that this skipping is different than skipping tests or skipping integratio tests (in general). Both of which have their own cofigurations.
I am using Java, Maven and TestNG.
I would like to add Allure for reporting in Jenkins.
I have added following configuration in pom.xml:
Dependency:
<!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-testng -->
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-testng</artifactId>
<version>2.12.1</version>
</dependency>
Profile:
<profile>
<id>UI</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M3</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>ui.xml</suiteXmlFile>
</suiteXmlFiles>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>LATEST_VERSION</version>
<configuration>
<reportVersion>2.4.1</reportVersion>
<reportDirectory>target/allure-results</reportDirectory>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
When I run tests locally using command:
clean test -PUI -f pom.xml
Most of the tests are passed.
[INFO] Results:
[INFO]
[INFO]
[ERROR] Tests run: 25, Failures: 6, Errors: 0, Skipped: 9
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 13:39 min
[INFO] Finished at: 2019-06-21T11:30:09+03:00
[INFO] Final Memory: 23M/259M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M3:test (default-test) on project company: There are test failures.
However, "allure-results" is created in the root of project, but I have a config for "target/allure-results". While running tests locally using not Maven, but TestNG directly all tests are passed.
I installed Allure plugin in Jenkins, added configuration to Jenkins job:
However, after Jenkins job is finished I see that in Console Output some tests are passed, but it's shown that number of tests that were passed/running/failed is 0. And in Allure almost all tests are failed in a strange way - BeforeTest was failed, but Test was passed.
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[ERROR] There are test failures.
[JENKINS] Recording test results
[WARNING] Attempt to (de-)serialize anonymous class org.jfrog.hudson.maven2.MavenDependenciesRecorder$1; see: https://jenkins.io/redirect/serialization-of-anonymous-classes/
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 09:57 min
[INFO] Finished at: 2019-06-21T07:43:30+00:00
[INFO] Final Memory: 30M/313M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data
[JENKINS] Archiving /var/lib/jenkins/workspace/tests.env.test/ui-test/pom.xml to com.company/company/1.0-SNAPSHOT/company-1.0-SNAPSHOT.pom
channel stopped
[ui-test] $ /var/lib/jenkins/tools/ru.yandex.qatools.allure.jenkins.tools.AllureCommandlineInstallation/allure/bin/allure generate -c -o /var/lib/jenkins/workspace/tests.env.test/ui-test/allure-report
Report successfully generated to /var/lib/jenkins/workspace/tests.env.test/ui-test/allure-report
Allure report was successfully generated.
Creating artifact for the build.
Artifact was added to the build.
Build step 'Allure Report' changed build result to UNSTABLE
Finished: UNSTABLE
By default Allure results files are stored in project root. In order to change location create an allure.properties file in your test resources directory (src/test/resources) with the following content:
allure.results.directory=target/allure-results
For more details please see the docs https://docs.qameta.io/allure/#_configuration
I follow up "https://cloud.google.com/tools/cloud-repositories/docs/push-to-deploy" to build my first test project, but when I do "mvn gcloud:deploy", and I get below errors from jenkins console:
[workspace] $ /opt/bitnami/apps/jenkins/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/jenkins-maven/bin/mvn clean install gcloud:deploy
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jenkins-test-java 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # jenkins-test-java ---
[INFO] Deleting /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # jenkins-test-java ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # jenkins-test-java ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO] Building jar: /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target/jenkins-test-java-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) # jenkins-test-java ---
[INFO] Installing /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target/jenkins-test-java-1.0-SNAPSHOT.jar to /home/tomcat/.m2/repository/com/google/appengine/demos/jenkins-test-java/1.0-SNAPSHOT/jenkins-test-java-1.0-SNAPSHOT.jar
[INFO] Installing /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/pom.xml to /home/tomcat/.m2/repository/com/google/appengine/demos/jenkins-test-java/1.0-SNAPSHOT/jenkins-test-java-1.0-SNAPSHOT.pom
[INFO]
[INFO] >>> gcloud-maven-plugin:2.0.9.90.v20151210:deploy (default-cli) > package # jenkins-test-java >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # jenkins-test-java ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) # jenkins-test-java ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # jenkins-test-java ---
[INFO] No tests to run.
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # jenkins-test-java ---
[WARNING] JAR will be empty - no content was marked for inclusion!
[INFO]
[INFO] <<< gcloud-maven-plugin:2.0.9.90.v20151210:deploy (default-cli) < package # jenkins-test-java <<<
[INFO]
[INFO] --- gcloud-maven-plugin:2.0.9.90.v20151210:deploy (default-cli) # jenkins-test-java ---
[INFO] Running gcloud app deploy...
[INFO] Running python -S /usr/local/share/google/google-cloud-sdk/lib/googlecloudsdk/gcloud/gcloud.py --quiet --project=jenkins-test-java preview app deploy /opt/bitnami/apps/jenkins/jenkins_home/jobs/dev-jenkins-test/workspace/target/appengine-staging/app.yaml
[INFO] You do not currently have this command group installed. Using it
[INFO] requires the installation of components: [preview]
[INFO] ERROR: (gcloud) You cannot perform this action because you do not have permission to modify the Google Cloud SDK installation directory [/usr/local/share/google/google-cloud-sdk].
[INFO]
[INFO] Re-run the command with sudo: sudo gcloud ...
[ERROR] Error: gcloud app command with exit code : 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.628 s
[INFO] Finished at: 2015-12-21T06:29:47+00:00
[INFO] Final Memory: 11M/56M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.appengine:gcloud-maven- plugin:2.0.9.90.v20151210:deploy (default-cli) on project jenkins-test-java: Error: gcloud app command exit code is: 1 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Build step 'Invoke top-level Maven targets' marked build as failure
Finished: FAILURE
and my pom.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.google.appengine.demos</groupId>
<artifactId>jenkins-test-java</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<appengine.target.version>1.9.28</appengine.target.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.target.version}</version>
</dependency>
</dependencies>
<build>
<!-- needed for enabling compile/reload on save in mordern IDEs...-->
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>2.5.1</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>2.0.9.90.v20151210</version>
<configuration>
<gcloud_project>jenkins-test-java</gcloud_project>
</configuration>
</plugin>
</plugins>
</build>
</project>
thank you guys :)
The error says it all:
ERROR: (gcloud) You cannot perform this action because you do not have
permission to modify the Google Cloud SDK installation directory
[/usr/local/share/google/google-cloud-sdk].
I see three options:
run the command with sudo or as root.
make your google-cloud-sdk directory (/usr/local/share/google/google-cloud-sdk) writeable for your user
install the google-cloud-sdk somewhere where your user has write permission and execute the command like (see docs):
mvn gcloud:run -Dgcloud.gcloud_directory="absolute-path-to-the-gcloud-directory"
install the google-cloud-sdk somewhere where your user has write permission and set the gcloud directory in your pom.xml (see docs):
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>>2.0.9.72.v20150804</version>
<configuration>
<gcloud_directory>/usr/foo/private/google-cloud-sdk</gcloud_directory>
...
I am trying to get QueryDSL to work on a Spring Roo project.
Here is my plugin config:
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>maven-apt-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>target/generated-sources</outputDirectory>
<processor>com.mysema.query.apt.jpa.JPAAnnotationProcessor</processor>
</configuration>
</execution>
</executions>
</plugin>
When I run the following command: mvn apt:process, I get the following error:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building suivitrc 0.1.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-apt-plugin:1.0.2:process (default-cli) # suivitrc ---
[ERROR] Either processor or processors need to be given
[ERROR] execute error
java.lang.IllegalArgumentException: Either processor or processors need to be given
at com.mysema.maven.apt.AbstractProcessorMojo.buildProcessor(AbstractProcessorMojo.java:140)
at com.mysema.maven.apt.AbstractProcessorMojo.execute(AbstractProcessorMojo.java:157)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.375s
[INFO] Finished at: Wed Sep 05 12:22:16 CEST 2012
[INFO] Final Memory: 7M/18M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.mysema.maven:maven-apt-plugin:1.0.2:process (default-cli) on project suivitrc: Either processor
to be given -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Of course I have already tried mvn install which doesn't generate any source.
Any advice welcome.
EDIT:
The only output from maven-apt-plugin is this:
[INFO] --- maven-apt-plugin:1.0.2:process (default) # suivitrc ---
You are calling the goal directly. The execution configuration is not used in this case. Do you get the same exception when running clean install?
I am trying to do a mvn release:perform on my project and get the error pasted below.
I do not have any dependency mentioned anywhere in the project for org.codehaus.mojo:cobertura-maven-plugin neither it is in the maven settings.xml file but still it creeps up from somewhere. Just to mention I can successfully build the project with mvn clean compile install and the mvn release:prepare command run successfully.
Can someone please help and let me know how I can get rid of this error.
ERROR
=====
[INFO] [ERROR] BUILD ERROR
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] The plugin 'org.codehaus.mojo:cobertura-maven-plugin' does not exist or no valid version could be found
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] For more information, run Maven with the -e switch
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] [INFO] Total time: 13 seconds
[INFO] [INFO] Finished at: Wed Aug 15 17:03:36 BST 2012
[INFO] [INFO] Final Memory: 28M/51M
[INFO] [INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Maven execution failed, exit code: '1'
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:133)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more
Caused by: org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:89) at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:67) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:334) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:282) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:262) at org.apache.maven.plugins.release.PerformReleaseMojo.execute(PerformReleaseMojo.java:129)
... 19 more
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1' at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:375) at org.apache.maven.shared.release.exec.InvokerMavenExecutor.executeGoals(InvokerMavenExecutor.java:393) at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:81) ... 24 more
What does your pom.xml say? it should have the following in it:
<project>
...
<build>
...
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<tagBase>https://svn.apache.org/repos/asf/maven/components/releases</tagBase>
</configuration>
</plugin>
</plugins>
...
</build>
...
</project>