You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by kw...@apache.org on 2020/11/29 17:51:25 UTC

[sling-parent] branch master updated: SLING-9509 merge all enforcer rules into one execution

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

kwin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-parent.git


The following commit(s) were added to refs/heads/master by this push:
     new 76f68a1  SLING-9509 merge all enforcer rules into one execution
76f68a1 is described below

commit 76f68a1510f77f36e83214c73c9a645237c968b9
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Sun Nov 29 18:51:12 2020 +0100

    SLING-9509 merge all enforcer rules into one execution
---
 sling-bundle-parent/pom.xml | 34 ++--------------------------------
 sling-parent/pom.xml        | 23 ++---------------------
 2 files changed, 4 insertions(+), 53 deletions(-)

diff --git a/sling-bundle-parent/pom.xml b/sling-bundle-parent/pom.xml
index c84bb57..91938d3 100644
--- a/sling-bundle-parent/pom.xml
+++ b/sling-bundle-parent/pom.xml
@@ -121,7 +121,7 @@ Bundle-DocURL: https://sling.apache.org
                 <artifactId>maven-enforcer-plugin</artifactId>
                 <executions>
                     <execution>
-                        <id>ban-maven-scr-plugin</id>
+                        <id>ban-plugins-and-dependencies</id>
                         <goals>
                             <goal>enforce</goal>
                         </goals>
@@ -134,16 +134,6 @@ Bundle-DocURL: https://sling.apache.org
                                     <message>Felix SCR annotations and the maven-scr-plugin are no longer supported - please migrate to OSGi
                                         annotations or stick with Sling Parent 29.</message>
                                 </bannedPlugins>
-                            </rules>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>ban-felix-scr-annotations</id>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
                                 <bannedDependencies>
                                     <excludes>
                                         <exclude>org.apache.felix:org.apache.felix.scr.annotations</exclude>
@@ -151,16 +141,6 @@ Bundle-DocURL: https://sling.apache.org
                                     <message>Felix SCR annotations and the maven-scr-plugin are no longer supported - please migrate to OSGi
                                         annotations or stick with Sling Parent 29.</message>
                                 </bannedDependencies>
-                            </rules>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>ban-maven-bundle-plugin</id>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
                                 <bannedPlugins>
                                     <excludes>
                                         <exclude>org.apache.felix:maven-bundle-plugin</exclude>
@@ -168,22 +148,12 @@ Bundle-DocURL: https://sling.apache.org
                                     <message>The maven-bundle-plugin is no longer supported - please migrate to bnd-maven-plugin or stick
                                         with Sling Parent 34.</message>
                                 </bannedPlugins>
-                            </rules>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>ban-maven-sling-plugin</id>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
                                 <bannedPlugins>
                                     <excludes>
                                         <exclude>org.apache.sling:maven-sling-plugin</exclude>
                                     </excludes>
                                     <message>Please change all occurences of maven-sling-plugin to sling-maven-plugin (plugin was renamed).</message>
-                                  </bannedPlugins>
+                                </bannedPlugins>
                             </rules>
                         </configuration>
                     </execution>
diff --git a/sling-parent/pom.xml b/sling-parent/pom.xml
index 241ec75..07aa373 100644
--- a/sling-parent/pom.xml
+++ b/sling-parent/pom.xml
@@ -118,7 +118,8 @@
                 <artifactId>maven-enforcer-plugin</artifactId>
                 <executions>
                      <execution>
-                        <id>enforce-property-values</id>
+                        <!-- override execution id defined in ASF parent (not supported via property yet, https://issues.apache.org/jira/browse/MPOM-247) -->
+                        <id>enforce-maven-version</id>
                         <goals>
                           <goal>enforce</goal>
                         </goals>
@@ -131,30 +132,10 @@
                                         The value of the "sling.java.version" property should comply with the following pattern: ^(8|9|1[0-9])$.
                                     </regexMessage>
                                 </requireProperty>
-                            </rules>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>enforce-java-version</id>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
                                 <requireJavaVersion>
                                     <version>1.8.0</version>
                                     <message>Apache Sling must be compiled with Java 8 or higher.</message>
                                 </requireJavaVersion>
-                            </rules>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>enforce-maven-version</id>
-                        <goals>
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
                                 <requireMavenVersion>
                                     <version>3.3.9</version>
                                 </requireMavenVersion>