I am using the Tycho plugin to compile an Eclipse plugin project. When I run the command
mvn clean install
my build passes
When I run the command
mvn clean verify install
my build fails with the following:
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-p2-plugin:1.1.0:
p2-metadata-default (default-p2-metadata-default) on project
com.mysite.project:
Execution default-p2-metadata-default of goal
org.eclipse.tycho:tycho-p2-plugin:1.1.0:p2-metadata-default failed.
IllegalArgumentException -> [Help 1]
The failure stacktrace is:
at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.getCanonicalArtifact(P2GeneratorImpl.java:193)
at org.eclipse.tycho.p2.impl.publisher.P2GeneratorImpl.generateMetadata(P2GeneratorImpl.java:146)
at org.eclipse.tycho.plugins.p2.P2MetadataMojo.attachP2Metadata(P2MetadataMojo.java:149)
at org.eclipse.tycho.plugins.p2.P2MetadataMojo.execute(P2MetadataMojo.java:108)
at org.eclipse.tycho.plugins.p2.P2MetadataDefaultMojo.execute(P2MetadataDefaultMojo.java:33)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 21 more
From everything I can find on Maven, invoking the install
phase should implicitly trigger the verify
phase. What's going on here?
personally, i never use mvn install
when using tycho, because it will install the bundles into your local repo, and since you're build eclipse bundles, you do not have to push them to your maven repo.
back to your question, calling two phases in a single command is not necessary since the install phase should trigger the verify phase.
so use only mvn verify
to build your product or only mvn install
to achieve the exact same goal ( and have the built artifact pushed into your local repo )