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 John Gill <ll...@gmail.com> on 2007/02/12 12:41:19 UTC
Publishing versioned and unversioned artifacts
I like the idea of publishing versioned artifacts (particularly jar files),
but for some artifacts publishing them as versioned is not a good idea.
For example, lets say I have a package that has a jar file, and an HTML file
with the release notes in it, and the release notes references an image file
which is also release with it.
So what I want is a published results which looks like this:
\jar\myjar-1.2.3.jar
\doc\ReleaseNotes.html
\doc\UML.png
So in my ivy.xml I'd have the publications listed like this:
<publications>
<artifact name="ReleaseNotes" type="doc" ext="html" />
<artifact name="UML" type="doc" ext="png" />
<artifact name="myjar" type="jar" />
</publications>
And my ivyconf.xml has a resolver that I will publish to like this:
<resolvers>
<filesystem name="builds">
<ivy pattern="${build.dir}/pkg/ivys/ivy-[revision].xml"/>
<artifact pattern="${build.dir
}/pkg/[type]/[artifact]-[revision].[ext]"/>
</filesystem>
</resolvers>
The problem with the above resolver is that it will release the doc types as
ReleaseNotes-1.2.3.html and UML-1.2.3.png, and ReleaseNotes refers to the
image as UML.png and not UML-1.2.3.png.
So basically I want to use a different artifact pattern for different types.
The jar types can use the pattern as shown, but I want the doc types to use
the following pattern:
<artifact pattern="${build.dir}/pkg/[type]/[artifact].[ext]"/>
Is there a way to do what I want?
--
Regards,
John Gill
Re: Publishing versioned and unversioned artifacts
Posted by Xavier Hanin <xa...@gmail.com>.
On 2/12/07, John Gill <ll...@gmail.com> wrote:
>
> I like the idea of publishing versioned artifacts (particularly jar
> files),
> but for some artifacts publishing them as versioned is not a good idea.
>
> For example, lets say I have a package that has a jar file, and an HTML
> file
> with the release notes in it, and the release notes references an image
> file
> which is also release with it.
>
> So what I want is a published results which looks like this:
>
> \jar\myjar-1.2.3.jar
> \doc\ReleaseNotes.html
> \doc\UML.png
>
> So in my ivy.xml I'd have the publications listed like this:
> <publications>
> <artifact name="ReleaseNotes" type="doc" ext="html" />
> <artifact name="UML" type="doc" ext="png" />
> <artifact name="myjar" type="jar" />
> </publications>
>
> And my ivyconf.xml has a resolver that I will publish to like this:
> <resolvers>
> <filesystem name="builds">
> <ivy pattern="${build.dir}/pkg/ivys/ivy-[revision].xml"/>
> <artifact pattern="${build.dir
> }/pkg/[type]/[artifact]-[revision].[ext]"/>
> </filesystem>
> </resolvers>
>
> The problem with the above resolver is that it will release the doc types
> as
> ReleaseNotes-1.2.3.html and UML-1.2.3.png, and ReleaseNotes refers to the
> image as UML.png and not UML-1.2.3.png.
>
> So basically I want to use a different artifact pattern for different
> types.
> The jar types can use the pattern as shown, but I want the doc types to
> use
> the following pattern:
> <artifact pattern="${build.dir}/pkg/[type]/[artifact].[ext]"/>
>
> Is there a way to do what I want?
No, I don't see any for the moment. But you can vote for issue IVY-324 [1]
and add a comment to show your use case.
- Xavier
[1] https://issues.apache.org/jira/browse/IVY-324
--
> Regards,
> John Gill
>