Skip to content

Commit 02c3012

Browse files
committed
configure release/gitflow plugins
1 parent e624c2f commit 02c3012

1 file changed

Lines changed: 76 additions & 0 deletions

File tree

pom.xml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ under the License.
305305
<build>
306306
<pluginManagement>
307307
<plugins>
308+
308309
<plugin>
309310
<groupId>org.apache.maven.plugins</groupId>
310311
<artifactId>maven-plugin-plugin</artifactId>
@@ -322,6 +323,7 @@ under the License.
322323
</execution>
323324
</executions>
324325
</plugin>
326+
325327
<plugin>
326328
<groupId>org.apache.maven.plugins</groupId>
327329
<artifactId>maven-surefire-report-plugin</artifactId>
@@ -333,6 +335,7 @@ under the License.
333335
</reportsDirectories>
334336
</configuration>
335337
</plugin>
338+
336339
<plugin>
337340
<groupId>org.apache.maven.plugins</groupId>
338341
<artifactId>maven-failsafe-plugin</artifactId>
@@ -351,6 +354,7 @@ under the License.
351354
<argLine>${maven.test.jvmargs}</argLine>
352355
</configuration>
353356
</plugin>
357+
354358
<plugin>
355359
<groupId>org.apache.rat</groupId>
356360
<artifactId>apache-rat-plugin</artifactId>
@@ -369,13 +373,45 @@ under the License.
369373
</excludes>
370374
</configuration>
371375
</plugin>
376+
372377
<plugin>
373378
<groupId>org.apache.maven.plugins</groupId>
374379
<artifactId>maven-javadoc-plugin</artifactId>
375380
<configuration>
376381
<doclint>none</doclint>
377382
</configuration>
378383
</plugin>
384+
385+
<plugin>
386+
<groupId>org.apache.maven.plugins</groupId>
387+
<artifactId>maven-release-plugin</artifactId>
388+
<configuration>
389+
<projectVersionPolicyId>OddEvenVersionPolicy</projectVersionPolicyId>
390+
</configuration>
391+
<dependencies>
392+
<dependency>
393+
<groupId>org.apache.maven.release</groupId>
394+
<artifactId>maven-release-oddeven-policy</artifactId>
395+
<version>${maven-release-plugin.version}</version>
396+
</dependency>
397+
</dependencies>
398+
</plugin>
399+
400+
<plugin>
401+
<groupId>com.amashchenko.maven.plugin</groupId>
402+
<artifactId>gitflow-maven-plugin</artifactId>
403+
<configuration>
404+
<projectVersionPolicyId>OddEvenVersionPolicy</projectVersionPolicyId>
405+
</configuration>
406+
<dependencies>
407+
<dependency>
408+
<groupId>org.apache.maven.release</groupId>
409+
<artifactId>maven-release-oddeven-policy</artifactId>
410+
<version>${maven-release-plugin.version}</version>
411+
</dependency>
412+
</dependencies>
413+
</plugin>
414+
379415
</plugins>
380416
</pluginManagement>
381417
<plugins>
@@ -645,6 +681,46 @@ under the License.
645681
</pluginManagement>
646682
</build>
647683
</profile>
684+
<!-- profile used for building releases and deployment to sonatype/maven central -->
685+
<profile>
686+
<id>release-profile</id>
687+
<activation>
688+
<property>
689+
<name>performRelease</name>
690+
<value>true</value>
691+
</property>
692+
</activation>
693+
<build>
694+
<plugins>
695+
<!-- sign the build -->
696+
<plugin>
697+
<groupId>org.apache.maven.plugins</groupId>
698+
<artifactId>maven-gpg-plugin</artifactId>
699+
<inherited>true</inherited>
700+
<executions>
701+
<execution>
702+
<id>sign-artifacts</id>
703+
<goals>
704+
<goal>sign</goal>
705+
</goals>
706+
<phase>verify</phase>
707+
</execution>
708+
</executions>
709+
</plugin>
710+
<!-- configure staging process at sonatype.-->
711+
<plugin>
712+
<groupId>org.sonatype.central</groupId>
713+
<artifactId>central-publishing-maven-plugin</artifactId>
714+
<extensions>true</extensions>
715+
<inherited>true</inherited>
716+
<configuration>
717+
<publishingServerId>sonatype-central</publishingServerId>
718+
<deploymentName>${project.artifactId} ${project.version}</deploymentName>
719+
</configuration>
720+
</plugin>
721+
</plugins>
722+
</build>
723+
</profile>
648724
</profiles>
649725

650726
<reporting>

0 commit comments

Comments
 (0)