You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/01/17 09:54:21 UTC

[maven-enforcer] branch MENFORCER-195 updated: [MENFORCER-195] Dependency convergence does not support wildcard exclusions

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

rfscholte pushed a commit to branch MENFORCER-195
in repository https://gitbox.apache.org/repos/asf/maven-enforcer.git


The following commit(s) were added to refs/heads/MENFORCER-195 by this push:
     new c131b7c  [MENFORCER-195] Dependency convergence does not support wildcard exclusions
c131b7c is described below

commit c131b7c4d02657e0979cad7b96413ddae00c161b
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri Jan 17 10:53:55 2020 +0100

    [MENFORCER-195] Dependency convergence does not support wildcard exclusions
---
 .../invoker.properties                             | 19 ++++++
 .../dependencies_converge_exclusions/pom.xml       | 71 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/maven-enforcer-plugin/src/it/projects/dependencies_converge_exclusions/invoker.properties b/maven-enforcer-plugin/src/it/projects/dependencies_converge_exclusions/invoker.properties
new file mode 100644
index 0000000..8e4d03c
--- /dev/null
+++ b/maven-enforcer-plugin/src/it/projects/dependencies_converge_exclusions/invoker.properties
@@ -0,0 +1,19 @@
+# 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.
+
+# With 3.6.2- it succeeds, but probably with the wrong result, with 3.6.3+ it works as expected
+invoker.maven.version = !3.6.2
\ No newline at end of file
diff --git a/maven-enforcer-plugin/src/it/projects/dependencies_converge_exclusions/pom.xml b/maven-enforcer-plugin/src/it/projects/dependencies_converge_exclusions/pom.xml
new file mode 100644
index 0000000..0b34d2d
--- /dev/null
+++ b/maven-enforcer-plugin/src/it/projects/dependencies_converge_exclusions/pom.xml
@@ -0,0 +1,71 @@
+<?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>test</groupId>
+  <artifactId>TestParent</artifactId>
+  <version>1.0</version>
+  <packaging>jar</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.plugins.enforcer.its</groupId>
+      <artifactId>menforcer269_project-higher</artifactId>
+      <version>1.0.0</version>
+      <exclusions>
+        <exclusion>
+          <groupId>com.foo.bar</groupId>
+          <artifactId>*</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.maven.plugins.enforcer.its</groupId>
+          <artifactId>menforcer128_api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugins.enforcer.its</groupId>
+      <artifactId>menforcer128_api</artifactId>
+      <version>1.4.0</version>
+    </dependency>
+  </dependencies>
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <id>enforce</id>
+            <configuration>
+              <rules>
+                <DependencyConvergence/>
+              </rules>
+            </configuration>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>
\ No newline at end of file