I want to have the Ivy file published in the repository, but I don't need the intermediate copy in the dist/ folder (or anywhere else). I would have expected that the Ivy file would be - put into the cache - published to the repository
I don't need the third copy :-) I understand that some people might want to programmatically validate or even modify the file before publishing, but I don't have such needs (yet). Cheers Carsten From: Jason R-J <jason_...@reast.net> To: ivy-user@ant.apache.org Date: 30.04.2013 11:38 Subject: Re: deliver overwriting the source ivy.xml That's good news! Am I understanding that you don't want the resolved Ivy file at all? In that case can you just set publishivy="false" on the publish task? Jason On 30/04/2013 10:34, carsten.pfeif...@gebit.de wrote: >> I'll check if Ivy will indeed create that copy automatically for me. > That worked! So I only need to specify srcivypattern to some temporary > file. > > Thanks > Carsten > > > > From: carsten.pfeif...@gebit.de > To: ivy-user@ant.apache.org > Date: 30.04.2013 11:29 > Subject: Re: deliver overwriting the source ivy.xml > > > > Hi Jason, > > my problem is that I do not want to have the ivy.xml inside the dist/ > directory. > For some of the projects, I do not even have a separate dist/ directory. > That's > why I point srcivypattern to a temporary location. > > But I thought that srcivypattern should actually point to an existing > file, i.e. > the copy that I would manually create. > > I'll check if Ivy will indeed create that copy automatically for me. IMHO > 'srcivypattern' > is a bit of a misnomer then. "source" for being published, but "dest" for > delivery. > > Thanks again, > Carsten > > > > From: Jason R-J <jason_...@reast.net> > To: ivy-user@ant.apache.org > Date: 30.04.2013 11:18 > Subject: Re: deliver overwriting the source ivy.xml > > > > > 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 >> >> > > >