On Mon, May 19, 2008 at 8:34 AM, Jerome Louvel <[EMAIL PROTECTED]> wrote:
>
> Hi Steve,
>
> Is there any special we need to ensure compatibility with both Ivy and Maven 
> regarding the repository? Is it working fine now with Ivy?
>

It works well with ivy today. The projects that cause problems are
those with different JVM versions (like testng that have a -java14 and
a -java15) qualifier.

This is my bit of a project's ivy.xml file to pull in the restlet
artifacts that I use


    <!--restlet api-->
    <dependency org="org.restlet"
        name="org.restlet"
        rev="${restlet.version}"
        conf="restlet->default"/>

    <!--this is the implementation and java.net integration-->
    <dependency org="com.noelios.restlet"
        name="com.noelios.restlet"
        rev="${restlet.version}"
        conf="restlet->default"/>
    <dependency org="com.noelios.restlet"
        name="com.noelios.restlet.ext.net"
        rev="${restlet.version}"
        conf="restlet->default"/>
    <dependency org="com.noelios.restlet"
        name="com.noelios.restlet.ext.httpclient"
        rev="${restlet.version}"
        conf="restlet->default">
      <exclude org="commons-httpclient"/>
    </dependency>

    <!--file upload-->
    <dependency org="org.restlet"
        name="org.restlet.ext.fileupload"
        rev="${restlet.version}"
        conf="restlet->default"/>
    <dependency org="commons-fileupload"
        name="commons-fileupload"
        rev="${commons-fileupload.version}"
        conf="restlet->default"/>

This creates a configuration called "restlet" that I can use at
compile/test time, and which is exported for things downstream. The
reason I exclude httpclient is that I use that in a separate project,
the one my restlet project depends on, and we have a rule: only one
SmartFrog component is allowed to import/manage a specific external
artifact. That's to give us one place to change the settings, and
because it matches the RPM rules, which tie JARs and other files to
specific RPMs.

Httpclient is trouble as it pulls in commons-logging and junit, and
commons-logging pulls in lots of cruft (it has a bad pom) unless you
tell it not to

    <dependency org="commons-httpclient"
        name="commons-httpclient"
        rev="${commons-httpclient.version}"
        conf="compile->master;httpclient->default">
      <exclude org="commons-logging"/>
      <exclude org="junit"/>
    </dependency>

    <dependency org="commons-codec"
        name="commons-codec"
        rev="${commons-codec.version}"
        conf="httpclient->default"/>
-again, elsewhere, commons-logging is picked up, but not avalon
logkit, an old servletapi and other things I dont want

    <!--it is essential that only the master JAR of commons logging
    is pulled in, as its dependencies are usually a mess, including things
    like out of date servlet APIs, bits of Avalon, etc.
    -->
    <dependency org="commons-logging"
        name="commons-logging"
        rev="${commons-logging.version}"
        conf="compile,redist->master"/>

For this to work I have an ivy-conf file that pulls in the public repository

    <ibiblio name="maven2"
        root="${ivy.ibiblio.root}"
        pattern="${maven2.pattern.ext}"
        m2compatible="true"
        />
    <ibiblio name="maven.restlet.org"
        root="${maven.restlet.org}"
        pattern="${maven2.pattern.ext}"
        m2compatible="true"
        />
    <chain name="default" dual="true">
      <resolver ref="local"/>
      <resolver ref="team2"/>
      <resolver ref="maven2"/>
      <resolver ref="maven.restlet.org"/>
    </chain>

There's some ant properties there to let people override the default
location with some cache.

Now, looking at the restlet.org repository, here are some troublespots
-the javax.ws.rs SNAPSHOTS. No interim releases are allowed in the
main maven repository
-the various third party things (like JSON).  you may need to work
with the [EMAIL PROTECTED] list to get these on board. They are pretty
unlikely to trust you as the official source of artifacts other than
your own

Reply via email to