]> source.dussan.org Git - aspectj.git/commitdiff
Fix selective Nexus deployment to Sonatype OSSRH
authorAlexander Kriegisch <Alexander@Kriegisch.name>
Sat, 15 May 2021 10:34:15 +0000 (17:34 +0700)
committerAlexander Kriegisch <Alexander@Kriegisch.name>
Sun, 16 May 2021 00:05:28 +0000 (07:05 +0700)
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>
asm-renamed/pom.xml
aspectjmatcher/pom.xml
aspectjrt/pom.xml
aspectjtools/pom.xml
aspectjweaver/pom.xml
pom.xml

index e62b985655e86527489ba4cfdf82cc383486dae9..6a7b479b4c63cb26e22cb0d30995f4c2cf8dfde5 100644 (file)
         </executions>
       </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>
   </build>
 
index ff456caa18d48d6e011da53335678801307b2e8d..6dd9428097769c9c515c2dfdf55f16d1174d1589 100644 (file)
                                </executions>
                        </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>
        </build>
 
index c674b36017bf7aca40d2905e63678176dd6cae11..bc5e36e59f618bb636fdf6793d0bdfdff5e4822f 100644 (file)
                                </executions>
                        </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>
        </build>
 
index 03bb6ed96a847fb07c55e98527983ab04cc59065..78b8539f53b2b9c8283d8a6ad98868d91874aec1 100644 (file)
                                        </execution>
                                </executions>
                        </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>
 
        </build>
index 4db51b332789dd1b5f269d943dce840232f350fd..5e4ec2e40456b629ec1261fd368c0ad7fc9433e4 100644 (file)
                                </executions>
                        </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>
        </build>
 
diff --git a/pom.xml b/pom.xml
index 8e1405f64f29a28d307c99a3ac31c077ab3d361b..9ea49b1913f22495c212e791d8d69a7bb155b9e5 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -19,7 +19,7 @@
 
                <!-- By default, do not deploy artifacts - override for the ones which actually should be deployed -->
                <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>
 
                <!-- Dependency versions -->
                <profile>
                        <id>release</id>
                        <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>
                        </properties>
                        <build>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-gpg-plugin</artifactId>
                                        </plugin>
-                                       <plugin>
-                                               <groupId>org.sonatype.plugins</groupId>
-                                               <artifactId>nexus-staging-maven-plugin</artifactId>
-                                       </plugin>
                                </plugins>
                        </build>
                </profile>
                                        </configuration>
                                </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>
                                        <artifactId>nexus-staging-maven-plugin</artifactId>
                                        <version>1.6.8</version>
                                                <serverId>ossrh</serverId>
                                                <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                                                <autoReleaseAfterClose>false</autoReleaseAfterClose>
-                                               <!-- Only stage artifacts to which are also meant to be deployed -->
-                                               <skipStaging>${maven.deploy.skip}</skipStaging>
                                        </configuration>
                                </plugin>
                                <plugin>