Add uber-staging and uber-snapshot profile that can be used to generate uber all jars.

Motivation:

As we now include native code for multiple platforms we need to generate an uber all jar before release it from the staging repository. For this the uber-staging profile can be used. To create a snapshot uber jar the uber-snapshot profile can be used.

Modifications:

- Add uber-staging and uber-snapshot profile
- Correct comment in pom.xml file to show usage.

Result:

Easier to create snapshot and release uber jars.
This commit is contained in:
Norman Maurer 2017-05-12 08:02:58 +02:00
parent d88cd23bfc
commit 827c409656
3 changed files with 50 additions and 4 deletions

View File

@ -36,7 +36,7 @@
<profiles> <profiles>
<!-- If the uber profile is used it will automatically fetch the missing native jar from maven and add it to the all jar as well. --> <!-- If the uber profile is used it will automatically fetch the missing native jar from maven and add it to the all jar as well. -->
<profile> <profile>
<id>uber</id> <id>uber-staging</id>
<repositories> <repositories>
<repository> <repository>
<id>staged-releases</id> <id>staged-releases</id>
@ -66,6 +66,30 @@
</dependency> </dependency>
</dependencies> </dependencies>
</profile> </profile>
<profile>
<id>uber-snapshot</id>
<dependencies>
<!-- Depend on all our native jars -->
<!-- As this is executed on either macOS or Linux we directly need to specify the classifier -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${project.version}</version>
<classifier>linux-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${project.version}</version>
<classifier>osx-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<!-- The linux profile will only include the native jar for epol to the all jar. <!-- The linux profile will only include the native jar for epol to the all jar.
If you want to also include the native jar for kqueue use -Puber. If you want to also include the native jar for kqueue use -Puber.

View File

@ -919,8 +919,8 @@
<retryFailedDeploymentCount>10</retryFailedDeploymentCount> <retryFailedDeploymentCount>10</retryFailedDeploymentCount>
</configuration> </configuration>
</plugin> </plugin>
<!-- After artifacts were deployed from linux and macos we need to execute the following for this module: <!-- After artifacts were deployed from linux and macos we need to execute the following on macOS (in the root of the project).
mvn -Psonatype-oss-release,full,uber clean package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DstagingRepositoryId=${netty-id} -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging mvn -Psonatype-oss-release,full,uber-staging -pl transport-native-kqueue,transport-native-unix-common,all,tarball clean package gpg:sign org.sonatype.plugins:nexus-staging-maven-plugin:deploy -DstagingRepositoryId=${netty-id} -DnexusUrl=https://oss.sonatype.org -DserverId=sonatype-nexus-staging
--> -->
<plugin> <plugin>
<artifactId>maven-release-plugin</artifactId> <artifactId>maven-release-plugin</artifactId>

View File

@ -96,7 +96,7 @@
<profiles> <profiles>
<!-- If the uber profile is used it will automatically fetch the missing native jar from maven and add it to the all jar as well. --> <!-- If the uber profile is used it will automatically fetch the missing native jar from maven and add it to the all jar as well. -->
<profile> <profile>
<id>uber</id> <id>uber-staging</id>
<repositories> <repositories>
<repository> <repository>
<id>staged-releases</id> <id>staged-releases</id>
@ -125,6 +125,28 @@
</dependency> </dependency>
</dependencies> </dependencies>
</profile> </profile>
<profile>
<id>uber-snapshot</id>
<dependencies>
<!-- Depend on all our native jars -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>${project.version}</version>
<classifier>linux-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>netty-transport-native-kqueue</artifactId>
<version>${project.version}</version>
<classifier>osx-x86_64</classifier>
<scope>compile</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
<profile> <profile>
<id>full</id> <id>full</id>