You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2021/06/01 14:02:32 UTC

[maven-dependency-plugin] branch MDEP-739 updated (4a29079 -> b0942a6)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch MDEP-739
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git.


    omit 4a29079  MDEP-739 Dependency Plugin go-offline doesn't respect artifact classifier
     add 36f8967  remove and .gitignore for dependency-reduced-pom.xml
     add a0cba78  rename doxiaSiteVersion property to doxiaSitetoolsVersion
     add 807f24d  [MDEP-749] document why excludeScope=test fails and what to do instead
     add 26abf6c  next version will be 3.2.0
     add 727c669  [MDEP-749] improve include/exclude scope documentation
     add 4211614  [MDEP-749] scope "threshold" term to summarise classpath in/ex-clusion
     add 9e28e06  Bump maven-shared-utils from 3.3.3 to 3.3.4
     add 0190eee  Merge pull request #132 from apache/dependabot/maven/org.apache.maven.shared-maven-shared-utils-3.3.4
     add 205c1a7  Disable merge commit button
     new b0942a6  [MDEP-739] Dependency Plugin go-offline doesn't respect artifact classifier

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4a29079)
            \
             N -- N -- N   refs/heads/MDEP-739 (b0942a6)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .asf.yaml                                          |   4 +
 .gitignore                                         |   1 +
 dependency-reduced-pom.xml                         | 426 ---------------------
 pom.xml                                            |   8 +-
 .../AbstractDependencyFilterMojo.java              |  34 +-
 5 files changed, 35 insertions(+), 438 deletions(-)
 delete mode 100644 dependency-reduced-pom.xml

[maven-dependency-plugin] 01/01: [MDEP-739] Dependency Plugin go-offline doesn't respect artifact classifier

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch MDEP-739
in repository https://gitbox.apache.org/repos/asf/maven-dependency-plugin.git

commit b0942a6502d222ad32e54def23df893aa32cf436
Author: Jonas van Vliet <jv...@trackunit.com>
AuthorDate: Mon May 10 12:29:48 2021 +0200

    [MDEP-739] Dependency Plugin go-offline doesn't respect artifact classifier
    
    Closes #133
---
 .../invoker.properties                             | 18 ++++++++++
 .../pom.xml                                        | 38 ++++++++++++++++++++++
 .../verify.groovy                                  | 26 +++++++++++++++
 .../dependency/resolvers/GoOfflineMojo.java        |  2 ++
 4 files changed, 84 insertions(+)

diff --git a/src/it/projects/mdep-739-go-offline-respect-classifiers/invoker.properties b/src/it/projects/mdep-739-go-offline-respect-classifiers/invoker.properties
new file mode 100644
index 0000000..e596121
--- /dev/null
+++ b/src/it/projects/mdep-739-go-offline-respect-classifiers/invoker.properties
@@ -0,0 +1,18 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+invoker.goals = ${project.groupId}:${project.artifactId}:${project.version}:go-offline
diff --git a/src/it/projects/mdep-739-go-offline-respect-classifiers/pom.xml b/src/it/projects/mdep-739-go-offline-respect-classifiers/pom.xml
new file mode 100644
index 0000000..5c27c42
--- /dev/null
+++ b/src/it/projects/mdep-739-go-offline-respect-classifiers/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven.plugins.dependency</groupId>
+  <artifactId>mdep-739-go-offline-respect-classifiers</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <description>Test that dependency:go-offline respects classifiers on artifacts</description>
+  <dependencies>
+    <dependency>
+      <groupId>org.springframework.cloud</groupId>
+      <artifactId>spring-cloud-stream</artifactId>
+      <scope>test</scope>
+      <type>test-jar</type>
+      <classifier>test-binder</classifier>
+      <version>3.1.2</version>
+    </dependency>
+  </dependencies>
+</project>
diff --git a/src/it/projects/mdep-739-go-offline-respect-classifiers/verify.groovy b/src/it/projects/mdep-739-go-offline-respect-classifiers/verify.groovy
new file mode 100644
index 0000000..fcc7dc0
--- /dev/null
+++ b/src/it/projects/mdep-739-go-offline-respect-classifiers/verify.groovy
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+File file = new File( basedir, "build.log" );
+assert file.exists();
+
+String buildLog = file.getText( "UTF-8" );
+assert buildLog.contains( 'Resolved dependency: spring-cloud-stream-3.1.2-test-binder.jar' );
+
+return true;
diff --git a/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java b/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
index e0e8b1f..4145b45 100644
--- a/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
+++ b/src/main/java/org/apache/maven/plugins/dependency/resolvers/GoOfflineMojo.java
@@ -187,6 +187,7 @@ public class GoOfflineMojo
         result.setArtifactId( artifact.getArtifactId() );
         result.setVersion( artifact.getVersion() );
         result.setType( artifact.getType() );
+        result.setClassifier( artifact.getClassifier() );
 
         return result;
     }
@@ -198,6 +199,7 @@ public class GoOfflineMojo
         result.setArtifactId( dependency.getArtifactId() );
         result.setVersion( dependency.getVersion() );
         result.setType( dependency.getType() );
+        result.setClassifier( dependency.getClassifier() );
 
         return result;
     }