Hi Topher,
some fragments from our ivy-settings and an ivy file below. The
pattern in the resolver takes it's values from the settings in the
ivy.xml files so in this case we publish a war, and sources and
javadoc jars.
Cheers,
Geoff
Ivy settings:
...
property name="ivy.shared.m2.ivy.pattern"
value="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"
override="false"/>
<property name="geonet.repo" value="http://url.to.repo" override="false"/>
...
<resolvers>
<url name="geonet-enterprise-enterprise-http"
m2compatible="true">
<ivy
pattern="${geonet.repo}/enterprise/${ivy.shared.m2.ivy.pattern}"/>
<artifact
pattern="${geonet.repo}/enterprise/${ivy.shared.m2.artifact.pattern}"/>
</url>
...
</resolvers>
...
ivy.xml
....
<publications>
<artifact name="quake-search-web" type="war" ext="war" conf="master"/>
<artifact name="quake-search-web" type="source" ext="jar"
conf="sources" m:classifier="sources"/>
<artifact name="quake-search-web" type="doc" ext="jar"
conf="javadoc" m:classifier="javadoc"/>
</publications>
....
On Tue, Aug 11, 2009 at 9:30 AM, Chris Marks<[email protected]> wrote:
> Hi all,
> I've been using Ivy for dependency resolution for a couple months now and I
> love it. Now I have a project (called data-collector) that I want to
> publish to a private repository to be consumed by other Ivy and Maven
> projects. My problem is that I want to publish the jar, sources and javadoc
> files to the repository using the ibiblio naming conventions, but can't make
> Ivy publish it the way I want. Here's what I've been able to do so far:
> I've been able to use <ivy:makePom> to successfully generate a pom. My
> first publish attempts were successful to the repository (Artifactory) and
> it published with the names data-collector-1.0-SNAPSHOT.jar and
> data-collector-1.0-SNAPSHOT.pom. I used a url resolver with the artifact
> pattern of "
> http://myserver/publishRepo/[organization]/[module]/[revision]/[artifact]-[revision].[ext]".
> and publish artifact pattern of "${dist.packageDir}/[artifact].[ext]".
> I then created the source jar on my machine as data-collector-sources.jar
> and tried to publish, to no avail. I changed where the jar, pom and sources
> files were created to a structure that lead to the publish artifact pattern
> of "${dist.packageDir}/[type]/[artifact].[ext]" and a resolver pattern of
> http://myserver/publishRepo/[organization]/[module]/[revision]/[artifact]-[revision]-[type].[ext].
> This published, but gave me data-collector-1.0-SNAPSHOT-jar.jar, which IvyDE
> and other tools would not resolve out of the box. I want to keep the
> resolution of my artifacts as close to "out-of-the-box" as possible.
> So, how can I configure Ivy and my Ant build script to publish my files as
> data-collector-[revision].jar, data-collector-[revision].pom,
> data-collector-[revision]-sources.jar, and
> data-collector-[revision]-javadoc.jar?
>
> Thanks,
> topher
>