ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Marks <topher1...@gmail.com>
Subject Re: Help with resolver pattern for publishing
Date Tue, 11 Aug 2009 17:14:26 GMT
Hi Geoff,
Thanks for the information, this is exactly what I was hoping for.  I was a
bit thrown off by the m namespace due to parsing problems, but soon figured
out the right namespace (xmlns:m="http://ant.apache.org/ivy/maven" for
future queries) to add to ivy.xml.

Thanks,
topher


On Mon, Aug 10, 2009 at 3:45 PM, Geoff Clitheroe <g.clitheroe@gmail.com>wrote:

> 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<topher1120@gmail.com> 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]<http://myserver/publishRepo/%5Borganization%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D.%5Bext%5D>
> ".
> > 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]<http://myserver/publishRepo/%5Borganization%5D/%5Bmodule%5D/%5Brevision%5D/%5Bartifact%5D-%5Brevision%5D-%5Btype%5D.%5Bext%5D>
> .
> > 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
> >
>

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