Hi, I would like to use the default maven repository with Ivy. I have found
the following settings for this:

    <ivysettings>
        <chain name="default-chain">
          <ibiblio name="maven.org" m2compatible="true"/>
        </chain>
    </ivysettings>

I would also like to use another repository which says that it requires the
following settings:

    <ivysettings>
            <property name="ivy.repo.url" value="http://www.sosy-lab.org/ivy
"/>
            <settings defaultResolver="Sosy-Lab"/>
            <resolvers>
                    <url name="Sosy-Lab" descriptor="required">
                    <ivy
pattern="${ivy.repo.url}/[organisation]/[module]/ivy-[revision].xml"/>
                    <artifact
pattern="${ivy.repo.url}/[organisation]/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
                    </url>
            </resolvers>
    </ivysettings>

Thus, the following `ivy.xml` would work:

    <ivy-module version="2.0">
        <info organisation="org.apache" module="hello-ivy"/>
        <dependencies>
            <dependency org="org.sosy_lab" name="java-smt" rev="3.7.0"/>
            <dependency org="org.springframework" name="spring-core"
rev="3.0.6.RELEASE" >
                <artifact name="spring-core" type="jar" />
            </dependency>
        </dependencies>
    </ivy-module>

However, the definitions for each of the repository look kind-of different
and so I do not know how to merge them into a single settings file. As of
now, the settings for maven above do not even work for `spring-core` in the
example `ivy.xml`.

This does not seem to work:

<ivysettings>
    <property name="sosy-lab.repo.url" value="http://www.sosy-lab.org/ivy"/>
    <property name="maven.repo.url" value="http://maven.org/"/>
    <!--settings defaultResolver="Sosy-Lab"/-->
    <resolvers>
        <url name="Sosy-Lab" descriptor="required">
            <ivy
pattern="${sosy-lab.repo.url}/[organisation]/[module]/ivy-[revision].xml"/>
            <artifact
pattern="${sosy-lab.repo.url}/[organisation]/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
        </url>
        <url name="maven.org" descriptor="required">
            <ivy
pattern="${maven.repo.url}/[organisation]/[module]/ivy-[revision].xml"/>
            <artifact
pattern="${maven.repo.url}/[organisation]/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
        </url>
    </resolvers>
</ivysettings>

How to configure Ivy so that it looks up both repositories?

Reply via email to