I'm using Maven 3.2.3 on Mac 10.9.5 (Java 6) with bash shell. Per the accepted answer on this thread -- How do I exclude certain modules from a maven build using the commandline, I'm trying to run a Maven build on my multi-module project while excluding some modules from teh build, so I have crafted this command
davea$ mvn clean install -pl org.mainco.subco:subco,org.mainco.subco:database,org.mainco.subco:mainmodule,org.mainco.subco:moduleB,org.mainco.subco:moduleD,org.mainco.subco:moduleC,\!org.mainco.subco:moduleF -DskipTests
However, something about the “!” syntax is failing because I get the error
[ERROR] Could not find the selected project in the reactor: org.mainco.subco:moduleF -> [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:
The error is complaining about the very module I want to exclude. What is the proper command line syntax? (Note: I’m not interested in editing my parent pom.xml file, this question is strictly concerned with excluding modules via the command line).