Custom Plus URL Identifier

I am trying to create a custom resolver in ivysettings.xml:

<ivysettings>
    <settings defaultResolver="default"/>
    <resolvers>
        <chain name="default">
            <url name="scala-tools">
                <ivy pattern="http://scala-tools.org/repo-releases/[organisation]/[module]/[revision]/ivy-[revision].xml" />
                <artifact pattern="http://scala-tools.org/repo-releases/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
                <artifact pattern="http://scala-tools.org/repo-releases/[organisation]/[module]/[revision]/[artifact].[ext]"/>
            </url>
            <!--<ibiblio name="ibiblio"/>-->
        </chain>
    </resolvers>
</ivysettings>

As you can see, I have only one UrlResolver that will try to find my dependencies in the scala-tools repo . If I define my dependencies correctly, then ivy will try to find it at http://scala-tools.org/repo-releases/org.scala-lang/scala-library/2.8.0/scala-library-2.8.0.jar and http://scala-tools.org/repo-releases/org.scala-lang/scala-library/2.8.0/scala-library.jar (yes, according to my instructions in ivysettings.xml) Obviously it is not finds something. To get the job, I have to specify the dependencies as follows:

<ivy-module version="2.2">
    <info organisation="org.yoba" module="Yoba"/>
    <dependencies>
        <dependency org="org/scala-lang" name="scala-library" rev="2.8.0"/>
        <!--<dependency org="org.scala-lang" name="scala-library" rev="2.8.0"/>-->
        <dependency org="org/scala-lang" name="scala-compiler" rev="2.8.0"/>
        <!--<dependency org="org.scala-lang" name="scala-compiler" rev="2.8.0"/>-->
    </dependencies>
</ivy-module>

Q: /- , ?

1: http://scala-tools.org/repo-releases/ scala -tools repo

+3
1

ivy.xml

POM scala - , scala -library. , :

<ivy-module version="2.0">
    <info organisation="org.yoba" module="Yoba"/>
    <dependencies>
        <dependency org="org.scala-lang" name="scala-compiler" rev="2.8.0" conf="default"/>
    </dependencies>
</ivy-module>
  • "2.0"
  • ,

ivysettings.xml

ibiblio , Maven.

<ivysettings>
    <settings defaultResolver="scalatools"/>
    <resolvers>
        <ibiblio name="scalatools" root="http://scala-tools.org/repo-releases" m2compatible="true"/>
    </resolvers>
</ivysettings>

, , scala scala

<ivysettings>
    <settings defaultResolver="central"/>
    <resolvers>
        <ibiblio name="central" m2compatible="true"/>
        <ibiblio name="scalatools" root="http://scala-tools.org/repo-releases" m2compatible="true"/>
    </resolvers>
    <modules>
        <module organisation="org.scala-lang" resolver="scalatools"/>
    </modules>
</ivysettings>
+6

Source: https://habr.com/ru/post/1762254/


All Articles