blob: 6241b8817932a4658ae3e99f1555e937969c6350 [file] [log] [blame]
<?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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling</artifactId>
<version>50-SNAPSHOT</version>
<relativePath>../sling-parent</relativePath>
</parent>
<groupId>org.apache.sling</groupId>
<artifactId>sling-bundle-parent</artifactId>
<packaging>pom</packaging>
<name>Apache Sling (Bundle Parent)</name>
<description>The parent project for Apache Sling bundle modules</description>
<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/sling-parent.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/sling-parent.git</developerConnection>
<url>https://gitbox.apache.org/repos/asf?p=sling-parent.git</url>
<tag>HEAD</tag>
</scm>
<properties>
<bnd.version>6.4.0</bnd.version>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>sling-maven-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<id>bnd-process</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<bnd><![CDATA[
# a lot of bundle header are generated from pom elements by default: https://github.com/bndtools/bnd/tree/master/maven/bnd-maven-plugin#default-bundle-headers
Bundle-Category: sling
# export all versioned packages except for conditional ones (https://github.com/bndtools/bnd/issues/3721#issuecomment-579026778)
-exportcontents: ${removeall;${packages;VERSIONED};${packages;CONDITIONAL}}
# see https://issues.apache.org/jira/browse/SLING-8980
-snapshot: SNAPSHOT
# reproducible builds (https://github.com/bndtools/bnd/issues/3521)
-noextraheaders: true
# we cannot let bnd-maven-plugin generate it automatically, as Maven applies some inheritance logic which is incorrect for Sling (https://issues.apache.org/jira/browse/SLING-8537)
Bundle-DocURL: https://sling.apache.org
# generate error (instead of warning) when exported package uses private (non-exported) reference
-fixupmessages:"Export *, has \\d+, private references"; \
restrict:=warning; \
is:=error
]]></bnd>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<includeDistributionManagement>false</includeDistributionManagement>
<diffignores>
<!-- ignore Bundle-Version header for baseline, i.e. no enforcement of specific bundle versions -->
<diffignore>Bundle-Version</diffignore>
</diffignores>
</configuration>
<executions>
<execution>
<id>bnd-baseline</id>
<goals>
<goal>baseline</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>ban-plugins-and-dependencies</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<bannedPlugins>
<excludes>
<exclude>org.apache.felix:maven-scr-plugin</exclude>
</excludes>
<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>
<bannedDependencies>
<excludes>
<exclude>org.apache.felix:org.apache.felix.scr.annotations</exclude>
</excludes>
<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>
<bannedPlugins>
<excludes>
<exclude>org.apache.felix:maven-bundle-plugin</exclude>
</excludes>
<message>The maven-bundle-plugin is no longer supported - please migrate to bnd-maven-plugin or stick
with Sling Parent 34.</message>
</bannedPlugins>
<bannedPlugins>
<excludes>
<exclude>org.apache.sling:maven-sling-plugin</exclude>
</excludes>
<message>Please change all occurrences of maven-sling-plugin to sling-maven-plugin (plugin was renamed).</message>
</bannedPlugins>
<bannedDependencies>
<excludes>
<exclude>org.osgi:osgi.core</exclude>
<exclude>org.osgi:osgi.cmpn</exclude>
</excludes>
<message>Use the individual OSGi chapter dependencies instead of the aggregate ones. Further infos at http://docs.osgi.org/artifacts/#aggregate-artifacts.</message>
</bannedDependencies>
<bannedDependencies>
<searchTransitive>false</searchTransitive>
<excludes>
<exclude>org.osgi:org.osgi.annotation.versioning:*:*:compile</exclude>
<exclude>org.osgi:org.osgi.annotation.bundle:*:*:compile</exclude>
<exclude>org.osgi:org.osgi.service.component.annotations:*:*:compile</exclude>
<exclude>org.osgi:org.osgi.service.metatype.annotations:*:*:compile</exclude>
<exclude>org.apache.sling:org.apache.sling.servlets.annotations:*:*:compile</exclude>
</excludes>
<message>The annotation dependencies should be used with scope provided to prevent transitive inheritance and to prevent runtime inclusion</message>
</bannedDependencies>
</rules>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-baseline-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!--
Use this profile to install the OSGi bundle
automatically, during development
-->
<id>autoInstallBundle</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>sling-maven-plugin</artifactId>
<executions>
<execution>
<id>install-bundle</id>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencyManagement>
<!-- OSGi -->
<dependencies>
<!-- Aggregates (rather use individual artifacts referenced below) -->
<!-- Core R7 -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<version>7.0.0</version>
</dependency>
<!-- Compendium R7 -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
<version>7.0.0</version>
</dependency>
<!-- individual OSGi spec API artifacts (preferred) -->
<!-- Framework 1.9, Core R7 (https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/framework/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.framework</artifactId>
<version>1.9.0</version>
</dependency>
<!-- Tracker 1.5, Core R7 (https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/util/tracker/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.tracker</artifactId>
<version>1.5.4</version>
</dependency>
<!-- Data Transfer Object 1.1, Core R7 (https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/dto/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.dto</artifactId>
<version>1.1.1</version>
</dependency>
<!-- URL Handlers 1.0, Core R7 (https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/service/url/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.url</artifactId>
<version>1.0.1</version>
</dependency>
<!-- Resource API 1.0, Core R7 (https://docs.osgi.org/javadoc/osgi.core/7.0.0/org/osgi/resource/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.resource</artifactId>
<version>1.0.1</version>
</dependency>
<!-- Configuration Admin 1.6, Compendium R7 (https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/cm/package-frame.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.cm</artifactId>
<version>1.6.1</version>
</dependency>
<!-- Service Component 1.4, Compendium R7 (https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/component/package-frame.html) -->
<!-- and component property types (https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/component/propertytypes/package-frame.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component</artifactId>
<version>1.4.0</version>
</dependency>
<!-- Event Admin 1.4, Compendium R7 (https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/event/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.event</artifactId>
<version>1.4.1</version>
</dependency>
<!-- HTTP Service 1.2, Compendium R7 (https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/http/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.http</artifactId>
<version>1.2.2</version>
</dependency>
<!-- HTTP Whiteboard 1.1, Compendium R7 (https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/http/context/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.http.whiteboard</artifactId>
<version>1.1.1</version>
</dependency>
<!-- Log Service 1.4, Compendium R7 (https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/log/package-summary.html) -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.log</artifactId>
<version>1.4.0</version>
</dependency>
<!-- OSGi Common Namespaces (OSGi R7 Compendium, http://docs.osgi.org/specification/osgi.cmpn/7.0.0/service.namespaces.html) -->
<!-- https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/namespace/contract/package-summary.html -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.namespace.contract</artifactId>
<version>1.0.0</version>
</dependency>
<!-- https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/namespace/extender/package-summary.html -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.namespace.extender</artifactId>
<version>1.0.1</version>
</dependency>
<!-- https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/namespace/implementation/package-summary.html -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.namespace.implementation</artifactId>
<version>1.0.0</version>
</dependency>
<!-- https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/namespace/service/package-summary.html -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.namespace.service</artifactId>
<version>1.0.0</version>
</dependency>
<!-- https://docs.osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/namespace/unresolvable/package-summary.html -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.namespace.unresolvable</artifactId>
<version>1.0.0</version>
</dependency>
<!-- 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>
<version>1.1.2</version>
</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>
<version>1.0.0</version>
</dependency>
<!-- https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/component/annotations/package-frame.html -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
<version>1.4.0</version>
</dependency>
<!-- https://osgi.org/javadoc/osgi.cmpn/7.0.0/org/osgi/service/metatype/annotations/package-frame.html -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.metatype.annotations</artifactId>
<version>1.4.1</version>
</dependency>
<!-- https://sling.apache.org/apidocs/sling11/org/apache/sling/servlets/annotations/package-summary.html -->
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlets.annotations</artifactId>
<version>1.2.6</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>