maven-release-plugin

How do I pass javac multiple command-line arguments, some of which include colon, without breaking Maven release plugin?

自闭症网瘾萝莉.ら 提交于 2019-12-01 06:36:32
I want to make my Maven build fail when I forget to declare serialVersionUIDs in a Serializable class. With javac , that's easy: $ javac -Xlint:serial -Werror Source.java Directly translating that to Maven doesn't work: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.5.1</version> <configuration> <compilerArgument>-Xlint:serial -Werror</compilerArgument> </configuration> </plugin> The compilerArgument is quoted, so javac receives only one argument, containing -Xlint:serial -Werror , instead of -Xlint:serial and -Werror as separate

Push to local Azure DevOps Git from Build Pipeline

随声附和 提交于 2019-12-01 05:18:30
Short version Can someone tell me how to set up a "Command Line Script" task within an Azure DevOps build pipeline that pushes changes to a local Git repository (in fact, the Git repository on which the pipeline is based)? No matter what I try, my script always times out after printing Pushing commits to git . Longer version We are migrating existing Java/Maven projects from a Jenkins build server to an Azure DevOps build environment, and I am trying to set up a build pipeline that mimics the Jenkins "Release Staging" functionality. My first attempt was to call the Maven release plugin

Why does maven release plugin allow for SNAPSHOT version in dependency management?

試著忘記壹切 提交于 2019-12-01 03:06:51
问题 We have 1 company parent pom. This uses dependencyManagement to manage the versions for all the dependencies of all the artifacts used. What is alarming, is that SNAPSHOT versions can be defined in dependencyManagement. Though when maven release is performed, the pom is allowed to be released with SNAPSHOT version in dependencyManagement. Why? If I point a child project to a released version of the company parent pom, and this child project uses a dependency defined in dependencyManagement

How to run release:perform from a given Git tag?

久未见 提交于 2019-11-30 17:14:29
Due to issues with a Nexus staging repository, I need to re-run mvn release:perform , ideally without creating a new Git tag but reusing the one created by the first run. I tried mvn release:perform -DconnectionUrl=scm:git:git@github.com:ops4j/org.ops4j.pax.exam2.git -Dtag=exam-reactor-3.3.0 and mvn release:perform -DconnectionUrl=scm:git:git@github.com:ops4j/org.ops4j.pax.exam2.git -Dscm.tag=exam-reactor-3.3.0 but in both cases, the clone fails because the tag/branch parameter is not forwarded to Git: [INFO] --- maven-release-plugin:2.4:perform (default-cli) @ exam-reactor --- [INFO] Checking

Maven release plugin git credentials

我的梦境 提交于 2019-11-30 17:12:04
We are using Jenkins and just switched from a file based git repo without authentication to using GitBlit with proper authentication over http. The problem is - how is maven supposed to authenticate itself in batch mode ? Updating each job with -Dusername and -Dpassword (and thus storing the password in the jobs) doesn't seem very feasible. I've read that settings.xml is supposed to work with git by specifying the git server as the id, but whatever I do it has no effect (i.e the release plugin prompts for credentials). pom.xml: <properties> <project.scm.id>git</project.scm.id> </properties>

Maven release plugin git credentials

穿精又带淫゛_ 提交于 2019-11-30 16:27:57
问题 We are using Jenkins and just switched from a file based git repo without authentication to using GitBlit with proper authentication over http. The problem is - how is maven supposed to authenticate itself in batch mode ? Updating each job with -Dusername and -Dpassword (and thus storing the password in the jobs) doesn't seem very feasible. I've read that settings.xml is supposed to work with git by specifying the git server as the id, but whatever I do it has no effect (i.e the release

Maven release fails due to git failure

人盡茶涼 提交于 2019-11-30 13:26:49
I am trying to do a mvn release, but it fails due to problems with git. I have done this multiple times before without this problem, and I really don't get why/how this is happening. I first got it doing mvn release:prepare, but got around it by adding the last line shown below to my root-pom: <artifactId>maven-release-plugin</artifactId> <configuration> <preparationGoals>clean install</preparationGoals> <pushChanges>false</pushChanges> But now, when I try to do mvn release:perform, I get the error message again: [INFO] Executing: cmd.exe /X /C "git clone file://C\Users\torbjornk\nfr\MyProject

Remove -SNAPSHOT from project version in pom

假装没事ソ 提交于 2019-11-30 08:05:22
I have a pom with the following GAV <groupId>com.company.services</groupId> <artifactId>test-branch-2</artifactId> <version>1.0.21-SNAPSHOT</version> I want to remove -SNAPSHOT from this using maven in batch mode, so I can do it with Jenkins and not have to specify anything manually. I've looked at the documentation for version:set but all the options offer me an interactive prompt and ask me to type a name for the version. I would prefer the versions plugin, not the release plugin. Since version 2.10 of the Versions Maven Plugin you can simply do: mvn versions:set -DremoveSnapshot If you

How to run release:perform from a given Git tag?

我与影子孤独终老i 提交于 2019-11-30 00:45:16
问题 Due to issues with a Nexus staging repository, I need to re-run mvn release:perform , ideally without creating a new Git tag but reusing the one created by the first run. I tried mvn release:perform -DconnectionUrl=scm:git:git@github.com:ops4j/org.ops4j.pax.exam2.git -Dtag=exam-reactor-3.3.0 and mvn release:perform -DconnectionUrl=scm:git:git@github.com:ops4j/org.ops4j.pax.exam2.git -Dscm.tag=exam-reactor-3.3.0 but in both cases, the clone fails because the tag/branch parameter is not

Avoid gpg signing prompt when using Maven release plugin

情到浓时终转凉″ 提交于 2019-11-29 22:57:19
I've got a Maven project that I'm trying to configure to use the maven release plugin. Part of the release process is to use the Maven GPG Plugin to sign artifacts which requires among other things, the GPG signing key passphrase to succeed. Because these builds need to be runnable in a non interactive environment, (CI-Server) these params are passed in as arguments to maven in the form of -Dgpg.passphrase=XXX For snapshot builds everything works fine; the Maven GPG Plugin sees the passed in passphrase, artifacts are built, signed and deployed as expected, however, when I try to use the