maven-release-plugin

Maven: Bind plugin execution to the execution of another plugin, not to a lifecycle phase

萝らか妹 提交于 2019-12-03 11:00:37
问题 Note regarding the accepted answer: I accepted the answer because of strong circumstantial evidence. Nonetheless, this is circumstantial evidence, so take it with a grain of salt. How can I have a plugin be triggered when the user runs a plugin goal, not a lifecycle phase? (This has been asked before, but the answer was to use a lifecycle phase.) Case in point: I need release:branch to invoke regex-plugin to generate a branch with the current version as its name, minus the -SNAPSHOT suffix .

how to make maven release plugin skip tests?

依然范特西╮ 提交于 2019-12-03 09:36:40
I'm running mvn release:prepare -Darguments="-Dmaven.test.skip=true -DskipTests" on the master checkout of Spotify's docker-client . But I can't get maven's release plugin to skip the tests. Why doesn't maven in this case respect the CLI flags? I'm also curious what causes the release plugin to execute the surefire-plugin. There's no surefire-plugin specified in pom.xml . mvn --version Apache Maven 3.2.5 (12a6b3acb947671f09b81f49094c53f426d8cea1; 2014-12-14T12:29:23-05:00) Maven home: /usr/local/Cellar/maven/3.2.5/libexec Java version: 1.7.0_25, vendor: Oracle Corporation Java home: /Library

How to handle maven versions in a multi module project?

懵懂的女人 提交于 2019-12-03 07:48:17
I have a maven project infrastructure like this: /trunk/all/pom.xml /trunk/all/libs/lib1/pom.xml /lib2/pom.xml ... /trunk/all/projects/p1/pom.xml /p2/pom.xml ... You see, I have a lot of libraries and a lot of projects using these libraries. All this is combined to one multi module project, because I like to import the top project into eclipse and have all my libraries and projects available at once only do a single mvn test to compile and test all my code after I've done some global refactorings. Currently, all my modules are version 1.0-SNAPSHOT . Now I want to release project p2 and all

Maven: Bind plugin execution to the execution of another plugin, not to a lifecycle phase

房东的猫 提交于 2019-12-03 01:23:45
Note regarding the accepted answer: I accepted the answer because of strong circumstantial evidence. Nonetheless, this is circumstantial evidence, so take it with a grain of salt. How can I have a plugin be triggered when the user runs a plugin goal, not a lifecycle phase? (This has been asked before, but the answer was to use a lifecycle phase.) Case in point: I need release:branch to invoke regex-plugin to generate a branch with the current version as its name, minus the -SNAPSHOT suffix . This is what I have, which requires the developer to activate a profile and invoke the verify phase. I

How to copy unversioned test resources during release:perform?

不想你离开。 提交于 2019-12-02 15:05:13
问题 My Question is very similar to "Maven doesn't copy untracked resources while releasing". I have test resources which are not under version control. As testing is part of release:perform that fails without those resources. How can I tell Maven to copy those unversioned test resources into target/checkout/target/test-classes/. I really would prefer not to skip testing. Those test resource won't come into the public vcs as they have credentials for a webservice. 回答1: There seems to be many ways

“Git fatal: ref HEAD is not a symbolic ref” while using maven release plugin

喜夏-厌秋 提交于 2019-12-02 14:25:02
I get the following error output while running the Maven release plugin prepare step i.e. mvn release:prepare --batch-mode -DreleaseVersion=1.1.2 -DdevelopmentVersion=1.2.0-SNAPSHOT -Dtag=v1.1.2 -X from an Atlassian Bamboo plan. However doing the same in the command line works fine. The full error stack is below. Any ideas how can this be solved? [ERROR] Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.4.2:prepare (default-cli) on project hpcmom: An error is occurred in the checkin process: Exception while executing SCM command. Detecting the current branch failed: fatal:

In a Maven project, how can I automatically update the version all child modules, plus the parent?

蹲街弑〆低调 提交于 2019-12-02 14:18:15
I have a multi-module project. parent POM (1.0-SNAPSHOT) |-- module1 (1.0-SNAPSHOT) |-- module2 (1.0-SNAPSHOT) `-- module3 (1.0-SNAPSHOT) When I execute mvn release:prepare it verify that parent POM has a SNAPSHOT version and all dependent modules don't have a SNAPSHOT version. How automatically update all child modules from SNAPSHOT to the next release version? I would like automatically increment version for all modules. Pascal Thivent The release plugin can handle that. Did you check Updating POM Versions ? But... I don't get something. Changing the version in the POMs from x-SNAPSHOT to a

How to copy unversioned test resources during release:perform?

假装没事ソ 提交于 2019-12-02 10:07:41
My Question is very similar to " Maven doesn't copy untracked resources while releasing ". I have test resources which are not under version control. As testing is part of release:perform that fails without those resources. How can I tell Maven to copy those unversioned test resources into target/checkout/target/test-classes/. I really would prefer not to skip testing. Those test resource won't come into the public vcs as they have credentials for a webservice. Markus Malkusch There seems to be many ways to achieve this. One way is with the maven-resources-plugin and a profile. The release

Maven release plugin fails when creating tag

柔情痞子 提交于 2019-12-01 19:10:39
I'm trying to use Maven release plugin 2.0 to tag the version and hopefully deploy the resulting jar to the repository. I got stuck at release:prepare , getting this cryptic error: [INFO] Checking in modified POMs... [INFO] Executing: cmd.exe /X /C "svn --non-interactive commit --file C:\Users\ME~1\AppData\Local\Temp\maven-scm-950614965.commit --targets C:\Users\ME~1\AppData\Local\Temp\maven-scm-35306-targets" [INFO] Working directory: c:\workspace\release-test-trunk [INFO] Tagging release with the label release-test-1.3.0... [INFO] Executing: cmd.exe /X /C "svn --non-interactive copy --file C

Truncating SCM (git) URL for maven release tag push

末鹿安然 提交于 2019-12-01 10:06:59
问题 For some reason, when running maven release, it is giving me an invalid URL just for the tagging part of the push. For the pom.xml commit/push, it works fine and goes to appropriate URL. See below: [INFO] Working directory: /opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent [INFO] Executing: /bin/sh -c cd "/opt/jenkins-home/jobs/Section 4362/workspace/section4362-parent" && git commit --verbose -F /tmp/maven-scm-217365030.commit '/opt/jenkins-home/jobs/Section 4362/workspace