jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Maven 2 & 3
  • MNG-607

implement release-pom.xml from design docs

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: 2.0-beta-1
  • Component/s: Plugins and Lifecycle
  • Labels:
    None

Description

2 components to this:

  • writing the pom during the release plugin and doing the scm operations
  • using it instead when present at build time, instead of pom.xml

For the second, I'm not sure if this should be automatic or controlled by a -f switch. I think it should be automatic, and the -f switch should be implemented to allow pom.xml to be used when release-pom.xml is there. (As well as other pom files).

Design: http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution

Issue Links

is related to

Improvement - An improvement or enhancement to an existing feature or task. MNG-662 Refactor release plugin to handle reactored build and release-pom.xml-SCM interactions.

  • Blocker - Blocks development and/or testing work, production could not run
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
John Casey added a comment - 20/Jul/05 12:59 PM

My plan for implemetation (comments are welcome):

=============================================================================

MNG-607: release-pom handling

Goals
------------------------

PRIMARY

  • Support fully reproducible builds for releases
  • Support rebuilding releases from tagged SCM checkouts

SECONDARY

  • Provide concrete information about how an artifact was created

Requirements
------------------------

  • fully resolved release-pom.xml should be created in ${pom.build.directory}
    during package
  • should EXPLICITLY define all information inherited/implied by the
    normal pom.xml, with no expressions.
  • all RELEASE/LATEST/SNAPSHOT/range metadata should be resolved to
    concrete versions
  • release-pom.xml should be archived in the artifact, rather than
    the original pom.xml
  • release plugin execution should manage this release-pom.xml alongside the
    original pom.xml, and tag appropriately
  • should be committed and tagged with the release
  • should then be deleted before next (-SNAPSHOT) pom.xml version is
    committed
  • execution of subsequent builds should try first to use release-pom.xml
  • default over to pom.xml if non-existent
  • NOTIFY the user when using release-pom.xml
  • allow '-f' switch to force use of pom.xml (or other pom file) when
    release-pom.xml exists

Implementation
---------------------

  • Add getFullyResolvedModel():Model to some sort of utility component
    (DefaultMavenProjectBuilder, MavenProject, etc. ?)
  • sort through plugins and resolve to concrete version
  • sort through dependencies and resolve to concrete version
  • remove dependencyManagement and pluginManagement (not used in
    fully-resolved scenario)
  • cache this Model instance for later reuse?
  • Change MavenArchiver to use ${project.fullyResolvedModel} for the bundled
    pom.xml in META-INF

    * Change release plugin to write, tag/commit, delete, commit release-pom.xml
    using ${project.fullyResolvedModel} to ${basedir}/release-pom.xml.
  • Modify MavenCli:
  • pickup on release-pom.xml if it exists, and NOTIFY THE USER that it's
    using that pom.
  • provide '-f' switch for explicitly specifying which pom file to use (for
    overriding release-pom.xml selection)

Plan of Attack
-----------------------

1. Implement getFullyResolvedModel():Model with caching in MavenProject

2. Modify MavenArchiver to use fully resolved model in META-INF

3. Modify MavenCli to support '-f' and choice of release-pom.xml over pom.xml

4. Modify release plugin to support management of release-pom.xml

Show
John Casey added a comment - 20/Jul/05 12:59 PM My plan for implemetation (comments are welcome): ============================================================================= MNG-607: release-pom handling Goals ------------------------ PRIMARY
  • Support fully reproducible builds for releases
  • Support rebuilding releases from tagged SCM checkouts
SECONDARY
  • Provide concrete information about how an artifact was created
Requirements ------------------------
  • fully resolved release-pom.xml should be created in ${pom.build.directory} during package
  • should EXPLICITLY define all information inherited/implied by the normal pom.xml, with no expressions.
  • all RELEASE/LATEST/SNAPSHOT/range metadata should be resolved to concrete versions
  • release-pom.xml should be archived in the artifact, rather than the original pom.xml
  • release plugin execution should manage this release-pom.xml alongside the original pom.xml, and tag appropriately
  • should be committed and tagged with the release
  • should then be deleted before next (-SNAPSHOT) pom.xml version is committed
  • execution of subsequent builds should try first to use release-pom.xml
  • default over to pom.xml if non-existent
  • NOTIFY the user when using release-pom.xml
  • allow '-f' switch to force use of pom.xml (or other pom file) when release-pom.xml exists
Implementation ---------------------
  • Add getFullyResolvedModel():Model to some sort of utility component (DefaultMavenProjectBuilder, MavenProject, etc. ?)
  • sort through plugins and resolve to concrete version
  • sort through dependencies and resolve to concrete version
  • remove dependencyManagement and pluginManagement (not used in fully-resolved scenario)
  • cache this Model instance for later reuse?
  • Change MavenArchiver to use ${project.fullyResolvedModel} for the bundled pom.xml in META-INF * Change release plugin to write, tag/commit, delete, commit release-pom.xml using ${project.fullyResolvedModel} to ${basedir}/release-pom.xml.
  • Modify MavenCli:
  • pickup on release-pom.xml if it exists, and NOTIFY THE USER that it's using that pom.
  • provide '-f' switch for explicitly specifying which pom file to use (for overriding release-pom.xml selection)
Plan of Attack ----------------------- 1. Implement getFullyResolvedModel():Model with caching in MavenProject 2. Modify MavenArchiver to use fully resolved model in META-INF 3. Modify MavenCli to support '-f' and choice of release-pom.xml over pom.xml 4. Modify release plugin to support management of release-pom.xml
Hide
Permalink
John Casey added a comment - 20/Jul/05 1:00 PM

MavenProject is not the right place for getFullyResolvedModel(), which also means that the method name is not the best. I'll hunt for another home/name for it...

Show
John Casey added a comment - 20/Jul/05 1:00 PM MavenProject is not the right place for getFullyResolvedModel(), which also means that the method name is not the best. I'll hunt for another home/name for it...
Hide
Permalink
Brett Porter added a comment - 20/Jul/05 6:43 PM

comments:
" - cache this Model instance for later reuse?"
I don't think this is necessary

"* Change MavenArchiver to use ${project.fullyResolvedModel} for the bundled
pom.xml in META-INF"
it should store pom.xml (the original) and release-pom.xml, IMO. As I understood it, it already did this, so it would be worth checking it first.

" - provide '-f' switch for explicitly specifying which pom file to use (for
overriding release-pom.xml selection)"
users will also use this to other files than pom.xml (even if it isn't recommended), so make sure you can do directory relocation (ie m2 should run from the same directory as the file). See Maven 1's CLI.

Show
Brett Porter added a comment - 20/Jul/05 6:43 PM comments: " - cache this Model instance for later reuse?" I don't think this is necessary "* Change MavenArchiver to use ${project.fullyResolvedModel} for the bundled pom.xml in META-INF" it should store pom.xml (the original) and release-pom.xml, IMO. As I understood it, it already did this, so it would be worth checking it first. " - provide '-f' switch for explicitly specifying which pom file to use (for overriding release-pom.xml selection)" users will also use this to other files than pom.xml (even if it isn't recommended), so make sure you can do directory relocation (ie m2 should run from the same directory as the file). See Maven 1's CLI.
Hide
Permalink
John Casey added a comment - 25/Jul/05 10:50 PM

95% complete. Need to switch to newer version of maven-scm to allow us to use a remove command in order to delete release-pom.xml from the HEAD/trunk.

I'll revisit this once I've talked to Emmanuel, and he's done with API changes for maven-scm.

Show
John Casey added a comment - 25/Jul/05 10:50 PM 95% complete. Need to switch to newer version of maven-scm to allow us to use a remove command in order to delete release-pom.xml from the HEAD/trunk. I'll revisit this once I've talked to Emmanuel, and he's done with API changes for maven-scm.
Hide
Permalink
John Casey added a comment - 27/Jul/05 9:31 AM

resolving the remaining release plugin issues in MNG-662

Show
John Casey added a comment - 27/Jul/05 9:31 AM resolving the remaining release plugin issues in MNG-662

People

  • Assignee:
    John Casey
    Reporter:
    Brett Porter
Vote (0)
Watch (1)

Dates

  • Created:
    18/Jul/05 6:00 PM
    Updated:
    01/Feb/06 2:43 PM
    Resolved:
    27/Jul/05 9:31 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.