Skip to content
This repository has been archived by the owner on Jun 15, 2023. It is now read-only.

Commit

Permalink
Issue #3: Improve build
Browse files Browse the repository at this point in the history
  • Loading branch information
magnet committed Nov 20, 2017
1 parent f690bd4 commit 427d26a
Showing 1 changed file with 145 additions and 19 deletions.
164 changes: 145 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<bnd.version>3.3.0</bnd.version>
<bnd.baseline.include.distribution.management>false</bnd.baseline.include.distribution.management>
<bnd.version>3.5.0</bnd.version>
<bnd.baseline.fail.on.missing>false</bnd.baseline.fail.on.missing>
<local.index.policy>REQUIRED</local.index.policy>
</properties>

<name>Primeval Parent</name>
Expand All @@ -26,14 +26,6 @@
<url>http://www.primeval.io</url>
</organization>

<developers>
<developer>
<id>magnet</id>
<name>Simon Chemouil</name>
<organization>Lambdacube</organization>
</developer>
</developers>

<licenses>
<license>
<name>Apache License, Version 2.0</name>
Expand All @@ -52,7 +44,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<version>3.7.0</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
Expand All @@ -69,7 +61,15 @@
<bnd><![CDATA[
Bundle-Description: ${project.description}
-plugin: io.primeval.tooling.bnd.dsap.DSAPPlugin
-exportcontents: ${packages;ANNOTATED;org.osgi.annotation.versioning.Version}
# Automatically export any package annotated with @Version in its package-info.java
-exportcontents: ${packages;VERSIONED}
# Force Declarative Services bundles to declare a requirement for DS version 1.3
# even when they only use features from a previous version
-dsannotations-options: extender, inherit
# Allow bundles to use osgi.bnd file to extend configuration
-include: -osgi.bnd
]]></bnd>
</configuration>
Expand Down Expand Up @@ -101,6 +101,54 @@ Bundle-Description: ${project.description}
</execution>
</executions>
</plugin>

<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-indexer-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<includeJar>true</includeJar>
<localURLs>${local.index.policy}</localURLs>
</configuration>
<executions>
<execution>
<id>default-index</id>
<goals>
<goal>index</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-export-maven-plugin</artifactId>
<version>${bnd.version}</version>
<executions>
<execution>
<goals>
<goal>export</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-testing-maven-plugin</artifactId>
<version>${bnd.version}</version>
<configuration>
<resolve>true</resolve>
<failOnChanges>true</failOnChanges>
</configuration>
<executions>
<execution>
<goals>
<goal>testing</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand All @@ -125,16 +173,43 @@ Bundle-Description: ${project.description}
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>


<profiles>
<profile>
<id>bundle</id>
<id>CI_Build</id>
<properties>
<local.index.policy>FORBIDDEN</local.index.policy>
</properties>
</profile>
<profile>
<id>java</id>
<activation>
<file>
<exists>osgi.bnd</exists>
<exists>${basedir}/src/main/java</exists>
</file>
</activation>
<build>
Expand All @@ -149,15 +224,51 @@ Bundle-Description: ${project.description}
</plugin>
</plugins>
</build>
<dependencies>
<!-- OSGi -->
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.cmpn</artifactId>
</dependency>

<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.annotation</artifactId>
</dependency>

<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>java-test</id>
<activation>
<file>
<exists>${basedir}/src/test/java</exists>
</file>
</activation>
<dependencies>
<!-- TEST -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
</dependencies>
</profile>
<profile>
<id>release</id>
<id>sign</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -168,18 +279,32 @@ Bundle-Description: ${project.description}
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy-bundle</id>
<activation>
<property>
<name>deploy</name>
</property>
<file>
<exists>${basedir}/src/main/java</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<executions>
<execution>
<id>generate-javadoc</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
<inherited>false</inherited>
<inherited>true</inherited>
</execution>
</executions>
<configuration>
Expand All @@ -190,7 +315,6 @@ Bundle-Description: ${project.description}
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -205,5 +329,7 @@ Bundle-Description: ${project.description}
</profile>
</profiles>



</project>

0 comments on commit 427d26a

Please sign in to comment.