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 2021/07/14 13:13:23 UTC

[maven-enforcer] branch master updated: [MENFORCER-168] In a multi module project "bannedDependencies" rule tries to resolve project artifacts from external repository

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e10ed74  [MENFORCER-168] In a multi module project "bannedDependencies" rule tries to resolve project artifacts from external repository
e10ed74 is described below

commit e10ed7480e4671758fdacc75dd25e265ab849284
Author: Conny Kreyßel <de...@kreyssel.org>
AuthorDate: Wed Jul 14 15:12:23 2021 +0200

    [MENFORCER-168] In a multi module project "bannedDependencies" rule tries to resolve project artifacts from external repository
    
    Signed-off-by: rfscholte <rf...@apache.org>
---
 .../banned-dependencies-multi-module/mod1/pom.xml  | 36 +++++++++++
 .../banned-dependencies-multi-module/mod2/pom.xml  | 43 +++++++++++++
 .../banned-dependencies-multi-module/pom.xml       | 74 ++++++++++++++++++++++
 3 files changed, 153 insertions(+)

diff --git a/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/mod1/pom.xml b/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/mod1/pom.xml
new file mode 100644
index 0000000..6c62197
--- /dev/null
+++ b/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/mod1/pom.xml
@@ -0,0 +1,36 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+  	<groupId>org.apache.maven.its.enforcer</groupId>
+    <artifactId>test-multimodule-project</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>test-multimodule-mod1</artifactId>
+
+  <description>
+  </description>
+
+</project>
diff --git a/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/mod2/pom.xml b/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/mod2/pom.xml
new file mode 100644
index 0000000..5ab97a2
--- /dev/null
+++ b/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/mod2/pom.xml
@@ -0,0 +1,43 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+  	<groupId>org.apache.maven.its.enforcer</groupId>
+    <artifactId>test-multimodule-project</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>test-multimodule-mod2</artifactId>
+
+  <description>
+  </description>
+  
+  <dependencies>
+  	<dependency>
+ 	  <groupId>${project.groupId}</groupId>
+	  <artifactId>test-multimodule-mod1</artifactId>
+  	</dependency>
+  </dependencies>
+
+</project>
diff --git a/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/pom.xml b/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/pom.xml
new file mode 100644
index 0000000..228b7e7
--- /dev/null
+++ b/maven-enforcer-plugin/src/it/projects/banned-dependencies-multi-module/pom.xml
@@ -0,0 +1,74 @@
+<?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>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.enforcer</groupId>
+  <artifactId>test-multimodule-project</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <description>
+  </description>
+
+  <modules>
+  	<module>mod1</module>
+  	<module>mod2</module>
+  </modules>
+
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+ 	    <groupId>${project.groupId}</groupId>
+	    <artifactId>test-multimodule-mod1</artifactId>
+	    <version>${project.version}</version>
+  	  </dependency>
+    </dependencies>
+  </dependencyManagement>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <version>@project.version@</version>
+        <executions>
+          <execution>
+            <id>test</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <BannedDependencies>
+                  <excludes>
+                    <exclude>org.apache.maven.plugins.enforcer.its:menforcer72_logging</exclude>
+                  </excludes>
+                </BannedDependencies>
+              </rules>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>