Search code examples
javamavenmaven-3maven-release-plugin

Why is maven release skipping my child modules


What I am trying to do is to push out a couple of parent poms for all of our sub projects. I have a single project that contains a single parent pom with two child module poms. Packaging for all three are of type pom if this makes a difference. When I deploy though it is failing to deploy the child modules saying that they are skipped.

Parent Pom

    <groupId>com.test.cpbx</groupId>
    <artifactId>parent</artifactId>
    <packaging>pom</packaging>
    <version>1.1-SNAPSHOT</version>
    <name>Parent Pom</name>


    <scm>
            <connection>scm:svn:https://url/trunk</connection>
    </scm>

    <modules>
            <module>appia</module>
            <module>rialto</module>
    </modules>

    <build>
            <plugins>
                    <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-release-plugin</artifactId>
                            <configuration>
                                    <goals>deploy</goals>
                                    <providerImplementations>
                                            <svn>javasvn</svn>
                                    </providerImplementations>
                            </configuration>
                            <dependencies>
                                    <dependency>
                                            <groupId>com.google.code.maven-scm-provider-svnjava</groupId>
                                            <artifactId>maven-scm-provider-svnjava</artifactId>
                                            <version>2.0.5</version>
                                            <scope>compile</scope>
                                    </dependency>
                            </dependencies>
                    </plugin>
            </plugins>
    </build>

    <dependencies>
            <dependency>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                    <version>4.11</version>
            </dependency>
    </dependencies>

This is one of my child poms, they are the same with the only change being the artifactId name

Child POM

<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/maven-v4_0_0.xsd">
        <modelVersion>4.0.0</modelVersion>

        <parent>
                <groupId>com.test.cpbx</groupId>
                <artifactId>parent</artifactId>
                <version>1.1-SNAPSHOT</version>
        </parent>

        <artifactId>rialto-parent</artifactId>
        <packaging>pom</packaging>
        <name>Rialto Parent POM</name>

</project>

Output

mvn  -B -DreleaseVersion=1.1 -DdevelopmentVersion=1.2.0-SNAPSHOT   release:prepare -DdryRun 

...
[INFO] Not removing release POMs
[INFO] Executing completion goals - since this is simulation mode it is running against the original project, not the rewritten ones
[INFO] Full run would be commit 3 files with message: '[maven-release-plugin] prepare for next development iteration'
[INFO] Release preparation simulation complete.
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] Parent Pom ........................................ SUCCESS [2.573s]
[INFO] Appia Parent POM .................................. SKIPPED
[INFO] Rialto Parent POM ................................. SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.749s
[INFO] Finished at: Wed May 21 14:52:30 CDT 2014
[INFO] Final Memory: 15M/114M
[INFO] ------------------------------------------------------------------------

Solution

  • There was some confusion with the output of maven.

    The output does not mean it is skipping building the modules or deploying the modules.

    It is a message about the refactoring of the versions. The output is telling us that the parent pom owns the version and the child versions are dependent on the parent pom. This means that it does not need to refactor the child modules pom.xml so it prints the child in the reactor summary as SKIPPED.