gitflow-maven-plugin
gitflow-maven-plugin copied to clipboard
gitflow:release with multi module , module POM does not work
Hi and thanks for the plugin:
gitflow-maven-plugin version is 1.21.0
I have multi module in same folder:
└── yaoquansu2-root
├── pom.xml
├── yaoquansu2-consumer
│ ├── pom.xml
- father POM like this :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.yaoquansu</groupId>
<artifactId>yaoquansu2-root</artifactId>
<version>1.0.3-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>../yaoquansu2-consumer</module>
</modules>
...
<build>
<!-- To define the plugin version in your parent POM -->
<pluginManagement>
<plugins>
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
<version>1.21.0</version>
</plugin>
</plugins>
</pluginManagement>
<!-- To use the plugin goals in your POM or parent POM -->
<plugins>
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
- module POM like this :
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.yaoquansu</groupId>
<artifactId>yaoquansu2-root</artifactId>
<version>1.0.3-SNAPSHOT</version>
<relativePath>../yaoquansu2-root/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>yaoquansu2-consumer</artifactId>
....
<build>
<plugin>
<groupId>com.amashchenko.maven.plugin</groupId>
<artifactId>gitflow-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
- in yaoquansu2-root run gitflow:release
╭─2024/yaoquansu2/yaoquansu2-root ‹develop›
╰─$ mvn gitflow:release-start -DallowSnapshots=true -DargLine='-DprocessAllModules'
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] yaoquansu2-root [pom]
[INFO] yaoquansu2-consumer [jar]
[INFO]
[INFO] -------------------< com.yaoquansu:yaoquansu2-root >--------------------
[INFO] Building yaoquansu2-root 1.0.3-SNAPSHOT [1/2]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- gitflow-maven-plugin:1.21.0:release-start (default-cli) @ yaoquansu2-root ---
[INFO] Comparing local branch 'develop' with remote 'origin/develop'.
[INFO] Checking out 'develop' branch.
What is release version? [1.0.3]:
[INFO] Version is blank. Using default version.
[INFO] Creating a new branch 'release/1.0.3' from 'develop' and checking it out.
[INFO] Updating version(s) to '1.0.3'.
[INFO] Committing changes.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for yaoquansu2-root 1.0.3-SNAPSHOT:
[INFO]
[INFO] yaoquansu2-root .................................... SUCCESS [01:12 min]
[INFO] yaoquansu2-consumer ................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:13 min
[INFO] Finished at: 2024-08-31T14:32:10+08:00
[INFO] ------------------------------------------------------------------------
yaoquansu2-root
is success, but the sub module yaoquansu2-consumer
is SKIPPED , any ideas ?
Thank you !