the best (although not the easiest) way to do that is using
M2+Release+Plugin<https://wiki.jenkins-ci.org/display/JENKINS/M2+Release+Plugin>
The repositories go configured in your pom as follows:
<distributionManagement>
<repository>
<id>nexus-repo</id>
<name>release repo</name>
<url><put your url here></url>
</repository>
<snapshotRepository>
<id>nexus-snapshot-repo</id>
<name>snapshot repo</name>
<url><put your url here></url>
</snapshotRepository>
</distributionManagement>
You also should have the settings.xml file in the jenkins .m2 directory:
<servers>
<server>
<id>nexus-repo</id>
<username>deployuser</username>
<password>deploypassword</password>
</server>
<server>
<id>nexus-snapshot-repo</id>
<username>deployuser</username>
<password>deploypassword</password>
</server>
</servers>
You need to make sure you also have your scm configuration in your pom:
<scm>
<connection>scm:svn:http://<url>/svn/trunk/project</connection>
<developerConnection>scm:svn:http://<url>/svn/trunk/project</developerConnection>
</scm>
Regards
On Tue, Apr 30, 2013 at 4:29 PM, Kris <[email protected]> wrote:
> Hi, I would like to deploy my artifacts to a Nexus server.
>
> On Nexus I have create to repositories.
>
> a snapshot and a release.
>
> In Jenkins under : Deploy artifacts to a Maven repository
> I setup repository URL and repository ID....
>
> But how can I choose the snapshot repo or the release repo ???
>
> I would like the snapshot versions to of cause go in snapshot repo, and
> release in release repo
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
--
Those who do not understand Unix are condemned to reinvent it, poorly.
Any sufficiently recent Microsoft OS contains an ad hoc,
informally-specified, bug-ridden, slow implementation of half of Unix.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.