Hi Phil,

I've thrown together a small example that uses the Tomcat 7 API.

*build.gradle:*

apply plugin: 'java'
apply plugin: 'eclipse'

repositories {
    add(new org.apache.ivy.plugins.resolver.packager.PackagerResolver()) {
        name = 'local Ivy packagers'

        buildRoot = file("${gradle.gradleUserHomeDir}/packager/build")
        resourceCache = file("${gradle.gradleUserHomeDir}/packager/cache")

        addIvyPattern
"file:///${project.rootDir}/ivy/[organisation]/[module]/ivy-[revision].xml"
        addArtifactPattern
"file:///${project.rootDir}/ivy/[organisation]/packager.xml"
    }
}

dependencies {
    compile group: 'org.apache.tomcat', name: 'tomcat-api', version: '7.0'
}

*ivy/org.apache.tomcat/packager.xml:*

<?xml version="1.0" encoding="UTF-8"?>

<packager-module version="1.0">
    <resource url="
http://apache.mirrors.webazilla.nl/tomcat/tomcat-7/v7.0.0-beta/bin/apache-tomcat-7.0.0.zip";
sha1="88e8c4a0d09bb8517353407985ca236359d2719b"/>

    <build>
        <move
file="archive/apache-tomcat-7.0.0/lib/${ivy.packager.module}.jar"
tofile="artifacts/jars/${ivy.packager.module}.jar"/>
    </build>
</packager-module>

*ivy/org.apache.tomcat/tomcat-api/ivy-7.0.xml:*

<?xml version="1.0" encoding="UTF-8"?>

<ivy-module version="2.0">
    <info organisation="org.apache.tomcat" module="tomcat-api"
revision="7.0"/>
</ivy-module>

Running gradle eclipse (I'm using 0.9-preview-3) will generate a
.classpaththat points to the unzipped
tomcat-api.jar.

HTH,
  Levi

2010/8/10 phil swenson <[email protected]>

> thanks for the direction... but I have no clue how to set this up.  I
> looked at this link
> http://ivyroundup.googlecode.com/svn/wiki/files/packager.html and was
> left very confused.  I do have other ivy resolvers set up like this:
>
> addIvyPattern '
> http://archivaserver:8080/archiva/repository/osgi-internal/[organisation]/[module]/[revision]/ivy_[revision].xml
> '
>    addArtifactPattern
> "
> http://archivaserver:8080/archiva/repository/osgi-official/[organisation]/[organisation]/[module]_[revision](-[classifier]).[ext]<http://archivaserver:8080/archiva/repository/osgi-official/[organisation]/[organisation]/[module]_[revision]%28-[classifier]%29.[ext]>
> "
>
> So any hints on how to resolve a jar in jar?
> thanks
>
>
>
> On Mon, Aug 9, 2010 at 2:10 PM, Levi Hoogenberg
> <[email protected]> wrote:
> > Ivy has a very flexible resolver for this purpose: the packager resolver.
> It
> > requires a little more configuration than other resolvers, but it is
> quite
> > powerful.
> >
> > Op 9 aug 2010 21:54 schreef "phil swenson" <[email protected]>:
> >
> > I am consuming a build from an archiva repository.  One of the jars
> > looks like this:
> >
> > javax.jms_1.1.0.200810061358.jar
> > contents:
> >     about.html
> >     about_files
> >     LICENSE.txt
> >     jms.jar
> >     META-INF
> >     MANIFEST.MF
> >
> > The jar I need is actually the jms.jar inside this javax.jms....jar
> >
> > The only way I've been able to consume this jar is by pulling jms.jar
> > out of the repository's javax.jms_1.1.0.200810081358.jar and saving it
> > to the file system and consuming it via: repositories { flatDir:
> > my_dir_with_jms.jar_in_it}
> >
> > Anyone know of a good solution to this?
> >
> > thanks,
> > phil
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> >    http://xircles.codehaus.org/manage_email
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>

Reply via email to