Reputation: 4103
I want to skip the build of a couple tycho modules for a specific profile, but evidently the Maven way does not work.
I tried mvn install -pl "!org.acme.project"
but got:
[INFO] Scanning for projects...
[ERROR] [ERROR] Could not find the selected project in the reactor: org.acme.project @
[ERROR] Could not find the selected project in the reactor: org.acme.project -> [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/MavenExecutionException
(Which makes sense, because Tycho artifacts are never known as Maven artifacts, so of course Maven does not find them.)
And I tried overridding the modules like this:
<modules>
<module>org.acme.project</module>
<module>org.acme.other</module>
</modules>
<profiles>
<profile>
<id>my-great-profile</id>
<modules>
<module>org.acme.other</module>
</modules>
</profile>
</profiles>
But all projects are built that way (I'm not sure if that should work, or if I can only add modules that way).
Creating a default profile does not work, because then Eclipse won't let me import these projects.
I could probably disable all used Maven / Tycho plug-ins manually, but that's tedious.
Is there an easy way to skip Tycho modules?
Upvotes: 1
Views: 174
Reputation: 1638
(Which makes sense, because Tycho artifacts are never known as Maven artifacts, so of course Maven does not find them.)
That is not completely correct; Tycho projects are part of the Maven reactor, upon which -pl
acts. Point in favor: mvn install -pl ":org.acme.project"
does work.
But note the colon in the above command (which AFAICT means “the project with org.acme.project
artifact ID and any group ID“). Thus, the following should do the trick for you:
mvn install -pl "!:org.acme.project"
Upvotes: 2