Permalink
Browse files

Created separate ivy settings file for sonatype Nexus upload.

  • Loading branch information...
1 parent cc46f01 commit 3a6ed2b4f83364ad0b45afbc615546781aa10234 @amolenaar amolenaar committed Nov 26, 2012
Showing with 32 additions and 23 deletions.
  1. +5 −2 build.xml
  2. +26 −0 ivysettings-sonatype.xml
  3. +1 −21 ivysettings.xml
View
@@ -220,10 +220,13 @@
<fail unless="upload.user" message="supply upload.user on the command line"/>
<fail unless="upload.password" message="supply upload.password on the command line"/>
<fail unless="pgp.password" message="supply pgp.password on the command line"/>
-
+ <ivy:settings id="ivy.publish.instance"
+ file="ivysettings-sonatype.xml" />
<ivy:publish resolver="sonatype-nexus-staging"
pubrevision="${version}"
- publishivy="false">
+ publishivy="false"
+ settingsref="ivy.publish.instance"
+ overwrite="true">
<artifacts pattern="dist/[artifact](-[classifier]).[ext]" />
</ivy:publish>
</target>
View
@@ -0,0 +1,26 @@
+<ivysettings>
+ <property name="sonatype.nexus.staging.url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
+ <property name="sonatype.nexus.snapshots.url" value="https://oss.sonatype.org/content/repositories/snapshots/" />
+
+ <include file="ivysettings.xml" />
+
+ <property name="pgp.keyId" value="auto" override="false"/>
+ <credentials
+ host="oss.sonatype.org"
+ realm="Sonatype Nexus Repository Manager"
+ username="${upload.user}"
+ passwd="${upload.password}" />
+ <credentials
+ host="${sonatype-nexus-snapshots}"
+ realm="Sonatype Nexus Repository Manager"
+ username="${upload.user}"
+ passwd="${upload.password}" />
+ <signers>
+ <pgp name="nexus-sig" secring="${user.home}/.gnupg/secring.gpg" password="${pgp.password}" keyId="${pgp.keyId}"/>
+ </signers>
+ <resolvers>
+ <url name="sonatype-nexus-staging" m2compatible="true" signer="nexus-sig">
+ <artifact pattern="${sonatype.nexus.staging.url}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ </url>
+ </resolvers>
+</ivysettings>
View
@@ -1,28 +1,8 @@
<ivysettings>
- <property name="sonatype.nexus.staging.url" value="https://oss.sonatype.org/service/local/staging/deploy/maven2/" />
- <property name="sonatype.nexus.snapshots.url" value="https://oss.sonatype.org/content/repositories/snapshots/" />
-
- <property name="pgp.keyId" value="auto" override="false"/>
<settings defaultResolver="default" />
- <credentials
- host="oss.sonatype.org"
- realm="Sonatype Nexus Repository Manager"
- username="${upload.user}"
- passwd="${upload.password}" />
- <credentials
- host="${sonatype-nexus-snapshots}"
- realm="Sonatype Nexus Repository Manager"
- username="${upload.user}"
- passwd="${upload.password}" />
- <signers>
- <pgp name="nexus-sig" secring="${user.home}/.gnupg/secring.gpg" password="${pgp.password}" keyId="${pgp.keyId}"/>
- </signers>
<resolvers>
<chain name="default">
- <ibiblio name="ibiblio" root="${maven.central.url}" m2compatible="true" />
+ <ibiblio name="maven2" root="${maven.central.url}" m2compatible="true" />
</chain>
- <url name="sonatype-nexus-staging" m2compatible="true" signer="nexus-sig">
- <artifact pattern="${sonatype.nexus.staging.url}/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
- </url>
</resolvers>
</ivysettings>

0 comments on commit 3a6ed2b

Please sign in to comment.