ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xavier Hanin" <xavier.ha...@gmail.com>
Subject Re: resolvers that handle publish
Date Thu, 03 Jan 2008 20:36:49 GMT
On Jan 1, 2008 9:29 AM, Shawn Castrianni <Shawn.Castrianni@halliburton.com>
wrote:

> The documentation is clear how a resolver will handle a retrieve.  It will
> check each artifact pattern one by one until it finds one that works to get
> each artifact.  However, the documentation is not clear how a resolver
> handles a publish.  My goal is to have my jar files published to a jar
> directory (that is good for all platforms) and to have my native dll's and
> so's be published into a subdirectory with that platform name.  I tried
> using configurations as my platforms, but I noticed a post that stated that
> isn't supported during the publish phase (to use the [conf] in the artifact
> pattern during a publish).  The post suggested to use extra attributes
> instead.  That does work, except it works on all artifacts, not just the
> ones that need it.
>
> In other words, my jar artifacts do not have a platform extra attribute.
>  My dll's and so's do have an extra platform attribute.  Here is my
> resolver:
>
>                                <filesystem name="local">
>                                                <ivy pattern="${
> ivy.local.root
> }/[organisation]/[module]/[revision]/[type]/[artifact].[ext]"/>
>                                                <artifact pattern="${
> ivy.local.root
> }/[organisation]/[module]/[revision]/[type]/[artifact].[ext]"/>
>                                                <artifact pattern="${
> ivy.local.root
> }/[organisation]/[module]/[revision]/[type]/[platform]/[artifact].[ext]"/>
>                                </filesystem>
>
> I want the second pattern to be used for those artifacts that have a
> platform specified and the first pattern to be used for those that don't.  I
> can't get this to work.  Whichever pattern is listed first will be used for
> all artifacts.  It seems that this separation of native binaries is a common
> requirement.
>
> My two thoughts would be to try:
>
> 1.       set the platform to empty string for the jars

This is the easiest solution ATM IMO. Using only one artifact pattern like
this:
<artifact pattern="${ivy.local.root
}/[organisation]/[module]/[revision]/[type](/[platform])/[artifact].[ext]"/>
should then be ok (maybe even if you don't specify any platform for the
jars).

With conditional patterns on resolvers you could specify when to use each
pattern which would make the solution even cleaner IMO. Vote for IVY-324 if
you'd like to see it implemented.

Xavier


>
> 2.       write my own resolver just for publishing
>
> ---
> Shawn Castrianni
>
>
> ----------------------------------------------------------------------
> This e-mail, including any attached files, may contain confidential and
> privileged information for the sole use of the intended recipient.  Any
> review, use, distribution, or disclosure by others is strictly prohibited.
>  If you are not the intended recipient (or authorized to receive information
> for the intended recipient), please contact the sender by reply e-mail and
> delete all copies of this message.




-- 
Xavier Hanin - Independent Java Consultant
http://xhab.blogspot.com/
http://ant.apache.org/ivy/
http://www.xoocode.org/

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