You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Douglas Rohm <do...@sent.com> on 2012/04/27 16:36:47 UTC

Ivy Settings Patterns

Is there a way when designating a resolver ivy pattern to be able
to do something like the following?



/MyCompany/MyModule/1.2.3/4/ivy.xml



Currently, the [revision] token resolves to the full 4-digit
version number.  I'd like to be able to use the first three
digits of the revision for a part of the pattern and use the last
digit for a subfolder below that.  Is this possible or would I
have to write custom ant code to do this?



Something like this:



<resolvers>

  <filesystem name="myresolver">

    <ivy
pattern="${my.dir}/[organisation]/[module]/[shortrevision]/[build
]/ivy.xml" />

    <artifact
pattern="${my.dir}/[organisation]/[module]/[shortrevision]/[build
]/([target])[artifact].[ext]" />

  </filesystem>

</resolvers>



where:

[organisation] = MyCompany

[module] = MyModule

[shortrevision] = 1.2.3

[build] = 4



Thanks,



Doug

Re: Ivy Settings Patterns

Posted by Tom McGlynn <tm...@ieee.org>.
Create an extra attribute called "build".

On Fri, Apr 27, 2012 at 10:36 AM, Douglas Rohm <do...@sent.com> wrote:

> Is there a way when designating a resolver ivy pattern to be able
> to do something like the following?
>
>
>
> /MyCompany/MyModule/1.2.3/4/ivy.xml
>
>
>
> Currently, the [revision] token resolves to the full 4-digit
> version number.  I'd like to be able to use the first three
> digits of the revision for a part of the pattern and use the last
> digit for a subfolder below that.  Is this possible or would I
> have to write custom ant code to do this?
>
>
>
> Something like this:
>
>
>
> <resolvers>
>
>  <filesystem name="myresolver">
>
>    <ivy
> pattern="${my.dir}/[organisation]/[module]/[shortrevision]/[build
> ]/ivy.xml" />
>
>    <artifact
> pattern="${my.dir}/[organisation]/[module]/[shortrevision]/[build
> ]/([target])[artifact].[ext]" />
>
>  </filesystem>
>
> </resolvers>
>
>
>
> where:
>
> [organisation] = MyCompany
>
> [module] = MyModule
>
> [shortrevision] = 1.2.3
>
> [build] = 4
>
>
>
> Thanks,
>
>
>
> Doug
>