FAQ Database Discussion Community

Strip Pom during Publish?

I want my poms in a public facing repository to assist with transitive dependency calculation but I don't want my source control and other details included in the public poms. Is there a standard way to strip poms to their bare essentials or would I use an xslt plugin and...

How to change default properties in Maven Release Plugin for WSDL builds

I require the default properties of mvn release:prepare and mvn release:perform to be modified. The source code i'm trying to build has a WSDL files. The JAR file that is generated is in non maven format and this was achieved 2 step build process, using this I'm able to generate...

Maven release plugin git credentials

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...

Maven versions-maven-plugin versions plugin 2.2

Maven is 3.1.0. I'm using versions-maven-plugin:2.2 in my project's pom.xml (as shown below). Apart from the usual pom.xml file configuration, I'm just showing the main code snapshot below: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>tools-parent</artifactId>...

Maven release : Is there a way to prevent a module to be uploaded to Nexus?

I have a multi modules Maven project : a parent and three child modules. I want all of the modules to be built when I run mvn clean package on the parent. But I would also like one of those module to not be uploaded to Nexus when using mvn...

Maven version custom upgrading

I am working on a maven project and it is currently versioned at 0.x, I need to be able to bump the version to X.0 using the maven release plugin. Is this possible? I came across the maven versions plugin http://mojo.codehaus.org/versions-maven-plugin/usage.html but wasnt sure if this could be used to...

mvn release:perform distributionManagement url

I have this configuration in my pom.xml: <distributionManagement> <downloadUrl>http://mydomain/downloads/<downloadUrl> <repository> <id>Id</id> <name>Name</name> <url>scp://ipaddress/downloads/</url> </repository> </distributionManagement> When I do mvn release:perform and navigate to http://mydomain/downloads/, there is a directory hierarchy com/my/application that is my app groupId and, inside that, I have the .apk file (is an Android app). Is there any...

Couldn't find remote ref HEAD (when releasing artifact with Jenkins and Maven)

I am currently trying to use the maven-release-plugin working in jenkins on a Git project. As shown below, there seems to be a missing reference to HEAD in my remote repository (on the server). This reference is only missing in project where the master branch name has been changed to...

is it possible to filter artifacts in Maven-release-plugin?

Is it possible to exclude some artifacts during release:prepare or release:perform? We don't need all the artifacts put on nexus, only two main ones.

Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved

I have install maven in my machine. I have properly set the class-path and maven home folder. Every time I execute mvn clean install, it gives me exception. I have also tried to delete the .m2 folder but the same result. mvn -version output Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T19:57:37+08:00) Maven...