ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kirby Files <>
Subject Re: ivy:publish vs publications
Date Thu, 15 Sep 2011 13:30:27 GMT
zharvey wrote on 09/15/2011 09:20 AM:
> Alan,
> Wow - thanks for such a thorough answer! I'm still not seeing the blatent
> connection between the publications tag and my ivy:publish task though.  Say
> I change my ivy.xml:
> <publications defaultconf="publish">
>      <artifact name="MyModule"/>
> </publications>

If you're just going to stick with the default of having the artifact 
have the same name as the ivy module, you don't even need to list the 
artifact up there, though it can help clear up any ambiguity for 
someone reading your ivy.xml.

> This just tells Ivy that I've got something to publish called MyModule.  But
> where do I tell Ivy that MyModule is actually located at
> workspace\MyProject\dist\MyModule-1.0.jar and that I want to publish it to
> my pubRepo repository when I run ivy:publish? I know what you're saying is
> correct, I'm just having trouble connecting all the dots.

In a publish task, the artifactspattern attribute describes the 
location of the file to be published on disk; the resolver attribute 
describes which resolver to publish to (a filesystem resolver or sftp, 
for example), and then you generally want a pubrevision and status as 

As an example, here's my default ant target for publishing:

    <target name="publish_only"
             description="--&gt; publish this project in the prod ivy 
         <property name="revision" value="${version}" />
                      update="true" />
         <echo message="project ${} released with 
version ${revision}" />

Kirby Files
Software Architect
Masergy Communications

View raw message