maven-release-plugin

maven-release-plugin in multi-module project having a seperate git repository for each module

对着背影说爱祢 提交于 2019-12-12 13:29:25
问题 I wonder if it's possible to use the maven-release-plugin in a multi module project where each module has its own git repository? Something like this: parent/ .git/ pom.xml module1/ .git/ pom.xml I set up a simple test (under linux) and it fails for the "git add" command (simplyfied): cd parent && git add -- pom.xml /.../module1/pom.xml The error message is fatal: /.../module1/pom.xml: '/.../module1/pom.xml' is outside repository I understand that this git command can't work. Is maven-release

Maven check that all dependencies have been released

佐手、 提交于 2019-12-12 10:48:38
问题 As part of my release process, I use mvn versions:use-releases goal to replace all -SNAPSHOT dependencies with released versions. After this, I want to check if all the SNAPSHOT dependencies have been replaced with releases or not. Question : How can I check it? I know, the maven release plugin performs such a check as part of release-prepare goal, but I don't want to use release plugin. 回答1: You can use the maven-enforcer-plugin to double check whether any SNAPSHOT dependency is still there

Maven release plugin with git, error if commits are pushed during process

不羁的心 提交于 2019-12-12 10:37:37
问题 We use git repository and maven release plugin. In the first build step, we pull all the changes to local repository, and in the next one we run mvn release:prepare release:perform . release:prepare updates workspace, updates version in pom files, creates tag in repository, runs all the tests, builds jars etc. If it's fine, it then pushes local repository changes to remote one (updated poms and tag created). The problem is that when somebody pushes some changes meanwhile, push from maven

Maven release plugin - SNAPSHOT project needed

纵饮孤独 提交于 2019-12-12 07:26:53
问题 I am using the M2 release plugin from within Jenkins which calls the maven-release-plugin 2.3.2 internally and while building throws this error : You don't have a SNAPSHOT project in the reactor projects list . Problem is , my projects poms do have their version as 1.0.0-SNAPSHOT. What am I missing ? com.abc.def is the company parent POM , and I am just doing for mvn release for utils <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.abc</groupId> <artifactId>def</artifactId> <version

Maven Release Plugin Issue - Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.3.2:prepare

百般思念 提交于 2019-12-12 05:06:01
问题 Struggling to maven:release this project. Looks like a version incompatibility issue, but I'm not sure how to rectify this issue. I'm using Maven version 3.1.1. Here's my pom.xml (sample) <build> <defaultGoal>install</defaultGoal> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.0.2</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> </plugins> </build> <reporting> <plugins>

Why can't my tests see my system property when I release on Jenkins?

不问归期 提交于 2019-12-11 11:42:37
问题 I wrote some unit test code that prints out the value of a System.property named "JENKINS_BUILD". This property has a value when I run these command locally: mvn --batch-mode test -DJENKINS_BUILD=true mvn test -DargLine="-DJENKINS_BUILD=true" etc. But no matter what I do, I cannot get this property into my tests when they are run on Jenkins. This is the command line option I'm using there: mvn -DargLine="-DJENKINS_BUILD=true" --batch-mode -Dresume=false release:prepare release:perform

Where placed the scm tag?

落花浮王杯 提交于 2019-12-11 05:46:26
问题 I have a little probleme with the scm tag in my pom.xml file. My project architecture is like this: Parent Submodule1 Submodule2 reactor Parent is the project which hold all maven plugins configuration, librairies version ect. It's the parent of reactor project which is the parent of all submodules. Reactor is a pom.xml which contains tags to compile all submodules. I would like put the scm tag on the parent pom.xml because it's the higher pom.xml. But I get an error when I want to do a "mvn

With the maven-release-plugin, how to branch a module and its children?

送分小仙女□ 提交于 2019-12-11 05:00:03
问题 Say you have a module named "parent" which has 2 childs "childA" and "ChildB" If I run mvn release:branch -DbranchName=my-branch in the "parent" folder, it will branch the parent module code to SVN /branches/my-branch WITHOUT the 2 child modules. I would like release:branch to branch the parent module and all its children to /branches/my-branch/parent /branches/my-branch/childA /branches/my-branch/childB I didn't found any solution in the doc yet: http://maven.apache.org/plugins/maven-release

What is making the *sources.jar during Maven release?

不打扰是莪最后的温柔 提交于 2019-12-11 04:49:47
问题 I am certain that I do not have maven-source-plugin in my plugins, but a [project-name]-sources.jar is always getting built during release:perform. It doesn't seem to be doing it during other stages of the build life-cycle. Unfortunately, this [project-name]-sources.jar gets uploaded to our repository (Nexus). Management wants all sources to be kept in SVN and away from the repository. How do I do that? This is certainly not an assembly issue. We've tried different build profiles but the

How to configure the maven-release-plugin in pom to mimic -Dgoals=deploy on the command line

ぐ巨炮叔叔 提交于 2019-12-11 04:06:48
问题 I'm trying to configure the maven-release-plugin's perform mojo in the pom to only execute the deploy goal (as opposed to the default deploy site-deploy ). From the command line, it's as simple as the following: mvn release:perform -Dgoals=deploy Here are attempts at configuring the pom, both of which failed. Attempt 1: <build> <pluginManagement> <plugins> <plugin> <artifactId>maven-release-plugin</artifactId> <version>2.4</version> <executions> <execution> <id>default</id> <goals> <goal