Using a custom repository with Apache Ivy, no resolver found

后端 未结 3 1282
囚心锁ツ
囚心锁ツ 2020-12-16 09:02

It seems that Apache ivy downloads artifacts only from http://mvnrepository.com/ and few other places, but all the jars are outdated there.

So I am trying to add cus

相关标签:
3条回答
  • 2020-12-16 09:12

    Your update target should invoke ivy:resolve task after ivy:settings.

    <target name="update" depends="init-ivy" description="Download project dependencies">
      <ivy:settings file="ivysettings.xml" />
      <ivy:resolve conf="default" />
      <ivy:retrieve pattern="war/WEB-INF/lib/[artifact]-[revision].[ext]" />
    </target>
    
    0 讨论(0)
  • 2020-12-16 09:14

    Ivyroundup is designed around the packager resolver in ivy. This resolver is incredibly clever, demonstrates the true power of ivy, but the bulk of the world uses Maven repositories to host their software. Fact is soon Maven Central will contain nearly 90% of the world's Java open source components.

    Enabling Maven repositories

    Thankfully, ivy fully understands Maven repositories, meaning we can use ivy as a client and let very good products like Nexus host the repository. Here's the settings file that enables Maven Central:

    <ivysettings>
      <settings defaultResolver='central'/>
      <resolvers>
        <ibiblio name='central' m2compatible='true'/>
      </resolvers>
    </ivysettings>
    

    I would highly recommend you consider setting up you own local instance of Nexus (Or Artifactory, or Archiva...). You can then cache Maven central artifacts (more efficient), search for software components and upload and host artifacts which cannot be downloaded, due to license restrictions (JDBC jars).

    Enabling a local repository manager also uses the ibiblio resolver as follows:

    <ivysettings>
      <settings defaultResolver='nexus'/>
      <resolvers>
        <ibiblio name='nexus' m2compatible='true' root='https://nexus.mydomain.com:8081/nexus/content/groups/central/' />
      </resolvers>
    </ivysettings>
    

    Searching Maven Central (New ivy support features)

    You're looking for the Spring 3.0.6 release? It's already in Maven Central:

    http://search.maven.org/#search|ga|1|g%3A%22org.springframework%22%20AND%20v%3A%223.0.6.RELEASE%22

    The Spring core artifact details are here:

    http://search.maven.org/#artifactdetails|org.springframework|spring-core|3.0.6.RELEASE|jar

    The search page now conveniently gives you both the Maven and ivy client declaration to copy into your build:

    <dependency org="org.springframework" name="spring-core" rev="3.0.6.RELEASE" >
        <artifact name="spring-core" type="jar" />
    </dependency>
    
    0 讨论(0)
  • 2020-12-16 09:16

    you must have something to tell whats the default resolver, like, <conf defaultResolver="default" />

    0 讨论(0)
提交回复
热议问题