问题
In maven 2.x you could use the reactor:make-scm-changes to build only modules with local scm changes.
Running this module with maven 3.0.3 results in a failure
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-reactor-plugin:1.0
:make-scm-changes (default-cli) on project my-project: The parameters 'artifactLis
t', 'folderList' for goal org.apache.maven.plugins:maven-reactor-plugin:1.0:make
-scm-changes are missing or invalid -> [Help 1]
This post seems to indicate there is no equivalent functionality for maven 3.0 http://mail-archives.apache.org/mod_mbox/maven-dev/201011.mbox/%3calpine.OSX.2.00.1011051125410.368@dfab-2.local%3e
Is there a replacement in maven 3.0 to get the functionality to only build modules that have local scm changes?
回答1:
You could roll your own with a shell script that centers around:
svn --non-interactive status
Your shell script could do something like so:
PROJECT_LIST=`svn --non-interactive status | filter out target dir \
| cut out status \
| cut out subdirectories \
| replace line endings with ','`
mvn $* --projects=$PROJECT_LIST
I didn't test it out, but I know it's possible in theory.
来源:https://stackoverflow.com/questions/7852398/how-to-get-maven-3-0-to-only-build-modules-with-local-scm-changes