ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fernandes, Gerard" <gerard.fernan...@lehman.com>
Subject RE: Publishing
Date Tue, 18 Dec 2007 15:08:55 GMT

Well, I'm doing something similar - at least it would appear so,
provided I've understood you correctly.

I have a common build script that does all the compiling, testing,
packaging and publishing. I use this for multiple projects.

The way to tell Ivy to publish just one (or more) artifacts is by the
ivy.xml <publications> element.

So you can have a publish in Ant that does all possible combinations of
patterns. And you have a <publications> element that informs Ivy what
patterns the current project will produce. And <ivy:publish> works as
expected - it will only publish artifacts your project says it will
publish.

Presuming one ivy.xml per project of course. 

-----Original Message-----
From: esumerfd@gmail.com [mailto:esumerfd@gmail.com] On Behalf Of Edward
Sumerfield
Sent: 18 December 2007 13:57
To: ivy-user@incubator.apache.org
Subject: Re: Publishing

So, maybe I am making this harder than it needs to be. I have a set of
common targets in a build-common.xml file that are included into each
projects build. There is a proc.build.jar target that perform the
standard jaring process and it is here that I added the publish.

So, I need a way of telling publish to only publish one jar, the one
that was just created. The solution below forces me to make the publish
ant code project specific.

The artifactpattern solution ends up selecting the 3 different jars
correctly but publishing them to the same name in the local repository.

I am passing into this common target the "conf", "jar name" and "jar
version". Can't I tell the publish task the target name of the artifact
for the repository?

On Dec 18, 2007 4:31 AM, Fernandes, Gerard <gerard.fernandes@lehman.com>
wrote:

>
> I believe the default in Ivy is to look for and publish an artifact 
> with the same name as the module in the ivy.xml configuration file.
>
> If you need to publish more than one artifact, you'd have to declare 
> them under the <publications> element. E.g.:
>        <publications>
>                <artifact name="myProject" type="jar" />
>                <artifact name="myProject-examples" type="jar" />
>                <artifact name="myProject" type="source" ext="zip" />
>                <artifact name="myProject-examples" type="source"
> ext="zip" />
>                <artifact name="myProject-doc" type="javadoc" ext="zip"
> />
>                <artifact name="myProject-conf" type="jar" ext="zip" />
>        </publications>
>
> Then you need an <ivy:publish...> ant task in an appropriate ant 
> target that will pick up appropriate artifact patterns and publish 
> them - after your ant script has built and packaged artifacts that 
> match the pattern you will pick up. E.g.
>
>                <ivy:publish
>                                resolver="publishedLibraries"
>                                pubrevision="${artifact.version}">
>                        <artifacts
> pattern="${basedir}/${dist.dir}/[artifact].[ext]"/>
>                        <artifacts
> pattern="${basedir}/${dist.dir}/[artifact]-examples.[ext]"/>
>                        <artifacts
> pattern="${basedir}/${dist.dir}/[artifact]-doc.[ext]"/>
>                        <artifacts
> pattern="${basedir}/${dist.dir}/[artifact]-conf.[ext]"/>
>                </ivy:publish>
>
> Have a look at the Apache Ivy documentation as well for more details.
>
> Gerard
>
> -----Original Message-----
> From: esumerfd@gmail.com [mailto:esumerfd@gmail.com] On Behalf Of 
> Edward Sumerfield
> Sent: 18 December 2007 00:03
> To: ivy-user@incubator.apache.org
> Subject: Publishing
>
> I am just starting to understand publishing and am trying to publish 
> jars generated by one eclipse project. What appears to be happening is

> that each jar produced by the project file is being published to the 
> same place in the local repository.
>
> How should I approach the problem of multiple jars being published 
> form the same project?
>
> --
> Ed
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
> - -
> - - - - - - -
>
> This message is intended only for the personal and confidential use of

> the designated recipient(s) named above.  If you are not the intended 
> recipient of this message you are hereby notified that any review, 
> dissemination, distribution or copying of this message is strictly 
> prohibited.  This communication is for information purposes only and 
> should not be regarded as an offer to sell or as a solicitation of an 
> offer to buy any financial product, an official confirmation of any 
> transaction, or as an official statement of Lehman Brothers.  Email 
> transmission cannot be guaranteed to be secure or error-free.  
> Therefore, we do not represent that this information is complete or 
> accurate and it should not be relied upon as such.  All information is
subject to change without notice.
>
>
>
>


--
Ed
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

This message is intended only for the personal and confidential use of the designated recipient(s)
named above.  If you are not the intended recipient of this message you are hereby notified
that any review, dissemination, distribution or copying of this message is strictly prohibited.
 This communication is for information purposes only and should not be regarded as an offer
to sell or as a solicitation of an offer to buy any financial product, an official confirmation
of any transaction, or as an official statement of Lehman Brothers.  Email transmission cannot
be guaranteed to be secure or error-free.  Therefore, we do not represent that this information
is complete or accurate and it should not be relied upon as such.  All information is subject
to change without notice.




Mime
View raw message