Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-2012

Update pom to configure releasing using the maven-release-plugin

    Details

    • Type: Bug
    • Status: Closed
    • Priority: TBD
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: OpenMRS 1.8.0
    • Component/s: None
    • Labels:
    • Complexity:
      Low

      Description

      Using a version of the maven-release-plugin prior to 2.0 requires that the install maven goal is run before releasing
      This is required for use of the test pom and api test-jar dependencies
      This dependency resolution was removed from the release prepare goal in version 2.0 of the plugin:
      http://jira.codehaus.org/browse/MRELEASE-3
      Without using a version of the release plugin >= 2.0 or running install, the release process fails for missing artifacts

      The default goals run during the release are 'clean verify', and similarly this should be 'clean install' to avoid missing artifacts
      To avoid entering in the version for each module (interactive mode), the 'auto version submodules' configuration can be used

      For these reasons, the following release plugin configuration should be added to the parent pom:

      <plugin>
      	<groupId>org.apache.maven.plugins</groupId>
      	<artifactId>maven-release-plugin</artifactId>
      	<version>2.1</version>
      	<configuration>
      		<preparationGoals>clean install</preparationGoals>
      		<autoVersionSubmodules>true</autoVersionSubmodules>
      	</configuration>
      </plugin>
      

      This configuration avoids needing to specify these on the command line during release:

      mvn org.apache.maven.plugins:maven-release-plugin:2.1:prepare 
        -DpreparationGoals="clean install" -DautoVersionSubmodules=true
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mblanchette Matthew Blanchette [X] (Inactive)
                Reporter:
                mblanchette Matthew Blanchette [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: