ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Louis BOUDART" <jeanlouis.boud...@gmail.com>
Subject How to publish source jar on Ivy repository
Date Fri, 14 Nov 2008 01:48:37 GMT
Hi all,

I'm currently working on a module for Source Jar publication for EasyAnt (
http://easyant.abrm.info).

But i see that there is many way to do it, and i would like to have your
opinion / or feedback on each methods.
I would like to have to publish two different jars foobar.war and
foobar-source.jar


   - Using different directory for artifacts type

I should have a publish directory like this :
myTargetDir/war/foobar.war
myTargetDir/source/foobar.jar

In my ant script :
<ivy:publish ...>
<*artifacts* pattern="${target.dir}/[type]/[*artifact*]-[revision].[ext]" />
</ivy:publish>

In my ivy file :
<publications>
        <artifact type="war"/>
        <artifact type="source"/>
</publications>

This means i must update my repository pattern to support [type].
My repo pattern :
repository/[organisation]/[module]/[revision]/[artifact]/[type]/[artifact].[ext]


   - Using multiple artifact pattern

In my ant script :
<ivy:publish ...>
         <*artifacts* pattern="${target.dir}/[*artifact*]-[revision].[ext]"
/>
         <*artifacts* pattern="${target.dir}/[*artifact*]-[revision]-*
sources*.[ext]" />
</ivy:publish>

   - Using extra attribue

In my ant script :
<ivy:publish ...>
<*artifacts* pattern="${target.dir}/[*artifact*]-[revision](-[classifier]).[ext]"
/>
 </ivy:publish>

In my ivy file :
<publications>
        <artifact type="war"/>
        <artifact e:classifier="source"/>
</publications>

This means i must update my repository pattern to support [classifier].
My repo pattern :
repository/[organisation]/[module]/[revision]/[artifact](-[classifier]).[ext]
I have a preference on this method, because it allow you to have the
"compiled" artifact in the same directory of your repository.


What do you think about it?

Cheers,
Jean Louis

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message