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/02/04 15:26:39 UTC
[sling-org-apache-sling-installer-core] branch master updated:
SLING-8963 update to parent 36
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-org-apache-sling-installer-core.git
The following commit(s) were added to refs/heads/master by this push:
new 25f60a2 SLING-8963 update to parent 36
new 09224ad Merge branch 'master' of git@github.com:apache/sling-org-apache-sling-installer-core.git
25f60a2 is described below
commit 25f60a28004cf9139963c97705925b306add08f8
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Tue Feb 4 16:26:09 2020 +0100
SLING-8963 update to parent 36
make sure to not export conditional packages
---
bnd.bnd | 10 +++
pom.xml | 83 +++++++++++++---------
.../sling/installer/core/impl/Activator.java | 2 +
3 files changed, 61 insertions(+), 34 deletions(-)
diff --git a/bnd.bnd b/bnd.bnd
new file mode 100644
index 0000000..966ef54
--- /dev/null
+++ b/bnd.bnd
@@ -0,0 +1,10 @@
+-conditionalpackage: org.apache.felix.configurator.impl.*,\
+ org.apache.sling.feature.io.*,\
+ javax.json.*,\
+ org.apache.johnzon.core.*,\
+ org.apache.felix.converter.*,\
+ org.apache.felix.cm.*
+# export all versioned packages except for conditional ones (https://github.com/bndtools/bnd/issues/3721#issuecomment-579026778)
+-exportcontents: ${removeall;${packages;VERSIONED};${packages;CONDITIONAL}}
+Provide-Capability: osgi.service;objectClass:List<String>="org.apache.sling.installer.api.OsgiInstaller,org.apache.sling.installer.api.ResourceChangeListener,org.apache.sling.installer.api.info.InfoProvider,org.apache.sling.installer.api.tasks.RetryHandler",\
+ osgi.service;objectClass:List<String>="org.apache.sling.installer.api.event.InstallationListener,org.apache.sling.installer.api.jmx.InstallerMBean"
diff --git a/pom.xml b/pom.xml
index 34af857..576003d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,14 +23,13 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.sling</groupId>
- <artifactId>sling</artifactId>
- <version>30</version>
+ <artifactId>sling-bundle-parent</artifactId>
+ <version>36</version>
<relativePath/>
</parent>
<artifactId>org.apache.sling.installer.core</artifactId>
<version>3.9.1-SNAPSHOT</version>
- <packaging>bundle</packaging>
<name>Apache Sling Installer</name>
<description>
@@ -40,7 +39,9 @@
<properties>
<sling.java.version>8</sling.java.version>
+ <project.build.outputTimestamp>2020-01-14T08:04:00Z</project.build.outputTimestamp>
</properties>
+
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-core.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-org-apache-sling-installer-core.git</developerConnection>
@@ -48,33 +49,14 @@
<tag>HEAD</tag>
</scm>
- <build>
+<build>
<plugins>
<plugin>
- <groupId>org.apache.felix</groupId>
- <artifactId>maven-bundle-plugin</artifactId>
- <extensions>true</extensions>
+ <groupId>biz.aQute.bnd</groupId>
+ <artifactId>bnd-baseline-maven-plugin</artifactId>
<configuration>
- <instructions>
- <Bundle-Activator>
- org.apache.sling.installer.core.impl.Activator
- </Bundle-Activator>
- <Conditional-Package>
- org.apache.felix.configurator.impl.json,
- org.apache.felix.configurator.impl.model,
- org.apache.sling.feature.io,
- </Conditional-Package>
- <Embed-Dependency>
- org.apache.sling.commons.johnzon,
- org.apache.felix.converter,
- org.apache.felix.configadmin;inline="org/apache/felix/cm/file/ConfigurationHandler.*",
- org.apache.sling.commons.osgi;inline="org/apache/sling/commons/osgi/ManifestHeader*.*|org/apache/sling/commons/osgi/PropertiesUtil.*|org/apache/sling/commons/osgi/SortingServiceTracker.*"
- </Embed-Dependency>
- <Provide-Capability><![CDATA[
- osgi.service;objectClass:List<String>="org.apache.sling.installer.api.OsgiInstaller,org.apache.sling.installer.api.ResourceChangeListener,org.apache.sling.installer.api.info.InfoProvider,org.apache.sling.installer.api.tasks.RetryHandler",
- osgi.service;objectClass:List<String>="org.apache.sling.installer.api.event.InstallationListener,org.apache.sling.installer.api.jmx.InstallerMBean"
- ]]></Provide-Capability>
- </instructions>
+ <!-- temporarily continue on error due to https://github.com/bndtools/bnd/issues/3705, caused by switch from Java 7 -> Java 8 -->
+ <continueOnError>true</continueOnError>
</configuration>
</plugin>
<plugin>
@@ -143,9 +125,42 @@
</build>
<dependencies>
+ <!-- OSGi annotations (OSGi R7) -->
+ <!-- https://osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/versioning/package-frame.html -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.versioning</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <!-- https://osgi.org/javadoc/osgi.annotation/7.0.0/org/osgi/annotation/bundle/package-frame.html -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.annotation.bundle</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <!-- OSGi framework 1.8, Core R6 (https://osgi.org/javadoc/r6/core/org/osgi/framework/package-summary.html) -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.framework</artifactId>
+ <scope>provided</scope>
+ </dependency>
<dependency>
<groupId>org.osgi</groupId>
- <artifactId>osgi.core</artifactId>
+ <artifactId>org.osgi.service.startlevel</artifactId>
+ <version>1.1.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.url</artifactId>
+ <version>1.0.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.service.packageadmin</artifactId>
+ <version>1.2.0</version>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -154,39 +169,39 @@
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
- <version>16.0.2</version>
<scope>provided</scope>
</dependency>
+ <!-- all compile scope dependencies are embedded -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.commons.osgi</artifactId>
<version>2.2.0</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<!-- We use a class from the config admin implementation to read config files -->
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>1.8.12</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<!-- We use classes from the configurator, json api, converter and feature.io to read/write JSON config files -->
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configurator</artifactId>
<version>1.0.10</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.converter</artifactId>
<version>1.0.8</version>
- <scope>provided</scope>
+ <scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.feature.io</artifactId>
- <version>1.1.1-SNAPSHOT</version>
+ <version>1.2.0</version>
<scope>compile</scope>
</dependency>
<dependency>
diff --git a/src/main/java/org/apache/sling/installer/core/impl/Activator.java b/src/main/java/org/apache/sling/installer/core/impl/Activator.java
index 99c9ec8..b0db93b 100644
--- a/src/main/java/org/apache/sling/installer/core/impl/Activator.java
+++ b/src/main/java/org/apache/sling/installer/core/impl/Activator.java
@@ -35,6 +35,7 @@ import org.apache.sling.installer.api.tasks.InstallTaskFactory;
import org.apache.sling.installer.api.tasks.ResourceTransformer;
import org.apache.sling.installer.api.tasks.RetryHandler;
import org.apache.sling.installer.core.impl.tasks.BundleTaskCreator;
+import org.osgi.annotation.bundle.Header;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Constants;
@@ -44,6 +45,7 @@ import org.osgi.framework.ServiceRegistration;
* The activator sets up the logging and registers the
* OSGi installer service.
*/
+@Header(name = Constants.BUNDLE_ACTIVATOR, value = "${@class}")
public class Activator implements BundleActivator {
/** Vendor of all registered services. */