From a566164b988488a138fd6222ecd7728a4a4a8ae9 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Fri, 2 May 2014 16:31:40 +0900 Subject: [PATCH] Enforce the release is performed only from RHEL 6.5 or equivalent Motivation: Netty must be released from RHEL 6.5 x86_64 or compatible so that: 1) we ship x86_64 version of epoll transport officially, and 2) we ensure the ABI compatibility with older GLIBC versions. The shared library built on a distribution with newer GLIBC will not run on older distributions. Modifications: - When 'release' profile is active, perform an additional check using maven-enforcer-plugin so that 'mvn release:*' fails when running on non-RHEL6.5. This rule is active only when releasing, so a user should not be affected. - Simplify maven-release-plugin configuration by removing redundant profiles such as 'linux'. 'linux' is automatically activated when releasing because we now enforce the release occurs on linux-x86_64. - Remove the no-osgi profile, which is unused - Remove the reference to 'sonatype-oss-release' profile in all/pom.xml, because we always specify 'release' profile when releasing - Rename the profile 'linux-native' to 'linux' for brevity - Upgrade oss-parent and maven-enforcer-plugin Result: No one can make a mistake to release Netty on an environment that can produce incompatible or missing native library. --- all/pom.xml | 8 +----- pom.xml | 70 ++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 65 insertions(+), 13 deletions(-) diff --git a/all/pom.xml b/all/pom.xml index 077f3d5e27..76cd86ff17 100644 --- a/all/pom.xml +++ b/all/pom.xml @@ -41,12 +41,6 @@ false - - sonatype-oss-release - - false - - release @@ -94,7 +88,7 @@ - linux-native + linux linux diff --git a/pom.xml b/pom.xml index 6ecc9efbd8..75e0e91172 100644 --- a/pom.xml +++ b/pom.xml @@ -20,7 +20,7 @@ org.sonatype.oss oss-parent - 7 + 9 io.netty @@ -122,7 +122,7 @@ - linux-native + linux linux @@ -132,6 +132,53 @@ transport-native-epoll + + + release + + + + maven-enforcer-plugin + + + enforce-release-environment + + enforce + + + + + + Release process must be performed on linux-x86_64. + + os.detected.classifier + ^linux-x86_64$ + + + + Release process must be performed on RHEL 6.5 or its derivatives. + + + /etc/redhat-release + + release 6.5 + + + + + + + + + @@ -190,14 +237,14 @@ compile true - + org.eclipse.jetty.npn npn-api 1.1.0.v20120525 - + com.google.protobuf protobuf-java @@ -373,7 +420,6 @@ maven-enforcer-plugin - 1.3 enforce-tools @@ -581,7 +627,7 @@ 2.4.2 false - -P release,sonatype-oss-release,full,no-osgi,linux-native + -P release,sonatype-oss-release,full true false netty-@{project.version} @@ -737,6 +783,18 @@ + + maven-enforcer-plugin + 1.3.1 + + + + com.ceilfors.maven.plugin + enforcer-rules + 1.1.0 + + + maven-surefire-plugin