Uploaded image for project: 'Maven Dependency Plugin'
  1. Maven Dependency Plugin
  2. MDEP-573

"purge-local-repository -Dinclude" does not work as described

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0, 3.0.1
    • Fix Version/s: 3.0.2
    • Component/s: purge-local-repository
    • Labels:
      None
    • Environment:
      Win 7, 64 Bit, JDK 8u92, MVN 3.5.0, MDEP 3.0.1

      Description

      When I run mvn generate-sources on a POM which binds the goal purge-local-repository to that phase, then MDEP correctly purges and re-resolves the all dependencies of all submodules.

      When I instead run mvn dependency:purge-local-repository then the reactor skips all submodules.

      This in rather annoying and surprising, because nowhere in the public description of MDEP is told that invoking dependency:purge-local-repository at the command line as the sole goal will effectively skip submodules of the POM.

      If this is not intended, this bug should get fixed.

      If this is intended, then the documentation of this goal should clearly tell that.

        Activity

        Hide
        gboue Guillaume Boué added a comment -

        This was not intended and is a regression from MDEP-537. Fixed in r1800481.

        Show
        gboue Guillaume Boué added a comment - This was not intended and is a regression from MDEP-537 . Fixed in r1800481 .
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Jenkins build maven-plugins #9015 (See https://builds.apache.org/job/maven-plugins/9015/)
        MDEP-573 "purge-local-repository -Dinclude" does not work as described

        Due to requiresProject = false, we need to loop over the projects in the reactor ourselves if the mojo was launched from the CLI. This requires several changes:

        • Dependency artifacts do not exist anymore so we work on dependencies and resolve them if necessary.
        • Dependencies on projects in the reactor are ignored (just like in the case of a single project, the project itself is not purged).
        • Artifacts already purged do not need to be purged again: if they were re-resolved then no need to purge and re-resolve them a second time; if they were not re-resolved then keep them deleted.
        • Updating to maven-artifact-transfer 0.9.2-SNAPSHOT to make added ITs work on Maven 3.0.x. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1800481)
        • (edit) maven-dependency-plugin/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep/verify.groovy
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/test.properties
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/verify.groovy
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child1
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child1/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child2
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child2/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/setup.bsh
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/test.properties
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/verify.bsh
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child1
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child1/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child2
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child2/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/invoker.properties
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/pom.xml
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/setup.bsh
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/test.properties
        • (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/verify.bsh
        • (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java
        • (edit) maven-dependency-plugin/src/test/java/org/apache/maven/plugins/dependency/TestSkip.java
        • (add) maven-dependency-plugin/src/test/resources/unit/skip-test/plugin-purge-local-repository-config.xml
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Jenkins build maven-plugins #9015 (See https://builds.apache.org/job/maven-plugins/9015/ ) MDEP-573 "purge-local-repository -Dinclude" does not work as described Due to requiresProject = false, we need to loop over the projects in the reactor ourselves if the mojo was launched from the CLI. This requires several changes: Dependency artifacts do not exist anymore so we work on dependencies and resolve them if necessary. Dependencies on projects in the reactor are ignored (just like in the case of a single project, the project itself is not purged). Artifacts already purged do not need to be purged again: if they were re-resolved then no need to purge and re-resolve them a second time; if they were not re-resolved then keep them deleted. Updating to maven-artifact-transfer 0.9.2-SNAPSHOT to make added ITs work on Maven 3.0.x. (gboue: http://svn.apache.org/viewvc/?view=rev&rev=1800481 ) (edit) maven-dependency-plugin/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep/invoker.properties (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-bad-dep/verify.groovy (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/invoker.properties (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/test.properties (add) maven-dependency-plugin/src/it/projects/purge-local-repository-include/verify.groovy (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child1 (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child1/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child2 (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/child2/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/setup.bsh (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/test.properties (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module-execution/verify.bsh (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child1 (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child1/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child2 (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/child2/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/invoker.properties (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/pom.xml (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/setup.bsh (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/test.properties (add) maven-dependency-plugin/src/it/projects/purge-local-repository-multi-module/verify.bsh (edit) maven-dependency-plugin/src/main/java/org/apache/maven/plugins/dependency/PurgeLocalRepositoryMojo.java (edit) maven-dependency-plugin/src/test/java/org/apache/maven/plugins/dependency/TestSkip.java (add) maven-dependency-plugin/src/test/resources/unit/skip-test/plugin-purge-local-repository-config.xml

          People

          • Assignee:
            gboue Guillaume Boué
            Reporter:
            mkarg Markus Karg
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development