Grammin
Grammin

Reputation: 12205

Using multiple ivy:retrieve patterns in my build.xml to associate with multiple artifact patterns

I have files in two different directories that I would like to publish. One set of files has a .jar extension the other set doesn't have any extension at all.

In my build.xml file under publish I have the following code:

<ivy:publish resolver="public-publisher" conf="default"
   deliverivypattern="${build}/${delivery.pattern}">
  <artifacts pattern="${build}/[artifact].[ext]"/>
  <artifacts pattern="${misc}/bin/[artifact]"/>
</ivy:publish>

then when I do my retrieve I tried to do something like:

<ivy:retrieve pattern="ivyLib/[artifact].[ext]" conf="default" />
<ivy:retrieve pattern="ivyLib/[artifact]" conf="default"/>

but that didn't work. It puts a . after my files that don't have any extensions on them. Now I'm all out of ideas and any help would be greatly appreciated.

Thanks in advance,

Josh

Upvotes: 1

Views: 1541

Answers (1)

Matt
Matt

Reputation: 8476

try this instead

<ivy:retrieve pattern="ivyLib/[artifact](.[ext])" conf="default" />

the () makes the contents of the () optional so it should match ivyLib/Foo and ivyLib/Foo.jar

Upvotes: 1

Related Questions