Skip to content

Commit 31f2148

Browse files
chore: seperate release plugins to a profile (#467)
seperate deploy plugins to a profile Signed-off-by: Kavindu Dodanduwa <[email protected]> Co-authored-by: Justin Abrahms <[email protected]>
1 parent 93dde1d commit 31f2148

File tree

1 file changed

+78
-66
lines changed

1 file changed

+78
-66
lines changed

pom.xml

+78-66
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@
178178

179179
<build>
180180
<plugins>
181-
182181
<plugin>
183182
<groupId>org.codehaus.mojo</groupId>
184183
<artifactId>build-helper-maven-plugin</artifactId>
@@ -343,20 +342,6 @@
343342
</executions>
344343
</plugin>
345344

346-
<!-- Begin publish to maven central -->
347-
<plugin>
348-
<groupId>org.sonatype.plugins</groupId>
349-
<artifactId>nexus-staging-maven-plugin</artifactId>
350-
<version>1.6.13</version>
351-
<extensions>true</extensions>
352-
<configuration>
353-
<serverId>ossrh</serverId>
354-
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
355-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
356-
</configuration>
357-
</plugin>
358-
<!-- End publish to maven central -->
359-
360345
<plugin>
361346
<groupId>org.apache.maven.plugins</groupId>
362347
<artifactId>maven-jar-plugin</artifactId>
@@ -369,56 +354,6 @@
369354
</archive>
370355
</configuration>
371356
</plugin>
372-
<!-- Begin source & javadocs being generated -->
373-
<plugin>
374-
<groupId>org.apache.maven.plugins</groupId>
375-
<artifactId>maven-source-plugin</artifactId>
376-
<version>3.3.0</version>
377-
<executions>
378-
<execution>
379-
<id>attach-sources</id>
380-
<goals>
381-
<goal>jar-no-fork</goal>
382-
</goals>
383-
</execution>
384-
</executions>
385-
</plugin>
386-
387-
<plugin>
388-
<groupId>org.apache.maven.plugins</groupId>
389-
<artifactId>maven-javadoc-plugin</artifactId>
390-
<version>3.5.0</version>
391-
<configuration>
392-
<failOnWarnings>true</failOnWarnings>
393-
<doclint>all,-missing</doclint> <!-- ignore missing javadoc, these are enforced with more customizability in the checkstyle plugin -->
394-
</configuration>
395-
<executions>
396-
<execution>
397-
<id>attach-javadocs</id>
398-
<goals>
399-
<goal>jar</goal>
400-
</goals>
401-
</execution>
402-
</executions>
403-
</plugin>
404-
<!-- end source & javadoc -->
405-
406-
<!-- sign the jars -->
407-
<plugin>
408-
<groupId>org.apache.maven.plugins</groupId>
409-
<artifactId>maven-gpg-plugin</artifactId>
410-
<version>3.1.0</version>
411-
<executions>
412-
<execution>
413-
<id>sign-artifacts</id>
414-
<phase>install</phase>
415-
<goals>
416-
<goal>sign</goal>
417-
</goals>
418-
</execution>
419-
</executions>
420-
</plugin>
421-
<!-- end sign -->
422357

423358
<plugin>
424359
<groupId>org.apache.maven.plugins</groupId>
@@ -496,11 +431,88 @@
496431
</execution>
497432
</executions>
498433
</plugin>
499-
500434
</plugins>
501435
</build>
502436

437+
<!-- Deploy related plugins are isolated so that local development can ignore them -->
503438
<profiles>
439+
<profile>
440+
<id>deploy</id>
441+
<activation>
442+
<activeByDefault>true</activeByDefault>
443+
</activation>
444+
<build>
445+
446+
<plugins>
447+
<!-- Begin publish to maven central -->
448+
<plugin>
449+
<groupId>org.sonatype.plugins</groupId>
450+
<artifactId>nexus-staging-maven-plugin</artifactId>
451+
<version>1.6.13</version>
452+
<extensions>true</extensions>
453+
<configuration>
454+
<serverId>ossrh</serverId>
455+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
456+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
457+
</configuration>
458+
</plugin>
459+
<!-- End publish to maven central -->
460+
461+
<!-- Begin source & javadocs being generated -->
462+
<plugin>
463+
<groupId>org.apache.maven.plugins</groupId>
464+
<artifactId>maven-source-plugin</artifactId>
465+
<version>3.3.0</version>
466+
<executions>
467+
<execution>
468+
<id>attach-sources</id>
469+
<goals>
470+
<goal>jar-no-fork</goal>
471+
</goals>
472+
</execution>
473+
</executions>
474+
</plugin>
475+
476+
<plugin>
477+
<groupId>org.apache.maven.plugins</groupId>
478+
<artifactId>maven-javadoc-plugin</artifactId>
479+
<version>3.5.0</version>
480+
<configuration>
481+
<failOnWarnings>true</failOnWarnings>
482+
<doclint>all,-missing</doclint> <!-- ignore missing javadoc, these are enforced with more customizability in the checkstyle plugin -->
483+
</configuration>
484+
<executions>
485+
<execution>
486+
<id>attach-javadocs</id>
487+
<goals>
488+
<goal>jar</goal>
489+
</goals>
490+
</execution>
491+
</executions>
492+
</plugin>
493+
<!-- end source & javadoc -->
494+
495+
<!-- sign the jars -->
496+
<plugin>
497+
<groupId>org.apache.maven.plugins</groupId>
498+
<artifactId>maven-gpg-plugin</artifactId>
499+
<version>3.1.0</version>
500+
<executions>
501+
<execution>
502+
<id>sign-artifacts</id>
503+
<phase>install</phase>
504+
<goals>
505+
<goal>sign</goal>
506+
</goals>
507+
</execution>
508+
</executions>
509+
</plugin>
510+
<!-- end sign -->
511+
512+
</plugins>
513+
</build>
514+
</profile>
515+
504516
<profile>
505517
<!-- this profile handles running the flagd e2e tests -->
506518
<id>e2e-test</id>

0 commit comments

Comments
 (0)