java - How to get dependency with Ivy -


I am in the process of reviewing the use of Iv in my application. I have installed a simple configuration to pull Cobertura.

  & lt; Ivy-module version = "2.0" xmlns: xsi = "http://www.w3.org/2001/XMLSchema -Instance" axis: noamaspace shadow location = "http://ant.apache.org/ivy/schemas/ivy .xsd "& gt; & Lt; Info organization = "com" module = "adesa" status = "integration" & gt; & Lt; / Info & gt; & Lt; Configuration & gt; & Lt; Conf name = "runtime" description = "" /> & Lt; / Configuration & gt; & Lt; Dependency & gt; & Lt; Dependency org = "cobertura" name = "cobertura" rev = "1.8" transitive = "true" /> & Lt; / Dependencies & gt; & Lt; / Module from Vertical & gt;  

I know that Cobertura has reliance on other jar files. So how do these other jar files get? The only thing in my cache directory is the Cobertura Jar file.

Here's my ivysetting.xml

   & Lt; Resolver & gt; & Lt; Chain name = "chained" return first = "true" & gt; & Lt; Url name = "apache" m2compatible = "true" & gt; & Lt ;! - Apache - & gt; & Lt; Artifact Pattern = "http://repo1.maven.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" / & gt; & Lt; Artifact Pattern = "http://people.apache.org/repo/m2-incubating-repository/ [Organization] [/] Development [/ Developer] / [4]"] [/]; & Lt; / URL & gt; & Lt; Url name = "jboss" m2compatible = "true" & gt; & Lt ;! - Jebos - & gt; & Lt; Artifact Pattern = "http://repository.jboss.com/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" / & gt; & Lt; / URL & gt; & Lt; Ibiblio name = "ibiblio" m2compatible = "true" /> & Lt; Url name = "mvnrepos" m2compatible = "true"> & Lt ;! - IBIBLIO-Mirror - & gt; & Lt; Artifact Pattern = "http://mirrors.ibiblio.org/pub/mirrors/maven2/[organisation]/[module]/[branch]/[revision]/[branch]-[revision] .extext]" /> ; & Lt; / URL & gt; & Lt; / Series & gt; & Lt; / Resolver & gt;  

Is there a list of other repositories that can be used to obtain dependency / jar?


The snippet file from Build.XM:

  & lt; Target name = "load-eye" & gt; & Lt; Path id = "ivy.lib.path" & gt; & Lt; Fileset dir = "$ {baseir} / lib" includes = "* .jar" /> & Lt; / Path & gt; & Lt; Taskdef resource = "org / apache / ivy / ant / antlib.xml" uri = "antibu: org.apache.ivy.ant" classpathref = "ivy.lib.path" /> & Lt; / Target & gt; & Lt; Target name = "ivy-init" dependent = "load-iv" & gt; & Lt; Mkdir dir = "$ {dest.repo.dir}" /> & Lt; Ivy: Settings id = "basic.settings" file = "$ {baseir} /ivysettings.xml" /> & Lt; / Target & gt; & Lt; Target name = "ivy-clean" dependent = "Ivy-Init" & gt; & Lt; IV: Clanket Settings = "Basic Settings" /> & Lt; Delete dir = "$ {ivy.cache.dir}" failure = "true" /> & Lt; Delete dir = "$ {dest.repo.dir}" /> & Lt; / Target & gt; & Lt; Target name = "iv-download" dependent = "iv-clean, IV-int" & gt; & Lt; IV: Get SettingsRef = "Basic Settings" Pattern = "$ {dest.repo.dir} / [Artifact] / [Artifact] - [Amendment]." [Ext] "/> & Lt; / Target & gt; & Lt; Target name = "ivy-report" dependent = "IV-download" & gt; & Lt; IV: Report Settings: = "Basic Settings" todir = "$ {baseir} / log" /> & Lt; / Target & gt; Your cobb looks like me, except I have a different dependency for Cobertura:  
    

In addition, I recommend that you try with the default ivysettings.xml before adding additional repositories.


sample snippet

Iv square path resolution:

  & lt; Target name = "init.deps" description = "download (if necessary) and resolve dependencies." Until = "deps.init" & gt; & Lt; Taskdef resource = "org / apache / ivy / ant / antlib.xml" uri = "antibu: org.apache.ivy.ant" classpath = "$ {ivy.jar.file}" /> & Lt; IV: Hull /> & Lt; Ivy: cache pathway = "ivy.path" conf = "production" /> & Lt; Property Name = "deps.init" value = "true" /> & Lt ;! - Guard against many IV computations - & gt; & Lt; / Target & gt;  

Use the Ivy path to compile

  & lt; Target name = "compile" dependent = "init, record-build-number" & gt; & Lt; Javac srcdir = "src" debug = "true" destdir = "build / square" & gt; & Lt; Classpath & gt; & Lt; Path refield = "ivy.path" /> & Lt; / Classpath & gt; & Lt; / Javac & gt; & Lt; / Target & gt;  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -