Dear Wiki user, You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.
The "UsingNexus" page has been changed by sebbapache. The comment on this change is: Add details of local deployment. http://wiki.apache.org/commons/UsingNexus?action=diff&rev1=1&rev2=2 -------------------------------------------------- If the upload fails with {{{Error deploying artifact: Failed to transfer file: ... Return code is: 401}}} then either the username/password are incorrect, or Nexus has not yet been set up for the commons component. + === Deploying to a local directory === + + The deploy target can easily be overridden by defining the altDeploymentRepository property. + For example, the following will deploy to the local directory {{{target/deploy}}}: + + {{{mvn deploy -Prelease [-Dgpg.skip] [-DskipTests] -DaltDeploymentRepository=id::default::file:target/deploy}}} + + It's difficult to type and remember this parameter. One solution is to create a profile in your settings.xml: + + {{{ + <profile> + <id>local-deploy</id> + <properties> + <altDeploymentRepository>id::default::file:target/deploy</altDeploymentRepository> + </properties> + </profile> + }}} + + You can then add {{{-Plocal-deploy}}} to the deploy command to change the deployment to use {{{target/deploy}}}. === Creating a Nexus staging release === First, create the SVN tag (with appropriate non-SNAPSHOT version in the pom), check it out into a fresh workspace and build/test the code. Once the code appears to be ready, the Maven artifacts can be deployed: - {{{mvn deploy -Prelease [-DskipTests]}}} + {{{mvn deploy -Prelease [-DskipTests] [-Plocal-deploy]}}} + The {{{-Plocal-deploy}}} parameter can be used as described above to redirect the deployment to target/deploy. + - This time, the artifacts will be deployed to the release staging repository in Nexus. + Otherwise, the artifacts will be deployed to the release staging repository in Nexus. To review the files that have been uploaded, login to Nexus using your Apache login and password: https://repository.apache.org/index.html You should then see additional menu items in the LHS: --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org