Maven Svn Release Plugin: External and Multi-Module Project

Given the following example of a multi-module project:

  • aggr / pom.xml (version 1.0-SNAPSHOT)
  • aggr / parent / pom.xml (version 2.0-SNAPSHOT)
  • aggr / app / pom.xml (version 3.0-SNAPSHOT)
  • aggr / comp1 / pom.xml (version 4.0-SNAPSHOT)

where parent is the parent of any other pom, and the application has a dependency on comp1.

Release through release: preparation / execution just works fine as long as the aggr folder has the same structure in the svn repository (repository / trunk / aggr / parent.pom, ...).

Now that I want to use the same project, but with svn: externals, the release plugin does not work, stating that comp1:

Can't release project due to non released dependencies : parent:pom:2.0-SNAPSHOT

The repository structure is something like

  • Repository / Aggr / Trunk / pom.xml
  • Repository / parent / trunk / pom.xml
  • ///pom.xml
  • /comp1//pom.xml

aggr , , .

Maven - ?

: pom svn: externals. pom-Files - scm. , , scm.

parent-pom.xml

<groupId>small.test</groupId>
<artifactId>parent</artifactId>
<version>2.0-SNAPSHOT</version>

<scm>
    <connection>scm:svn:http://localhost/svn/small-test-ext/parent/trunk/</connection>
    <developerConnection>scm:svn:http://localhost/svn/small-test-ext/parent/trunk/</developerConnection>
    <url>http://localhost/svn/small-test-ext/parent/trunk/</url>
</scm>

<build>
<plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.1</version>
    </plugin>
</plugins>

aggr-pom.xml          small.test              2,0-   

<groupId>small.test</groupId>
<artifactId>aggr</artifactId>
<version>1.0-SNAPSHOT</version>

<scm>
    <connection>scm:svn:http://localhost/svn/small-test-ext/aggr/trunk/</connection>
    <developerConnection>scm:svn:http://localhost/svn/small-test-ext/aggr/trunk/</developerConnection>
    <url>http://localhost/svn/small-test-ext/aggr/trunk/</url>
</scm>

<modules>
    <module>parent</module>
    <module>comp1</module>
    <module>comp2</module>
    <module>app</module>
</modules>

app-pom.xml

<parent>
    <groupId>small.test</groupId>
    <artifactId>parent</artifactId>
    <version>2.0-SNAPSHOT</version>
</parent>
<groupId>small.test</groupId>
<version>3.0-SNAPSHOT</version>

<artifactId>app</artifactId>
<packaging>jar</packaging>

<scm>
    <connection>scm:svn:http://localhost/svn/small-test-ext/app/trunk/</connection>
    <developerConnection>scm:svn:http://localhost/svn/small-test-ext/app/trunk/</developerConnection>
    <url>http://localhost/svn/small-test-ext/app/trunk/</url>
</scm>

<dependencies>  
    <dependency>
    <groupId>small.test</groupId>
    <artifactId>comp1</artifactId>
    <version>4.0-SNAPSHOT</version>
</dependency>

Konrad

+5
1

mvn:release , SVN. mvn:release :

svn_repository: branches/
            tags/
            trunk/
                  parent
                  comp1
                  comp2
                  app
                  pom.xml
+2

All Articles