ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Seaborne, Andy" <andy.seabo...@hp.com>
Subject RE: How to publish source JAR?
Date Mon, 15 Sep 2008 13:57:18 GMT
Adrian,

Thanks for pointing that out.  I've been trying to achieve much the same as Eric has and I
now have this form working.


What I'd really like though is to make the sources result look like "acme-9.8.7-sources.jar"
and have not found a way to do that because the artifact name is split.

Anyone got any ideas for this? (hopefully, I'm just missing something obvious ...)

        Andy

> -----Original Message-----
> From: Adrian Woodhead [mailto:adrian@last.fm]
> Sent: 9 September 2008 14:51
> To: ivy-user@ant.apache.org
> Subject: Re: How to publish source JAR?
>
> Well, assuming your build creates two jar files, say acme.jar and
> acme-source.jar I would do the following...
>
> In ivy.xml add two publications:
>
>   <publications>
>     <artifact name="acme" ext="jar"/>
>     <artifact name="acme-source" ext="jar"/>
>   </publications>
>
> Then your publish target should have one pattern like so:
>
> pattern="${target.dir}/[artifact]-[revision].[ext]" />
>
>
> and that should publish both jar files. What you tried to do with having
> two "artifacts" patterns within publish doesn't work as Ivy only uses
> the first pattern and ignores the other one.
>
> Let us know if that works for you.
>
> Regards,
>
> Adrian
>
> Lewis, Eric wrote:
> > Newbie is back  :-)
> >
> > Somehow I don't get it: How can I publish my JAR with the source files?
> > From what I understand, I can publish my JAR locally, by using
> >
> >         <ivy:publish resolver="local" overwrite="true"
> > pubrevision="${project.version}">
> >             <artifacts
> > pattern="${target.dir}/[artifact]-[revision].[ext]" />
> >         </ivy:publish>
> >
> > This works fine, but I also want to publish my source JAR. But
> >
> >         <ivy:publish resolver="local" overwrite="true"
> > pubrevision="${project.version}">
> >             <artifacts
> > pattern="${target.dir}/[artifact]-[revision].[ext]" />
> >             <artifacts
> > pattern="${target.dir}/[artifact]-[revision]-sources.[ext]" />
> >         </ivy:publish>
> >
> > doesn't publish the util-3.0.5-sources.jar from my util project.
> >
> > Also, is there any reference for the [] variables? I thought (from
> > looking at my IvyDE configuration) that perhaps the following could work
> >
> >             ...
> >             <artifacts
> > pattern="${target.dir}/[artifact]-[revision][source].[ext]" />
> >             ...
> >
> > or
> >             ...
> >             <artifacts
> > pattern="${target.dir}/[artifact]-[revision]-[source].[ext]" />
> >             ...
> > ?
> >
> > Any help is greatly appreciated!
> >
> > Thanks,
> > Eric
> >
Mime
View raw message