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/23 08:50:58 UTC
[sling-org-apache-sling-feature-launcher] branch feature/check-runtime-dependencies created (now 07f5a34)
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a change to branch feature/check-runtime-dependencies
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-launcher.git
at 07f5a34 SLING-11408 Use runtime scope for packaging application
This branch includes the following new commits:
new 07f5a34 SLING-11408 Use runtime scope for packaging application
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-launcher] 01/01: SLING-11408 Use runtime scope for packaging application
Posted by kw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/check-runtime-dependencies
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-feature-launcher.git
commit 07f5a34a05b4f1fd5b55d73b81aba72c56a5488c
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Thu Jun 23 10:24:59 2022 +0200
SLING-11408 Use runtime scope for packaging application
enforce runtime classpath containing all relevant dependencies
---
pom.xml | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 63 insertions(+), 14 deletions(-)
diff --git a/pom.xml b/pom.xml
index 3d34539..feffec2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -142,6 +142,43 @@
</executions>
</plugin>
+ <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>1.0.0</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>org.jetbrains:annotations</exclude><!-- exclude all annotations with class retention -->
+ <exclude>org.osgi:osgi.annotation</exclude>
+ <exclude>org.osgi:org.osgi.annotation.versioning</exclude>
+ <exclude>org.apache.felix:org.apache.felix.converter</exclude><!-- relocated to org.osgi.util.converter -->
+ <exclude>org.apache.johnzon:johnzon-core</exclude><!-- embedded in org.apache.sling.commons.johnzon -->
+ <exclude>org.apache.geronimo.specs:geronimo-json_1.1_spec</exclude><!-- embedded in org.apache.sling.commons.johnzon -->
+ <exclude>org.apache.felix:org.apache.felix.utils</exclude><!-- embedded in org.apache.sling.feature -->
+ <exclude>org.osgi:org.osgi.core</exclude><!-- contained in org.osgi:osgi.core -->
+ </excludes>
+ </requireProvidedDependenciesInRuntimeClasspath>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
@@ -157,7 +194,6 @@
<configuration>
<repositoryLayout>flat</repositoryLayout>
<repositoryName>lib</repositoryName>
- <useWildcardClassPath>true</useWildcardClassPath>
<extraJvmArguments>-Dproject.artifactId=${project.artifactId} -Dproject.version=${project.version} -Dbuild.timestamp=${maven.build.timestamp} -Dfile.encoding=UTF-8</extraJvmArguments>
<licenseHeaderFile>${basedir}/src/main/legal/license-header</licenseHeaderFile>
<programs>
@@ -198,24 +234,24 @@
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.9</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<version>8.0.0</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -226,37 +262,50 @@
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.feature</artifactId>
<version>1.2.30</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.function</artifactId>
<version>1.0.0</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.converter</artifactId>
<version>1.0.9</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.cm.json</artifactId>
<version>1.0.6</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
+ <!-- transitive dependency of org.apache.felix.cm.json -->
<dependency>
- <groupId>commons-cli</groupId>
- <artifactId>commons-cli</artifactId>
- <version>1.4</version>
- <scope>provided</scope>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.configurator</artifactId>
+ <version>1.0.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.4</version>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.johnzon</artifactId>
<version>1.2.14</version>
- <scope>provided</scope>
+ <scope>compile</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<!-- for generating service descriptor files -->
<dependency>