ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Ant Wiki] Update of "PublishingMavenArtifactsWithAntAndIvy" by StefanBodewig
Date Mon, 11 Oct 2010 12:50:23 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Ant Wiki" for change notification.

The "PublishingMavenArtifactsWithAntAndIvy" page has been changed by StefanBodewig.
http://wiki.apache.org/ant/PublishingMavenArtifactsWithAntAndIvy?action=diff&rev1=1&rev2=2

--------------------------------------------------

  
  Usually your normal build process will already create the artifacts you want to publish
(typically jars) but you may need to PGP-sign them the same way you sign your normal distribution
artifacts.  The artifacts are expected to follow the naming scheme ''artifactId''-''version''.jar.
  
- In addition you will need a minimal POM for your jar.  See [[http://maven.apache.org/project-faq.html#how-to-improve-metadata|the
Apache Maven project's documentation for "minimal"]] and the [[http://svn.apache.org/repos/asf/ant/antlibs/compress/trunk/project-template.pom|Apache
Compress Antlib's POM]] for an example.  If you are publishing multiple jars you may consider
adding a parent POM to encapsulate the common information; see the [[http://maven.apache.org/pom.html|Maven
documentation]], an example might be [[http://svn.apache.org/repos/asf/ant/core/trunk/src/etc/poms/pom.xml|Ant's
parent POM]] used for the several jars that make up an Ant release.
+ In addition you will need a minimal POM for your jar.  If you are already using Ivy, you
can use the {{{makepom}}} task to create one from your {{{ivy.xml}}}, otherwise see [[http://maven.apache.org/project-faq.html#how-to-improve-metadata|the
Apache Maven project's documentation for "minimal"]] and the [[http://svn.apache.org/repos/asf/ant/antlibs/compress/trunk/project-template.pom|Apache
Compress Antlib's POM]] for an example.  If you are publishing multiple jars you may consider
adding a parent POM to encapsulate the common information; see the [[http://maven.apache.org/pom.html|Maven
documentation]], an example might be [[http://svn.apache.org/repos/asf/ant/core/trunk/src/etc/poms/pom.xml|Ant's
parent POM]] used for the several jars that make up an Ant release.
  
  Users that use your project's jars from the Maven repository rather than using your "normal"
distributions will likely want additional artifacts containing the source files or javadocs
matching your jars in files named ''artifactId''-''version''-sources.jar and ''artifactId''-''version''-javadoc.jar
respectively.  Don't forget to sign those jars as well if you provide them.
  
@@ -22, +22 @@

  
  If you are publishing source or javadoc jars as well, you'll need to provide something similar
to Maven's classifier.  You do so by adding an [[http://ant.apache.org/ivy/history/latest-milestone/concept.html#extra|extra
attribute]] to each artifact element that lives outside of Ivy's XML namespace and referencing
this element in your {{{ivysettings.xml}}} file (see below).  An example which uses this approach
is the [[http://svn.apache.org/repos/asf/ant/antlibs/compress/trunk/project-template.ivy.xml|Compress
Antlib's ivy.xml]].  It contains additional information and -sources as well as -javadoc artifacts.
  
+ Alternatively you can specify the -sources and -javadoc artifacts inside your {{{publish}}}
task rather than your {{{ivy.xml}}} file.  If you use Ivy 2.2.0 or later you can also configure
it to PGP-sign you artifacts and no longer need to specify your signatures as artifacts. 
Ivy's own [[http://svn.apache.org/repos/asf/ant/ivy/core/trunk/ivysettings-release.xml|ivy-settings.xml]]
configures Ivy to sign artifacts and the [[http://svn.apache.org/repos/asf/ant/ivy/core/trunk/build-release.xml|publish
task inside the upload-nexus target]] declares the POM as well as -sources and -javadoc jars
as additional artifacts.
+ 
  == Configure Ivy to Use Nexus ==
  
  If you are already using Ivy you may need to adapt your {{{resolvers}}} configuration by
adding an {{{url}}} resolver for Nexus and referencing that in a {{{module}}} matching your
{{{ivy.xml}}}.
@@ -32, +34 @@

  
  == Uploading the Artifacts ==
  
- Uploading involves four Ivy tasks.
+ Uploading involves three Ivy tasks.
  
   1. {{{ivy:configure}}} uses your {{{ivysettings.xml}}} file to configure Ivy (what else?).
   1. {{{ivy:resolve}}} reads your {{{ivy.xml}}} and doesn't do much beyond that if you are
only using Ivy to upload your artifacts.
-  1. {{{ivy:deliver}}} doesn't do anything that I'd understand ;-)  Is this actually needed?
   1. Finally {{{ivy:publish}}} publishes the artifcats to Nexus.
  
  An example build file combining those steps that expects you to provide the authentication
information via the command line (i.e. {{{ant -Dupload.user=YOUR-ASF_ID -Dupload.password=YOUR-PASSWORD}}})
can be found here: http://svn.apache.org/repos/asf/ant/antlibs/common/trunk/upload.xml

Mime
View raw message