Skip to content

Commit

Permalink
FELIX-5820 : Update parent pom
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1828318 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cziegeler committed Apr 4, 2018
1 parent acb3b23 commit 9676863
Showing 1 changed file with 101 additions and 134 deletions.
235 changes: 101 additions & 134 deletions pom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,34 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>17</version>
<version>19</version>
<relativePath />
</parent>

<groupId>org.apache.felix</groupId>
<artifactId>felix-parent</artifactId>
<packaging>pom</packaging>

<name>Apache Felix</name>
<version>5-SNAPSHOT</version>
<url>http://felix.apache.org/</url>
<inceptionYear>2006</inceptionYear>
<description>Apache Felix is a community effort to implement the OSGi Framework and Service platform and other interesting OSGi-related technologies.</description>

<prerequisites>
<maven>3.0.5</maven>
<maven>3.5.0</maven>
</prerequisites>

<properties>
<sourceReleaseAssemblyDescriptor>source-release-zip-tar</sourceReleaseAssemblyDescriptor>

<!-- Default Java VM and API compatibility -->
<felix.java.version>5</felix.java.version>
<felix.java.signature.groupId>org.codehaus.mojo.signature</felix.java.signature.groupId>
<felix.java.version>7</felix.java.version>

<!-- Default settings for the site plugins -->
<site.javadoc.exclude>*.impl:*.internal:</site.javadoc.exclude>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>

<issueManagement>
Expand Down Expand Up @@ -99,51 +101,18 @@
</pluginRepository>
</pluginRepositories>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.10.19</version>
</dependency>
</dependencies>
</dependencyManagement>

<!-- definitions for testing -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easymock</groupId>
<artifactId>easymock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.8</version>
<version>2.9</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -158,46 +127,25 @@
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.11</version>
<version>0.12</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<version>2.10.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.14</version>
<configuration>
<version>1.15</version>
<configuration>
<signature>
<groupId>${felix.java.signature.groupId}</groupId>
<artifactId>${felix.java.signature.artifactId}</artifactId>
<version>${felix.java.signature.version}</version>
<groupId>org.codehaus.mojo.signature</groupId>
<artifactId>java1${felix.java.version}</artifactId>
<version>1.0</version>
</signature>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<dependencies>
<!-- declare dependencies here rather than where needed to
circumvent http://jira.codehaus.org/browse/MANTRUN-51
-->
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-apache-regexp</artifactId>
<version>1.7.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jakarta-regexp</groupId>
<artifactId>jakarta-regexp</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand All @@ -213,54 +161,41 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<artifactId>maven-enforcer-plugin</artifactId>
<executions>
<execution>
<id>enforce-property-values</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireProperty>
<property>felix.java.version</property>
<regex>[6-9]</regex>
<regexMessage>The property "felix.java.version" may only have one of the following values: 6, 7, 8 or 9.</regexMessage>
</requireProperty>
</rules>
</configuration>
</execution>
<execution>
<id>set-bundle-required-execution-environment</id>
<id>enforce-java</id>
<goals>
<goal>run</goal>
<goal>enforce</goal>
</goals>
<phase>initialize</phase>
<configuration>
<exportAntProperties>true</exportAntProperties>
<target>
<script language="javascript"> <![CDATA[
var System = java.lang.System;
var skipAnimalSniffer = false;
var animalSnifferSignaturesVersion = "1.0";
var animalSnifferSignaturesArtifactId = "java13-sun";
var felixJavaVersion = System.getProperty("felix.java.version");
if (!felixJavaVersion) {
felixJavaVersion = project.getProperty("felix.java.version");
}
if (felixJavaVersion == "4") {
animalSnifferSignaturesArtifactId = "java14-sun";
} else if (felixJavaVersion == "5") {
animalSnifferSignaturesArtifactId = "java15";
} else if (felixJavaVersion == "6") {
animalSnifferSignaturesArtifactId = "java16";
animalSnifferSignaturesVersion = "1.1";
} else if (felixJavaVersion == "7") {
animalSnifferSignaturesArtifactId = "java17";
} else if ( felixJavaVersion == "8") {
// there are no published signatures for Java 1.8, so skip execution. However, we also need a valid
// artifact in the signature, so fallback to the 1.7 signatures and skip checking entirely
// see also https://github.com/mojohaus/animal-sniffer/issues/1
animalSnifferSignaturesArtifactId = "java17";
skipAnimalSniffer = true;
} else if ( felixJavaVersion != "3") {
System.out.println("Unsupported felix.java.version=" + felixJavaVersion + "; must be 3, 4, 5, 6, 7 or 8.");
throw "felix.java.version must be 3, 4, 5, 6, 7 or 8";
}
System.out.println("Using felix.java.version=" + felixJavaVersion);
project.setProperty("felix.bree", "JavaSE-1." + felixJavaVersion);
project.setProperty("felix.animal.sniffer.skip", skipAnimalSniffer);
project.setProperty("felix.java.signature.version", animalSnifferSignaturesVersion);
project.setProperty("felix.java.signature.artifactId", animalSnifferSignaturesArtifactId);
]]></script>
</target>
<rules>
<!-- Require Java 7 or higher for building (as bnd since version 3.0 is built with Java 7) -->
<requireJavaVersion>
<message>
Apache Felix must be compiled with Java 7 or higher
</message>
<version>1.7.0</version>
</requireJavaVersion>
<requireMavenVersion>
<version>3.5.0</version>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
Expand All @@ -272,14 +207,6 @@
<excludePackageNames>${site.javadoc.exclude}</excludePackageNames>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.${felix.java.version}</source>
<target>1.${felix.java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
Expand All @@ -303,18 +230,6 @@
<exclude>**/*.json</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -360,6 +275,58 @@
</build>

<profiles>
<profile>
<id>jdk8-or-lower</id>
<activation>
<!-- syntax according to http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html -->
<jdk>(,9)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.${felix.java.version}</source>
<target>1.${felix.java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>jdk9-or-higher</id>
<activation>
<!-- syntax according to http://maven.apache.org/enforcer/enforcer-rules/versionRanges.html -->
<jdk>[9,)</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<!--
release sets API classpath, source and target, see
https://docs.oracle.com/javase/9/tools/javac.htm#GUID-AEEC9F07-CB49-4E96-8BC7-BCC2C7F725C9__GUID-D343F6B4-3FDD-43A8-AD24-43DD70214471
and http://openjdk.java.net/jeps/247 -->
<release>${felix.java.version}</release>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
<profile>
<id>only-eclipse</id>
Expand Down

0 comments on commit 9676863

Please sign in to comment.