Questions tagged [ivy]

Apache Ivy is a subproject of Ant to simplify dependency management. Its primary use is to retrieve prerequisite JAR files from repositories and to publish new JAR files. A major feature of Ivy is that it integrates with normal Ant projects instead of requiring a new paradigm. (Note: This tag should not be used for questions regarding Angular's Ivy compiler - instead, use the angular-ivy tag.)

Apache Ivy is a subproject of Ant to simplify dependency management.
Its primary use is to retrieve prerequisite JAR files from repositories and to publish new JAR files. A major feature of Ivy is that it integrates with normal Ant projects instead of requiring a new paradigm.
It is able to handle Maven repositories.

Enable Ivy in your build.xml

Ivy is packaged as an antlib, so to enable it you need to do the following

  1. Declare the ivy namespace at the top of the build file

    <project ..... xmlns:ivy="antlib:org.apache.ivy.ant">
    
  2. Include the ivy jar in one of the ant library directories. A good practice is to include the following target in your build files to setup a new environment:

    <target name="install" description="Used to install the ivy task jar">
      <mkdir dir="${user.home}/.ant/lib"/>
      <get dest="${user.home}/.ant/lib/ivy.jar" src="http://search.maven.org/remotecontent?filepath=org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar"/>
    </target>
    

Getting Started

References

Eclipse-Plugin

Repository Managers

IVY and Maven

1588 questions
32
votes
3 answers

IllegalStateException: impossible to get artifacts when data has not been loaded for Guava 12.0?

In a Java Play 2.1.1 app I get the following error: [myproject] $ update [info] Updating {file:/C:/path/myproject/}myproject... [info] Resolving ... [error] impossible to get artifacts when data has not been loaded. IvyNode =…
Gonfi den Tschal
  • 1,754
  • 1
  • 20
  • 29
31
votes
1 answer

Equivalent of mvn dependency:tree in Grails

I am trying to find out some dependencies added to a grails plugin that I am using in my grails project. Is there any equivalent of maven command mvn dependency:tree in Grails/Ivy
Dhanush Gopinath
  • 5,652
  • 6
  • 37
  • 68
31
votes
1 answer

How are maven scopes mapped to ivy configurations by ivy

Maven repositories, like Maven Repository offer the widest range of projects for dependency management. Ivy offers the possibility to access maven repositories and download artifacts from there. There are only pom files in those repositories and no…
oers
  • 18,436
  • 13
  • 66
  • 75
30
votes
8 answers

Large Java System Dependency Management

We have a large (>500,000 LOC) Java system that depends on 40-50 OSS packages. The system is built with Ant, and dependency management is handled manually at present. I'm investigating Ivy and/or Maven to automate dependencies. We looked at Maven…
Jim Garrison
  • 85,615
  • 20
  • 155
  • 190
29
votes
2 answers

Use maven repository as local ivy cache

Is there any possibility to use local Maven repository (~/.m2) as local Ivy cache (~/.ivy)? They have different layouts. Sometimes I use Maven and sometimes I use SBT which uses Ivy underneath, so I have 2 copies of same libs in both Maven and Ivy.…
Yura Taras
  • 1,293
  • 14
  • 26
28
votes
4 answers

what is ivy? and how it is related to ant?

I have seen many ivy files in my application's build projects. What is Ivy, and its relation with ant?
GuruKulki
  • 25,776
  • 50
  • 140
  • 201
28
votes
5 answers

How to attach sources to SBT managed dependencies in Scala IDE?

I'm using Scala IDE 2.0.1 and SBT 0.11.2 to start with Akka 2.0.1. My build.sbt looks like this: name := "akka" version := "0.1" scalaVersion := "2.9.2" resolvers += "Typesafe Repository" at…
Christian Schlichtherle
  • 3,125
  • 1
  • 23
  • 47
27
votes
3 answers

Angular 9 Ivy - Generic type 'ɵɵFactoryDef' requires 2 type argument(s)

Looks like Angular Ivy not ready yet. I'm trying to build my project using ivy which is the main idea for Angular 9. Many of libraries are not compatible with this feature, one of these library is @angular/flex-layout. Material and service-worker…
Yazan Mehrez
  • 1,174
  • 2
  • 10
  • 23
27
votes
1 answer

Ant target failing: Antlib or Ivy issue?

Possible Duplicate: Ivy fails to resolve a dependancy, unable to find cause I'm trying to run the following build task (initIvy):
IAmYourFaja
  • 55,468
  • 181
  • 466
  • 756
26
votes
2 answers

Promoting several modules (integration -> milestone) in ivy

Ivy is great for managing dependencies, but it isn't meant to handle the entire software lifecycle across many modules. That said, it does have several features that seem to support it (such as the status and branch attributes), and the ivy best…
oksayt
  • 4,333
  • 1
  • 22
  • 41
26
votes
5 answers

How to get the next build number in Gradle

Is there any way to get the next version when publishing to a repository in gradle? For e.g. if I have the version 3.0.1 in my repository I want the published version to be 3.0.2. ivy has a task for ant named buildnumber which does exactly…
Daniel Taub
  • 5,133
  • 7
  • 42
  • 72
26
votes
4 answers

How does ivy:publish work?

I'm completely at loss how the ant task ivy:publish is supposed to work. I would expect that I do my normal build, which creates a bunch of jar files, then I would push those jars to the (local) repository. How can I specify from where to retrieve…
Mauli
  • 16,863
  • 27
  • 87
  • 114
26
votes
3 answers

Can Gradle handle a build directory structure that does not conform default conventions?

I am working on a java ant+ivy based project that has the following directory structure: projectRoot/src projectRoot/classes projectRoot/conf projectRoot/webservices this works perfectly well in ant but I am looking to migrate to gradle. Is there a…
liam.j.bennett
  • 424
  • 1
  • 4
  • 11
25
votes
4 answers

ivysettings.xml: add local maven path

How to add a local path (not URL) to ivysettings.xml? I need to add my Maven local repository (/Users/me/.m2/repository to it. Thanks
pistacchio
  • 56,889
  • 107
  • 278
  • 420
25
votes
4 answers

Why sbt runs dependency resolution every time after clean?

SBT runs dependency resolution every time after clean even if project dependency management configuration hasn't changed. This is time consuming when running on CI server. But documentation says: Normally, if no dependency management configuration…
Oleksandr.Bezhan
  • 2,028
  • 3
  • 22
  • 31