Browse Source

Fix selective Nexus deployment to Sonatype OSSRH

Other than Maven Deploy, Nexus Staging plugin cannot just be added to
the 'build/plugins' section of the parent POM once and (de-)activated
with a simple property like 'maven.deploy.skip' on a per-module basis.
See also https://issues.sonatype.org/browse/OSSRH-68966. Consequently,
we do not add it to the parent but separately to each module meant to be
published.

Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
tags/V1_9_7_M2
Alexander Kriegisch 3 years ago
parent
commit
fcb563dee0
6 changed files with 39 additions and 8 deletions
  1. 6
    0
      asm-renamed/pom.xml
  2. 6
    0
      aspectjmatcher/pom.xml
  3. 6
    0
      aspectjrt/pom.xml
  4. 7
    0
      aspectjtools/pom.xml
  5. 6
    0
      aspectjweaver/pom.xml
  6. 8
    8
      pom.xml

+ 6
- 0
asm-renamed/pom.xml View File

</executions> </executions>
</plugin> </plugin>


<!-- Deploy this module to Nexus (Sonatype OSSRH, releases promotable to Maven Central) -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>

</plugins> </plugins>
</build> </build>



+ 6
- 0
aspectjmatcher/pom.xml View File

</executions> </executions>
</plugin> </plugin>


<!-- Deploy this module to Nexus (Sonatype OSSRH, releases promotable to Maven Central) -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>

</plugins> </plugins>
</build> </build>



+ 6
- 0
aspectjrt/pom.xml View File

</executions> </executions>
</plugin> </plugin>


<!-- Deploy this module to Nexus (Sonatype OSSRH, releases promotable to Maven Central) -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>

</plugins> </plugins>
</build> </build>



+ 7
- 0
aspectjtools/pom.xml View File

</execution> </execution>
</executions> </executions>
</plugin> </plugin>

<!-- Deploy this module to Nexus (Sonatype OSSRH, releases promotable to Maven Central) -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>

</plugins> </plugins>


</build> </build>

+ 6
- 0
aspectjweaver/pom.xml View File

</executions> </executions>
</plugin> </plugin>


<!-- Deploy this module to Nexus (Sonatype OSSRH, releases promotable to Maven Central) -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>

</plugins> </plugins>
</build> </build>



+ 8
- 8
pom.xml View File



<!-- By default, do not deploy artifacts - override for the ones which actually should be deployed --> <!-- By default, do not deploy artifacts - override for the ones which actually should be deployed -->
<maven.deploy.skip>true</maven.deploy.skip> <maven.deploy.skip>true</maven.deploy.skip>
<!-- By default, do create javadoc - override in release profile or manually -->
<!-- By default, do not create javadoc - override in release profile or manually -->
<maven.javadoc.skip>true</maven.javadoc.skip> <maven.javadoc.skip>true</maven.javadoc.skip>


<!-- Dependency versions --> <!-- Dependency versions -->
<profile> <profile>
<id>release</id> <id>release</id>
<properties> <properties>
<!-- By default, do create javadoc - override in release profile -->
<!-- By default, do not create javadoc - override in release profile -->
<maven.javadoc.skip>false</maven.javadoc.skip> <maven.javadoc.skip>false</maven.javadoc.skip>
</properties> </properties>
<build> <build>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId> <artifactId>maven-gpg-plugin</artifactId>
</plugin> </plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
</plugin>
</plugins> </plugins>
</build> </build>
</profile> </profile>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<!--
Other than Maven Deploy, this plugin cannot just be added to the 'build/plugins' section of the parent POM
once and (de-)activated with a simple property like 'maven.deploy.skip' on a per-module basis. See also
https://issues.sonatype.org/browse/OSSRH-68966. Consequently, we do not add it to the parent but separately
to each module meant to be published.
-->
<groupId>org.sonatype.plugins</groupId> <groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId> <artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version> <version>1.6.8</version>
<serverId>ossrh</serverId> <serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl> <nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose> <autoReleaseAfterClose>false</autoReleaseAfterClose>
<!-- Only stage artifacts to which are also meant to be deployed -->
<skipStaging>${maven.deploy.skip}</skipStaging>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>

Loading…
Cancel
Save