Uploaded image for project: 'Maven Clean Plugin'
  1. Maven Clean Plugin
  2. MCLEAN-20

pom packaged (aggregtor) project files shouldn't activate "clean" to delete /target

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.1
    • None
    • None

    Description

      If you have projects with the following layout:

      cds_adapter/pom.xml
      cds_adapter/pom-complete.xml - an aggregator
      deriv_adapter/pom.xml

      Then when you do:
      mvn -f pom-complete.xml clean install

      what you want is for deriv_adapter's jar to be built and installed followed by cds_adapter's jar.

      This happens. However, unfortunately the last thing to run is the "clean install" task on the pom-complete.xml project. This deletes the cds_adapter/target directory. The desired behaviour would be for the aggregator pom not to result in the deletion of the /target directory.

      Aggregator poms do not install anything into "target" and should not take part in the "clean" workflow.

      The workaround is to issue the commands separately:
      mvn -f pom-complete.xml clean
      mvn -f pom-complete.xml install

      Attachments

        Issue Links

          Activity

            People

              bentmann Benjamin Bentmann
              daveboden David Boden
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: