[ https://issues.apache.org/jira/browse/MNG-5903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14948180#comment-14948180 ]
Arend v. Reinersdorff commented on MNG-5903: -------------------------------------------- You are right, whatever the syntax this would be an incompatible change to module definition. But isn't this also the case for the command line option? How did existing tools handle the addition of {{-pl !integration-tests}}? About the other way, enabling only needed modules explicitly: Here's a nice answer on Stackoverflow on how to do this: http://stackoverflow.com/questions/5539348/how-to-exclude-a-module-from-a-maven-reactor-build/11429945#11429945 In my opinion this has the following drawbacks: # Not all modules are defined at the top of the pom.xml. Normally the default use case is to build all modules. But with this solution some modules are in an activeByDefault profile at the bottom. This can be confusing. # Enabling another profile on the command line deactivates activeByDefault profiles. To achieve a profile that is always active unless explicitly deactivated one needs to resort to workarounds like activating it if the pom.xml file exists. See the linked Stackoverflow answer for an example. Leading to more confusion. > Option in profiles to exclude modules from reactor > -------------------------------------------------- > > Key: MNG-5903 > URL: https://issues.apache.org/jira/browse/MNG-5903 > Project: Maven > Issue Type: New Feature > Reporter: Arend v. Reinersdorff > > Sometimes it is useful to exclude modules from a reactor build. > One reason for this can be: Don't generate Javadoc for a testing module. > Since Maven 3.2.1 it is possible to exclude modules with command line > options, eg. mvn -pl !integration-tests > See MNG-5230 "Command line option to exclude modules from reactor". In this > ticket enabling module exclusion for profiles was discussed, but apparently > not implemented. > I'm currently using the -pl command line option on our build server to > exclude two projects of a multi module build from Javadoc generation. But I > would much prefer to keep this logic in the pom.xml. Something like this: > <profile> > <id>javadoc</id> > <modules> > <module>!integration-tests</module> > </modules> > </profile> -- This message was sent by Atlassian JIRA (v6.3.4#6332)