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 2022/06/09 08:11:25 UTC

[sling-org-apache-sling-feature-cpconverter] branch feature/enforce-complete-runtime-classpath created (now cb72f20)

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

kwin pushed a change to branch feature/enforce-complete-runtime-classpath
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git


      at cb72f20  SLING-11396 enforce complete runtime classpath

This branch includes the following new commits:

     new cb72f20  SLING-11396 enforce complete runtime classpath

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.



[sling-org-apache-sling-feature-cpconverter] 01/01: SLING-11396 enforce complete runtime classpath

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

kwin pushed a commit to branch feature/enforce-complete-runtime-classpath
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-cpconverter.git

commit cb72f2077c2a0bdb39ef2bca01af470da11cfa52
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Jun 9 10:11:20 2022 +0200

    SLING-11396 enforce complete runtime classpath
    
    WIP
---
 pom.xml | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

diff --git a/pom.xml b/pom.xml
index 5effb2e..ab656d6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -412,6 +412,45 @@
           </execution>
         </executions>
       </plugin>
+      <!-- validate that all necessary dependencies are part of the application -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-enforcer-plugin</artifactId>
+        <dependencies>
+          <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>maven-enforcer-rules</artifactId>
+            <version>0.0.1-SNAPSHOT</version>
+          </dependency>
+        </dependencies>
+        <executions>
+          <execution>
+            <id>enforce-complete-runtime-classpath</id>
+            <goals>
+              <goal>enforce</goal>
+            </goals>
+            <configuration>
+              <rules>
+                <requireProvidedDependenciesInRuntimeClasspath
+                    implementation="org.apache.sling.maven.enforcer.RequireProvidedDependenciesInRuntimeClasspath">
+                  <excludes>
+                    <exclude>javax.servlet:javax.servlet-api</exclude><!-- not used in the CLI context -->
+                    <exclude>javax.servlet:servlet-api</exclude><!-- not used in the CLI context -->
+                    <exclude>org.apache.felix:org.apache.felix.scr.annotations</exclude><!-- annotations not used at run time -->
+                    <exclude>org.jetbrains:annotations</exclude>
+                    <exclude>org.apache.felix:org.apache.felix.healthcheck.annotation</exclude>
+                    <exclude>org.osgi:org.osgi.service.component.annotations</exclude>
+                    <exclude>org.osgi:org.osgi.annotation</exclude>
+                    <exclude>org.osgi:osgi.annotation</exclude>
+                    <exclude>org.osgi:org.osgi.annotation.bundle</exclude>
+                  </excludes>
+                </requireProvidedDependenciesInRuntimeClasspath>
+              </rules>
+              <fail>true</fail>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
     </plugins>
   </build>