Maven release plugin git credentials

Based on the docs you have to use a special property, project.scm.id, to define the id of the appropriate server entry in your settings.xml file. <properties> <project.scm.id>my-scm-server</project.scm.id> </properties> And the following in your settings.xml file: <settings> <servers> <server> <id>my-scm-server</id> <username>myUser</username> <password>myPassword</password> </server> </servers> </settings> BTW: Check if you are using the most recent version of … Read more

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

Your debug output indicates that Clean is the first thing that it’s trying to run, so I’m guessing it’s failing to download any plugins from central. First off, see if you can download the plugin jar directly in a web browser: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.5/maven-clean-plugin-2.5.jar If that works then your web browser has connectivity to central but maven … Read more

Avoid gpg signing prompt when using Maven release plugin

Just set it up in a profile in settings.xml and activate it by default: <settings> <profiles> <profile> <id>gpg</id> <properties> <gpg.executable>gpg2</gpg.executable> <gpg.passphrase>mypassphrase</gpg.passphrase> </properties> </profile> </profiles> <activeProfiles> <activeProfile>gpg</activeProfile> </activeProfiles> </settings> As you can see you can do that with any property .. e.g. also other usernames and passwords for the jarsigner plugin and so on. This should … Read more

Maven release:prepare fails with “scm connection or developerConnection must be specified”

If you only would like to change the version, the Versions Maven Plugin may help. The versions:set may be the good one for using. Please take a big note, since you’re not using the SCM, please make a full backup before using the following command. mvn versions:set -DnewVersion=1.0 mvn clean install mvn versions:set -DnewVersion=1.1-SNAPSHOT mvn … Read more

how to release a project which depends on a 3rd party SNAPSHOT project in maven

Problem is with the allowTimestampedSnapshots parameter name, it’s in the documentation but the plugin’s source uses a different parameter name in expression – ignoreSnapshots. So just use -DignoreSnapshots=true and the prepare goal of the release plugin will ignore snapshot dependencies.

Maven release plugin fails : source artifacts getting deployed twice

Try running mvn -Prelease-profile help:effective-pom. You will find that you have two execution sections for maven-source-plugin The output will look something like this: <plugin> <artifactId>maven-source-plugin</artifactId> <version>2.0.4</version> <executions> <execution> <id>attach-sources</id> <goals> <goal>jar</goal> </goals> </execution> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> To fix this problem, find everywhere you have used maven-source-plugin and make sure that you … Read more

How to deploy SNAPSHOT with sources and JavaDoc?

<build> <plugins> <plugin> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <id>attach-sources</id> <phase>deploy</phase> <goals><goal>jar-no-fork</goal></goals> </execution> </executions> </plugin> <plugin> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <id>attach-javadocs</id> <phase>deploy</phase> <goals><goal>jar</goal></goals> </execution> </executions> </plugin> <plugin> <!– explicitly define maven-deploy-plugin after other to force exec order –> <artifactId>maven-deploy-plugin</artifactId> <executions> <execution> <id>deploy</id> <phase>deploy</phase> <goals><goal>deploy</goal></goals> </execution> </executions> </plugin> </plugins> </build> See Sonatype’s OSS parent POM for a complete example.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)