Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Current »

Maven Release Plugin

This page provides a space for users to contribute examples, errata, tips and other useful information about the Maven Release Plugin. Everybody is invited to share his/her thoughts about the plugin to help the community to improve it.

Note: Please do not use this page to report bugs or feature requests. Instead, please fill in an issue in the issue tracking system listed in the official plugin documentation.

Thanks!

- The Maven Team

Examples

FAQ

When running release:perform, I get an error message "Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one"

One cause of this is an incorrectly-specified <scm> setting for the project being released. For example, you may have accidentally specified the SVN "root" for the project and not the /trunk or active branch. If this is the case, take a look at the target/checkout directory when you receive this message and you will find that trunk/tags/branches has been checked out for the build, instead of the release tag.

To correct this, edit your <scm> in pom.xml to point to the pre-tagged branch you are working on (usually trunk) i.e.

Note the presence of trunk in each URL.

What 'username' do I use for svn+ssh?

If your developerConnection uses svn+ssh, using public/private keys for svn authentication, you are probably connecting as user 'svn' (with your svn username being determined by your identity from your public key).

e.g.

In this case you want to specify -Dusername=svn if you are authenticating with your own key.

If you use -Dusername=yourname you will need to have password access to your svn repository enabled.

Automatic build and deployment of javadoc and source jars.

The release:perform goal checks out the code from SCM and then builds the project together with javadoc and source jars, before deploying these jars to the specified repository. It is not necessary to include the javadoc and source plugins in your build profile - and if you do so these artifacts will be attached to the lifecycle twice: probably leading to a deployment failure if your repository is configured to disallow overwriting of released artifacts,

How do I ...?

You need to ...

  • No labels