Maven Release Plugin
  1. Maven Release Plugin
  2. MRELEASE-459

releaseProfiles has no effect without passing profiles in the command line

    Details

    • Patch Submitted:
      Yes
    • Number of attachments :
      2

      Description

      The releaseProfiles parameter on the perform goal is not taken into consideration when no other profiles are passed in the command line. In other words, the current code only uses the value of the parameter if you have additional profiles passed in.

      Example:

      mvn release:perform -P someProfile (uses releaseProfiles value)

      mvn release:perform (does NOT use releaseProfiles value)

      The plugin should use the parameter even if no other profiles are passed. It should actually encourage release profiles configured in your POM as opposed to arbitrary profiles passed in the command line.

      I have included a patch that uses the releaseProfiles parameter regardless of any profiles passed in the command line.

      1. MRELEASE-459.1.patch
        1 kB
        Lars Francke
      2. patch.txt
        1 kB
        Andreas Christoforides

        Activity

        Hide
        Robert Scholte added a comment -

        @Martin, it looks like the releaseProfiles are only passed when there's at least one other active profile, so it doesn't have to be a problem for everybody. Like Stephen already said before: first proof with an IT that this is still an issue.

        Show
        Robert Scholte added a comment - @Martin, it looks like the releaseProfiles are only passed when there's at least one other active profile, so it doesn't have to be a problem for everybody. Like Stephen already said before: first proof with an IT that this is still an issue.
        Hide
        Andrei Pozolotin added a comment -

        fyi: this is still a problem as of 2.3.2;

        hey, this soon will make it into a book of records!
        it will be named: "the curse of the maven release plugin"
        http://stackoverflow.com/questions/3291938/maven-release-plugin-ignores-releaseprofile

        workaround is still the same: put a dummy profile in settings.xml

        settings.xml
        
        <profiles>
        	<profile>
        		<id>default</id>
        	</profile>
        </profiles>
        
        <activeProfiles>
        	<activeProfile>default</activeProfile>
        </activeProfiles>
        
        
        Show
        Andrei Pozolotin added a comment - fyi: this is still a problem as of 2.3.2; hey, this soon will make it into a book of records! it will be named: "the curse of the maven release plugin" http://stackoverflow.com/questions/3291938/maven-release-plugin-ignores-releaseprofile workaround is still the same: put a dummy profile in settings.xml settings.xml <profiles> <profile> <id> default </id> </profile> </profiles> <activeProfiles> <activeProfile> default </activeProfile> </activeProfiles>
        Hide
        Robert Scholte added a comment -

        Fixed in r1391992

        Show
        Robert Scholte added a comment - Fixed in r1391992
        Hide
        Andrei Pozolotin added a comment -

        thank you!

        Show
        Andrei Pozolotin added a comment - thank you!
        Hide
        James Olsen added a comment -

        Note that releaseProfiles has to be in the root pom. Knowing that could save some time. Raised MRELEASE-863.

        Show
        James Olsen added a comment - Note that releaseProfiles has to be in the root pom. Knowing that could save some time. Raised MRELEASE-863 .

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Andreas Christoforides
          • Votes:
            23 Vote for this issue
            Watchers:
            29 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: