ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jasper Floor <jasper.fl...@m4n.nl>
Subject Re: 2 Questions for ivyIDE
Date Wed, 21 Mar 2012 09:40:59 GMT
On Tue, Mar 20, 2012 at 7:05 PM, Alan Chaney <alan@writingshow.com> wrote:
> On 3/20/2012 10:51 AM, David Sills wrote:
>>
>> What an interesting problem. I still haven't been able to publish source
>> files correctly. You indicated that the file name must be
>
> The publications element could look something like:
> <publications>
> <artifact/>
> <artifact  type="source" ext="zip"/>
> </publications>
>
> By default, this will give you someproject-1.2.3.zip  if the revision is
> 1.2.3.  The publications pattern is controlled by 'artifactspattern' in the
> publish task - default is: ${ivy.publish.src.artifacts.pattern} - see Ivy
> docs:
>
> http://ant.apache.org/ivy/history/2.2.0/use/publish.html

Hi,

Ivy newcomer mysefl but I have managed to publish sources What worked
for me is pretty much as was stated above, but for what its worth here
is my publications element:

    <publications>
        <artifact type="jar" conf="build"/>
        <artifact type="pom" />
        <artifact type="src" name="project_src" ext="jar" conf="build"/>
    </publications>

So I publish project.jar, project.pom and project_src.jar. The big
difference from above is the name element. This makes sure I get
project_src.jar rather than project.jar (which I already have via the
artifact type="jar" element). Trying to publish the library and source
under the same name doesn't work very well.

This is my publish task:

    <target name="publish" depends="build_common.init-ivy, jar,jar-src" >
        <ivy:deliver pubrevision="${artifact.revision}"
deliverpattern="dist/ivy.xml" status="${artifact.status}"/>
        <ivy:makepom ivyfile="dist/ivy.xml" pomfile="dist/project.pom"
settingsRef="compnay.settings" />
        <ivy:publish resolver="publish" update="true"
artifactspattern="dist/[artifact].[ext]" conf="build"
revision="${artifact.revision}" status="${artifact.status}"
overwrite="${artifact.overwrite}" settingsRef="company.settings" />
    </target>

Deliver makes an ivy.xml, makepom uses that to make a pom (actually,
not sure if I need to do a deliver first but it works) and publish
puts all that in a company Nexus/Maven repository. There really is no
more to it than that.

mvg,
Jasper

Mime
View raw message