You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Jean-Louis BOUDART <je...@gmail.com> on 2008/11/14 02:48:37 UTC
How to publish source jar on Ivy repository
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