java 1.8 default, new source packages in zip format

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/build-utils/maven-parent@148250 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
gabriele.giammatteo 2017-05-03 09:35:27 +00:00
parent a61068c596
commit b41c5dbad7
1 changed files with 127 additions and 48 deletions

141
pom.xml
View File

@ -1,5 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@ -19,9 +19,10 @@
<profiles> <profiles>
<!-- this profile sets an additional parameter for javadoc generation that disable the doclint (it makes
component build fail if formal/syntax errors are found in javadoc comments). <!-- this profile sets an additional parameter for javadoc generation that disable the doclint (it makes
The parameter is only understood by jdk 1.8, so we set it only when jdk 1.8 is used --> component build fail if formal/syntax errors are found in javadoc comments).
The parameter is only understood by jdk 1.8, so we set it only when jdk 1.8 is used -->
<profile> <profile>
<id>disable-java8-doclint</id> <id>disable-java8-doclint</id>
<activation> <activation>
@ -31,9 +32,112 @@
<javadoc.opts>-Xdoclint:none</javadoc.opts> <javadoc.opts>-Xdoclint:none</javadoc.opts>
</properties> </properties>
</profile> </profile>
<profile>
<id>generate-distribution-packages</id>
<activation>
<property>
<name>generateDistribution</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.gcube.tools</groupId>
<artifactId>shared-assemblies</artifactId>
<version>1.1.0</version>
</dependency>
</dependencies>
<executions>
<!-- Disable the execution of the legacy servicearchive. When/If a centralized
generation of binary packages is implemented, this will allow to disable the
execution of the plugin specified in the single pom files -->
<!--
<execution>
<id>servicearchive</id>
<configuration>
<skipAssembly>true</skipAssembly>
</configuration>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
-->
<!-- generation of the source package -->
<execution>
<id>source-package-generation</id>
<configuration>
<descriptorRefs>
<descriptorRef>gcube-source-package</descriptorRef>
</descriptorRefs>
<!--
override the plugin-scope configuration:
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
</descriptors>
If not done, the servicearchive will be built also during
this execution.
-->
<descriptors combine.self="override"></descriptors>
</configuration>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
<!-- TODO: generation of the binary package. Centralized solution. -->
<!--
<execution>
<id>binary-package-generation</id>
<configuration>
<descriptorRefs>
<descriptorRef>shred assembly here</descriptorRef>
</descriptorRefs>
<descriptors combine.self="override"></descriptors>
</configuration>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
-->
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles> </profiles>
<build> <build>
<pluginManagement> <pluginManagement>
@ -122,31 +226,6 @@
<source>${java_version}</source> <source>${java_version}</source>
</configuration> </configuration>
</plugin> </plugin>
<!-- common configuration for the assembly plugin -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.6</version>
<dependencies>
<dependency>
<groupId>org.gcube.tools</groupId>
<artifactId>shared-assemblies</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<executions>
<!-- generation of the source package -->
<execution>
<id>make-source-package</id>
<configuration combine.self="override">
<descriptorRefs>
<descriptorRef>gcube-source-package</descriptorRef>
</descriptorRefs>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</pluginManagement> </pluginManagement>
@ -181,7 +260,7 @@
</executions> </executions>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version> <version>2.1.2</version>
@ -221,7 +300,7 @@
<!-- default value for the distro directory --> <!-- default value for the distro directory -->
<distroDirectory>distro</distroDirectory> <distroDirectory>distro</distroDirectory>
<java_version>1.7</java_version> <java_version>1.8</java_version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.version>3.0.0</maven.version> <maven.version>3.0.0</maven.version>
<snapshots.repository.url.deploy>http://maven.research-infrastructures.eu:8081/nexus/content/repositories/gcube-snapshots</snapshots.repository.url.deploy> <snapshots.repository.url.deploy>http://maven.research-infrastructures.eu:8081/nexus/content/repositories/gcube-snapshots</snapshots.repository.url.deploy>