Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gitflow:release with multi module , module POM does not work #410

Open
sam2099 opened this issue Aug 31, 2024 · 4 comments
Open

gitflow:release with multi module , module POM does not work #410

sam2099 opened this issue Aug 31, 2024 · 4 comments

Comments

@sam2099
Copy link

sam2099 commented Aug 31, 2024

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
  1. 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>
  1. 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>
  1. 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 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@sam2099 and others