Uploaded image for project: 'Maven Release Plugin'
  1. Maven Release Plugin
  2. MRELEASE-260

Profiles given on command-line not added to exec.additionalArguments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-beta-6
    • 2.4
    • prepare
    • None

    Description

      In my POM, I have two distribution management sections, each in a separate profile:

      ...
          <profiles>
             <profile>
                  <id>private</id>
                  <distributionManagement>
                      <repository>
                          <id>private-repository</id>
                          <url>scp://repository.example.com/opt/mvn/private</url>
                      </repository>
                  </distributionManagement>
              </profile>
             <profile>
                  <id>public</id>
                  <distributionManagement>
                      <repository>
                          <id>public-repository</id>
                          <url>scp://repository.example.com/opt/mvn/public</url>
                      </repository>
                  </distributionManagement>
              </profile>
          </profiles>
      

      Running mvn release:prepare -Ppublic puts the following line in release.properties:

      exec.additionalArguments=-P default-profile,default-profile

      (The profile "default-profile" is the profile in my settings.xml which is active by default.)

      If the release plugin was working correctly, this line would be:

      exec.additionalArguments=-P default-profile,public

      In earlier betas, I believe this worked correctly. The workaround I'm using is to run mvn release:prepare, then mvn release:perform. The second command fails, and I go to target/checkout, and run mvn deploy -Ppublic manually.

      Changing release.properties doesn't work, either. It seems like release:perform uses its own list of profiles, not the ones in the properties file.

      Attachments

        Issue Links

          Activity

            People

              rfscholte Robert Scholte
              matt@atlassian.com Matt Ryall
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: