Skip to content

Commit

Permalink
Add uber-staging and uber-snapshot profile that can be used to genera…
Browse files Browse the repository at this point in the history
…te 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.
  • Loading branch information
normanmaurer committed May 16, 2017
1 parent d88cd23 commit 827c409
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
26 changes: 25 additions & 1 deletion all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<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. -->
<profile>
<id>uber</id>
<id>uber-staging</id>
<repositories>
<repository>
<id>staged-releases</id>
Expand Down Expand Up @@ -66,6 +66,30 @@
</dependency>
</dependencies>
</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.
If you want to also include the native jar for kqueue use -Puber.
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -919,8 +919,8 @@
<retryFailedDeploymentCount>10</retryFailedDeploymentCount>
</configuration>
</plugin>
<!-- After artifacts were deployed from linux and macos we need to execute the following for this module:
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
<!-- 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-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>
<artifactId>maven-release-plugin</artifactId>
Expand Down
24 changes: 23 additions & 1 deletion tarball/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
<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. -->
<profile>
<id>uber</id>
<id>uber-staging</id>
<repositories>
<repository>
<id>staged-releases</id>
Expand Down Expand Up @@ -125,6 +125,28 @@
</dependency>
</dependencies>
</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>
<id>full</id>
Expand Down

0 comments on commit 827c409

Please sign in to comment.