Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.1.1
-
None
-
None
-
$ mvn -version
Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
Maven home: /usr/share/maven-bin-3.5
Java version: 1.8.0_172, vendor: Oracle Corporation
Java home: /opt/oracle-jdk-bin-1.8.0.172/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.9.76-gentoo-r1", arch: "amd64", family: "unix"
$ mvn -version Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00) Maven home: /usr/share/maven-bin-3.5 Java version: 1.8.0_172, vendor: Oracle Corporation Java home: /opt/oracle-jdk-bin-1.8.0.172/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.9.76-gentoo-r1", arch: "amd64", family: "unix"
Description
The configuration parameter snapshotsOnly is not always repected. We use a profile that can be activated in the root of a multi-project with following settings:
<profile> <activation> <property> <name>purge</name> </property> </activation> <id>purge-group</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <executions> <execution> <id>purge-local-repository</id> <phase>clean</phase> <goals> <goal>purge-local-repository</goal> </goals> <configuration> <manualInclude>${project.groupId}</manualInclude> <resolutionFuzziness>groupId</resolutionFuzziness> <snapshotsOnly>${purge}</snapshotsOnly> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile>
We'd like to handle all artifacts with the same groupId. The purge parameter should be used to purge only the snapshots or anything. However, the snapshotOnly parameter is not respected. The goal will wipe always all artifacts with the same groupId.