ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <>
Subject Re: How to publish file?
Date Tue, 27 Nov 2007 00:56:44 GMT
The deliver task does not publish, it only updates the ivy file for
delivery, replacing some metadata information. To publish I suggest having a
look at the publish task code, which does something like this:
ivy.publish(mrid, artifactspattern, publishResolverName,
  new PublishOptions()
      .setCache(CacheManager.getInstance(settings, cache))
      .setSrcIvyPattern(publishivy ? srcivypattern : null)
      .setExtraArtifacts((Artifact[]) artifacts.toArray(new Artifact[

This should give you a pretty good idea of the options you have to call
publish yourself.


On Nov 26, 2007 2:19 PM, teknokrat <> wrote:

> I am writing some code to publish jars using a filesystem resolver for a
> plugin. So far I have tried
> String path = IvyPatternHelper.substitute("", organisation, module,
> revision, "ivy", "ivy", "xml");
> File ivyFile = new File(path);
> if (!ivyFile.exists()) {
>                 IvyDeliver deliver = new IvyDeliver();
>                 deliver.setModule(module);
>                 deliver.setOrganisation(organisation);
>                 deliver.setRevision(revision);
>                 deliver.execute();
>             }
> This throws NPEs. How can I use the Ivy API to publish a jar file from a
> java program? What fields are mandatory and how do i add the
> configuration details? There does not appear to be any javadoc link on
> the main site.
> cheers

Xavier Hanin - Independent Java Consultant

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message