Hey Carsten,

With option 2 are you already specifying the srcivypattern? In theory if you've already called resolve, and you specify the srcivypattern for publish pointing to a non-existent location e.g.

/home/carsten/projects/projectx/dist/ivy.xml

Ivy should use the source file (/home/carsten/projects/projectx/ivy.xml) from your 
<resolve> task and deliver the resolved ivy.xml to your dist folder without the 
temporary copy step.

Jason


On 30/04/2013 10:05, carsten.pfeif...@gebit.de wrote:
Hi Jason,

thanks for your reply. These options are basically what I meant with
"making a copy to a temporary
location".

That's the only odd thing I encountered with ivy. Everything else is great
and works as expected,
but overwriting the source ivy file by default is really strange.

Thanks,
Carsten



From:   Jason R-J <jason_...@reast.net>
To:     ivy-user@ant.apache.org
Date:   30.04.2013 10:50
Subject:        Re: deliver overwriting the source ivy.xml




On 29/04/2013 17:10, carsten.pfeif...@gebit.de wrote:
Hi,

Is there a way to prevent the <deliver> (<publish>) task from
overwriting
the source ivy.xml file?

I have a bunch of project directories like this

projectx
    - src
    - dist
    - ivy.xml

Now when I publish these projects, the original ivy.xml is being
overwritten with the resolved version:
[ivy:publish]   delivering ivy file to
/home/carsten/projects/projectx/ivy.xml

How can I keep my original version untouched and let Ivy deliver
somewhere
else? Or do I have to copy the ivy.xml
to a temporary location (i.e. dist directory) and let it deliver/publish
from there?

Thanks
Carsten

I think you have two options:
1) Do an explicit <deliver> and give <publish> the srcivypattern to find
the delivered/resolved Ivy file.

          <!-- ship a copy of our resolved file -->
          <ivy:deliver deliverpattern="${distDir}/ivy.xml"
pubrevision="${buildVersionNo}" pubbranch="${BranchName}"
status="integration"/>

2) According to the documentation[1] provide <publish> with a
srcivypattern and it will use that for that for the implicit deliver -
assuming you've already called <resolve> prior to that.

[1] http://ant.apache.org/ivy/history/2.2.0/use/publish.html

Hope that helps.

Jason



Reply via email to