Generate the default JAR to make oss.sonatype.org happy

Motivation:

oss.sonatype.org refuses to promote an artifact if it doesn't have the
default JAR (the JAR without classifier.)

Modifications:

- Generate both the default JAR and the native JAR to make
  oss.sonatype.org happy
- Rename the profile 'release' to 'restricted-release' which reflects
  what it really does better
- Remove the redundant <quickbuild>true</quickbuild> in all/pom.xml
  We specify the profile 'full' that triggers that property already
  in maven-release-plugin configuration.

Result:

oss.sonatype.org is happy.  Simpler pom.xml
This commit is contained in:
Trustin Lee 2014-05-03 17:28:28 +09:00
parent 550577d4da
commit a74c6b4692
3 changed files with 23 additions and 12 deletions

View File

@ -41,12 +41,6 @@
<quickbuild>false</quickbuild> <quickbuild>false</quickbuild>
</properties> </properties>
</profile> </profile>
<profile>
<id>release</id>
<properties>
<quickbuild>false</quickbuild>
</properties>
</profile>
<profile> <profile>
<id>coverage</id> <id>coverage</id>
<build> <build>

View File

@ -142,7 +142,7 @@
will not run on older distributions. will not run on older distributions.
--> -->
<profile> <profile>
<id>release</id> <id>restricted-release</id>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
@ -626,7 +626,7 @@
<version>2.4.2</version> <version>2.4.2</version>
<configuration> <configuration>
<useReleaseProfile>false</useReleaseProfile> <useReleaseProfile>false</useReleaseProfile>
<arguments>-P release,sonatype-oss-release,full</arguments> <arguments>-P restricted-release,sonatype-oss-release,full</arguments>
<autoVersionSubmodules>true</autoVersionSubmodules> <autoVersionSubmodules>true</autoVersionSubmodules>
<allowTimestampedSnapshots>false</allowTimestampedSnapshots> <allowTimestampedSnapshots>false</allowTimestampedSnapshots>
<tagNameFormat>netty-@{project.version}</tagNameFormat> <tagNameFormat>netty-@{project.version}</tagNameFormat>

View File

@ -82,12 +82,29 @@
</executions> </executions>
</plugin> </plugin>
<!-- Because the generated JAR is platform dependent, use the platform as a classifier. -->
<plugin> <plugin>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<configuration> <executions>
<classifier>${os.detected.classifier}</classifier> <!-- Generate the fallback JAR that does not contain the native library. -->
</configuration> <execution>
<id>default-jar</id>
<configuration>
<excludes>
<exclude>META-INF/native/**</exclude>
</excludes>
</configuration>
</execution>
<!-- Generate the JAR that contains the native library in it. -->
<execution>
<id>native-jar</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<classifier>${os.detected.classifier}</classifier>
</configuration>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>