maven release plugin, git, and the pom's not at the top

后端 未结 2 990
不思量自难忘°
不思量自难忘° 2020-12-16 18:29

I\'ve got a git repo where the top level directory has three directories in it: java, COM, and csharp. As you might guess, the pom.xml lives in the java directory.

A

相关标签:
2条回答
  • 2020-12-16 18:52

    Perfoming release didn't deploy properly in not-root directory with maven-release-plugin version 2.4 (with both maven 3.0.3 and 3.0.4). Downgrading to maven-release-plugin version 2.2.1 fixed the problem.

    0 讨论(0)
  • 2020-12-16 19:03

    Tested: add the following to your build/plugins section:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
            <execution>
                <id>default</id>
                <goals>
                    <goal>perform</goal>
                </goals>
                <configuration>
                    <pomFileName>subdir/pom.xml</pomFileName>
                </configuration>
            </execution>
        </executions>
    </plugin>
    

    Where "subdir" is the relative path to the directory where the pom.xml resides.

    This works, at least with Maven 3.0.3. May work with different release plugin versions, but this is untested.

    This works with Maven 3.0.4 and maven-release-plugin 2.5 and git 1.8.x.

    0 讨论(0)
提交回复
热议问题