I'm fairly new to Ivy, but have gotten it to work with jar dependencies. The problem is trying to set it up, so I can fetch javadocs and sources independently of jars.
I have a simple test project, but no matter what I'm doing, I'm fetching the jar with the class files in it.
I have the following ivy.xml file:
<ivy-module version="1.0">
<info
organisation="com.vegicorp"
module="test"
revision="1.0"
status="release"/>
<configurations>
<conf name="default" visibility="public" extends="runtime,master"/>
<conf name="master" visibility="public"/>
<conf name="compile" visibility="public"/>
<conf name="provided" visibility="public"/>
<conf name="runtime" visibility="public" extends="compile"/>
<conf name="test" visibility="private" extends="runtime"/>
<conf name="system" visibility="public"/>
<conf name="sources" visibility="public"/>
<conf name="javadoc" visibility="public"/>
<conf name="optional" visibility="public"/>
</configurations>
<dependencies>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"
conf="compile->default"/>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"
conf="sources->default">
<artifact name="commons-logging" type="sources" ext="jar"/>
</dependency>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"
conf="javadoc->default">
<artifact name="commons-logging" type="javadoc" ext="jar"/>
</dependency>
</dependencies>
</ivy-module>
And the following build.xml:
<project name="ivy-test" default="default" basedir="."
xmlns:ivy="http://ant.apache.org/ivy">
<property name="ivy.dir" value="${basedir}/ivy.dir"/>
<import file="${ivy.dir}/ivy.tasks.xml"/>
<property name="target.dir" value="${basedir}/lib"/>
<target name="-resolve">
<ivy:resolve/>
</target>
<target name="clean">
<delete dir="${target.dir}"/>
<ivy:cleancache/>
</target>
<target name="default"
depends="-resolve">
<fail message="ivy.conf is not defined">
<condition>
<not>
<isset property="ivy.conf"/>
</not>
</condition>
</fail>
<delete dir="${target.dir}"/>
<mkdir dir="${target.dir}"/>
<ivy:retrieve conf="${ivy.conf}"
pattern="${target.dir}/[artifact]-[revision].[ext]"/>
</target>
</project>
At the command line, I'll type:
$ ant -Divy.conf=compile
And, that should download the jarfile with the classes.
However if I type it this:
$ ant -Divy.conf=sources
I want the jar file that contains the sources and not the classes, and when I type this:
$ ant -Divy.conf=javadoc
I want the jar file that contains the javadoc and not the sources.
I'm pretty sure it's my ivy.xml that's not quite right. I originally tried this:
<dependencies>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1">
<artifact name="commons-logging" type="jar" ext="jar" conf="compile->default"/>
<artifact name="commons-logging" type="sources" ext="jar" conf="sources->default"/>
<artifact name="commons-logging" type="javadoc" ext="jar" conf="javadoc->default"/>
</dependency>
That downloaded the jar, the sources, and javadoc, but all at once no matter which configuration I tried.
Okay, I think I've figured it out. I was over thinking this whole process. My <dependencies> section should look like this:
<dependencies>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"
conf="javadoc->javadoc;sources->sources;compile->default"/>
</dependencies>
This maps my javadoc to Maven's javadoc and my sources to Maven's sources. When I mapped conf="sources->default", it was mapping my sources to Maven's default which is the compile dependencies.
I can specify all the configurations in one line, and I don't need separate <artifact> entities.
Related
Building with Ant Ivy, I'm trying to separate my jars into one configuration for 3rd party jars and another configuration for the jars I build and publish. ProjectA uses 3rd party jars and builds a jar that ProjectB depends on, but when I use Ant Ivy confs I can't get ProjectB to retrieve the ProjectA jar.
When I execute the ant script for ProjectB, it builds ProjectA fine. The ProjectA build publishes a jar to the local repository. ProjectB retrieves the necessary jars from the public repository with no problem, but when it tries to retrieve the ProjectA jar, it says UNRESOLVED DEPENDENCY: testproject#ProjectA;2.0.0: configuration not found in testproject#ProjectA;2.0.0: 'localjars'. It was required from testproject#ProjectB;2.0.0 localjars
If I remove all references to the 2nd configuration, localjars, and just use default for everything, it works fine. I really need to sort my jars into the different confs though.
I've successfully used a revision value passed from the ant script in place of "2.0.0" below and referenced with ${revision}, but the conf error is the same.
ProjectA ivy.xml (with a subset of dependencies for brevity):
<ivy-module version="2.0">
<info organisation="testproject" module="ProjectA" revision="2.0.0" status="release" publication="20160524124555"/>
<configurations>
<conf name="default" transitive="false" visibility="public"/>
<conf name="localjars" extends="default" visibility="public"/>
</configurations>
<publications>
<artifact name="projectA-jar-2.0.0" type="jar" conf="localjars" ext="jar"/>
</publications>
<dependencies>
<dependency org="commons-beanutils" name="commons-beanutils" rev="1.7.0" conf="default->master"/>
<dependency org="commons-collections" name="commons-collections" rev="3.1" conf="default->master"/>
</dependencies>
</ivy-module>
ProjectA build.xml publish target:
<target name="publish" depends="package"
description="--> compile test and publish this project in the local ivy repository">
<ivy:publish artifactspattern="${DEPLOY_DIR_LIB}/[artifact].[ext]"
resolver="local" pubrevision="2.0.0" status="release"
srcivypattern="${ivy.dep.file}" forcedeliver="true" overwrite="true" conf="localjars,default"/>
<echo message="project ${ant.project.name} released with version 2.0.0" />
</target>
ProjectB ivy.xml:
<ivy-module version="2.0">
<info organisation="testproject" module="ProjectB" revision="2.0.0" status="release" publication="20160524103113"/>
<configurations>
<conf name="default"/>
<conf name="localjars" extends="default"/>
</configurations>
<publications>
<artifact name="projectB-2.0.0" conf="localjars" type="jar" ext="jar"/>
</publications>
<dependencies>
<dependency org="testproject" name="ProjectA" rev="${revision}" transitive="true" conf="localjars->localjars; default->default"/>
</dependencies>
ProjectB Ant resolve target:
<target name="resolve" description="--> retrieve dependencies with ivy">
<ivy:retrieve pattern="${DEPLOY_DIR_LIB}/[artifact]-2.0.0.[ext]" revision="2.0.0" conf="localjars" />
</target>
Any idea what's wrong? Thanks!
Patrick
Not entirely certain why your configuration is not working. One thing I'd advise is not to disable transitive dependencies. You'll note I have a different approach in creating the "default" configuration in the working example below.
Example
Each project has its own local build and ivy file. Collaboration is via jars published to the "local" repository.
├── build.xml
├── ProjectA
│ ├── build.xml
│ ├── ivy.xml
│ └── src
│ └── Hello.txt
└── ProjectB
├── build.xml
├── ivy.xml
└── src
└── Hello.txt
build.xml
Master build file that builds all modules in the correct order, using the buildlist task.
Additionally I normally include an extra target for installing ivy.
<project name="main" default="publish" xmlns:ivy="antlib:org.apache.ivy.ant">
<available classname="org.apache.ivy.Main" property="ivy.installed"/>
<target name="install-ivy" unless="ivy.installed">
<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.4.0/ivy-2.4.0.jar"/>
<fail message="Ivy has been installed. Run the build again"/>
</target>
<target name="publish" depends="install-ivy">
<ivy:buildlist reference="build-path">
<fileset dir="." includes="*/build.xml"/>
</ivy:buildlist>
<subant target="publish" buildpathref="build-path"/>
</target>
<target name="clean">
<subant target="clean">
<fileset dir="." includes="*/build.xml"/>
</subant>
</target>
<target name="clean-all" depends="clean">
<ivy:cleancache/>
</target>
</project>
ProjectA/ivy.xml
The "master" configuration contains only artifacts. This naming convention mirrors the scopes used by Maven.
Note also how the "default" configuration extends both "master" and "runtime". This enables clients to pull down everything they will need.
<ivy-module version="2.0">
<info organisation="com.myspotontheweb" module="ProjectA"/>
<configurations>
<conf name="default" description="Master artifact and runtime dependencies" extends="master,runtime"/>
<conf name="master" description="Artifact published by this module"/>
<conf name="compile" description="Required to compile application"/>
<conf name="runtime" description="Additional run-time dependencies" extends="compile"/>
<conf name="test" description="Required for test only" extends="runtime"/>
</configurations>
<publications>
<artifact name="ProjectA" type="jar" ext="jar" conf="master"/>
</publications>
<dependencies>
<!-- compile dependencies -->
<dependency org="org.slf4j" name="slf4j-api" rev="1.7.5" conf="compile->default"/>
<!-- runtime dependencies -->
<dependency org="org.slf4j" name="slf4j-log4j12" rev="1.7.5" conf="runtime->default"/>
<!-- test dependencies -->
<dependency org="junit" name="junit" rev="4.11" conf="test->default"/>
</dependencies>
</ivy-module>
ProjectB/ivy.xml
Note how ProjectA is the only dependency and it maps the remote "default" configuration to the local "compile" configuration.
Another subtle issue is the use of the "latest.integration" dynamic revision. This means we don't need to hardcode the revision of ProjectA.
<ivy-module version="2.0">
<info organisation="com.myspotontheweb" module="ProjectB"/>
<configurations>
<conf name="default" description="Master artifact and runtime dependencies" extends="master,runtime"/>
<conf name="master" description="Artifact published by this module"/>
<conf name="compile" description="Required to compile application"/>
<conf name="runtime" description="Additional run-time dependencies" extends="compile"/>
<conf name="test" description="Required for test only" extends="runtime"/>
</configurations>
<publications>
<artifact name="ProjectB" type="jar" ext="jar" conf="master"/>
</publications>
<dependencies>
<dependency org="com.myspotontheweb" name="ProjectA" rev="latest.integration" conf="compile->default"/>
</dependencies>
</ivy-module>
ProjectA/build.xml
The revision to be published is set as a property, which can be overridden if necessary.
Note also how ivy configurations can be used to control classpaths within the build, using the cachepath task
<project name="ProjectA" default="build" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="build.dir" location="build"/>
<property name="pub.version" value="1.0"/>
<property name="pub.resolver" value="local"/>
<target name="resolve">
<ivy:resolve/>
<ivy:cachepath pathid="compile.path" conf="compile"/>
<ivy:cachepath pathid="test.path" conf="test"/>
</target>
<target name="build" depends="resolve">
<mkdir dir="${build.dir}"/>
<jar destfile="${build.dir}/${ant.project.name}.jar" basedir="src"/>
</target>
<target name="publish" depends="build">
<ivy:publish pubrevision="${pub.version}" resolver="${pub.resolver}" overwrite="true">
<artifacts pattern="${build.dir}/[artifact].[ext]"/>
</ivy:publish>
</target>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
</project>
ProjectB/build.xml
Identical to the other project just having a different name attribute.
<project name="ProjectB" default="build" ....
I use ant + ivy for a project. So lets assume I need to run <sql task for ant, thus I need to fetch jdbc driver 1st. Furthermore the driver is required during compiling the project. So I want to have 2 configuration:
default: to retrieve jdbc driver and other project dependencies
jdbc: to retrieve ONLY jdbc driver.
And then just run retrieve task with different configurations like that:
<!--Fetch all project dependencies, including jdbc driver-->
<ivy:retrieve pattern="${build.lib.home}/[artifact].[ext]" conf="default" />
<!-- Fetch only jdbc driver-->
<ivy:retrieve pattern="${build.lib.home}/[artifact].[ext]" conf="jdbc" />
ivy.xml
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="" module="notebook-ivy"/>
<configurations>
<conf name="default" visibility="public" extend="jdbc"/>
<conf name="jdbc" visibility="public"/>
</configurations>
<dependencies>
<dependency org="mysql" name="mysql-connector-java" rev="5.1.6" conf="jdbc->default"/>
<dependency org="org.apache.camel" name="camel-core" rev="2.15.1"/>
</dependencies>
</ivy-module>
I'm using public mavencentral so I can't change dependency configuration on server:
ivysettings.xml
<ivysettings>
<settings defaultResolver="chain"/>
<resolvers>
<chain name="chain">
<ibiblio name="central" m2compatible="true" root="http://central.maven.org/maven2/"/>
</chain>
</resolvers>
</ivysettings>
The configuration described above works. But It looks confusing, when default extends jdbc and jdbc extends default simultaneously. I'm new to ivy, so my question is: if this's the right way of using configurations for ivy.
The "extends" operation enables you to perform a union set operation on jars within an ivy configuration, so this would work fine.
My preference is to model configurations on my anticipated classpath requirements:
<configurations>
<conf name="compile" description="Dependencies required to build project"/>
<conf name="compile" description="Dependencies required to run project" extends="compile"/>
<conf name="test" description="Dependencies required to test project" extends="runtime"/>
<conf name="build" description="ANT build tasks"/>
</configurations>
The ivy cachepath task can then be used to create these paths within the build file:
<target name="resolve">
<ivy:resolve/>
<ivy:cachepath pathid="build.path" conf="build"/>
<ivy:cachepath pathid="compile.path" conf="compile"/>
<ivy:cachepath pathid="test.path" conf="test"/>
</target>
This approach means something like a jdbc jar would be mapped to a "compile" configuration, making it available for javac tasks:
<target name="compile" depends="resolve">
..
<javac ... classpathref="compile.path"/>
</target>
But also included in the "runtime" configuration that gets saved to disk as a dependency when building the jar package:
<target name="build" depends="compile">
<ivy:retrieve pattern="${dist.dir}/lib/[artifact].[ext]" conf="runtime"/>
<manifestclasspath property="jar.classpath" jarfile="${dist.jar}">
<classpath>
<fileset dir="${dist.dir}/lib" includes="*.jar"/>
</classpath>
</manifestclasspath>
<jar destfile="${dist.jar}" basedir="${build.dir}/classes">
<manifest>
<attribute name="Main-Class" value="${dist.main.class}"/>
<attribute name="Class-Path" value="${jar.classpath}"/>
</manifest>
</jar>
</target>
I'm totally new in ivy, so don't blame for for rather elementary questions.
I'm working on project that depends on some libraries of jbossAS 4.0.3.
To tell exactly - there are jboss-4.0.3-scheduler, jboss-4.0.3-jboss-system, jboss-4.0.3-jboss, jboss-4.0.3-jbossall-client. So i have a logical question - how can I point ivy to find them on public repository? Or that's the wrong direction of leveraging ivy in this situation?
And another simple question - for example, in the past this project depended on castor-0.9.7, axis-1.3 and log4j - after ivy dependency resolution - I had a lot of other jars like activation-1.1.jar, axis-saaj-1.3.jar, mail-1.4.jar and so on. So it was only 3 jars in dependencies in the past - now I have 10. Do i really need them?
And what is the way to know for sure what do i need of this additional jars?? (after all the project was working with old config - 3 jars).
And what if I have some artifact(dependee project). Other project depends on it, but i don't want transitive dependencies to be resolved. That's only a question of interest ))
This is how i am pulling dependencies now (from local repo), and what i want - to pull them from public repo (if it is possible) :
<ivy-module version="2.2">
<info organisation="org.btl" module="BtlAppServer" revision="1.7"/>
<configurations defaultconfmapping="default">
<conf name="compile" visibility="private"/>
<conf name="test" extends="compile" visibility="private"/>
<conf name="master" />
<conf name="runtime" extends="compile" />
<conf name="default" extends="master,runtime"/>
</configurations>
<publications>
<artifact conf="master"/>
</publications>
<dependencies>
<dependencies>
<dependency org="jboss" name="jboss" rev="4.0.3" conf="*->default" />
<dependency org="jboss" name="jbossall-client" rev="4.0.3"
conf="*->default"/>
<dependency org="jboss" name="jboss-system" rev="4.0.3" conf="*->default"/>
<dependency org="jboss" name="scheduler-plugin" rev="4.0.3"
conf="*->default"/>
<dependency org="org.btl" name="BtlCommon" rev="latest.integration" />
</dependencies>
</ivy-module>
setttings file for this stuff :
<ivysettings>
<settings defaultResolver="myChain"/>
<include url="${ivy.default.settings.dir}/ivysettings-public.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
<include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
<resolvers>
<chain name="myChain" returnFirst="true">
<resolver ref="local"/>
<!-- JBoss -->
<ibiblio name="jboss-nexus" m2compatible="true"
root="https://repository.jboss.org/nexus/content/groups/developer/"
pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-
[classifier]).[ext]"/>
<ibiblio name="ibiblio" m2compatible="true" />
</chain>
</resolvers>
<modules>
<module organisation='org.btl' resolver='local' />
</modules>
</ivysettings>
File ivy.xml for the second question :
<ivy-module version="2.2">
<info organisation="org.btl" module="BtlCommon" revision="1.7"/>
<configurations defaultconfmapping="default">
<conf name="compile" visibility="private"/>
<conf name="test" extends="compile" visibility="private"/>
<conf name="master" />
<conf name="runtime" extends="compile" />
<conf name="default" extends="master,runtime"/>
</configurations>
<publications>
<!--get the artifact from our module name-->
<artifact conf="master"/>
</publications>
<dependencies>
<dependency org="axis" name="axis" rev="1.3" conf="*->default" />
<dependency org="castor" name="castor" rev="0.9.7" conf="*->default" />
<dependency org="log4j" name="log4j" rev="1.2.15" conf="*->default" >
<exclude org="com.sun.jdmk"/>
<exclude org="com.sun.jmx"/>
<exclude org="javax.jms"/>
</dependency>
</dependencies>
</ivy-module>
Don't know if that can help someway )
The extra jars are produced by transitive dependencies. These may not be needed to compile your project but needed at runtime.
If they are actually needed depends on the dependency itself and your usage of the library. Mail.jar(Java Mail API) for example is only needed if you need to send Mails.
I think it will be quite complicated to really make sure, that you won't need the extra libraries (in the future?). If you are sure now, that you program runs without them, you can just set the transitive attribute to the dependency. And they will not be downloaded.
<dependency org="axis" name="axis" rev="1.3" conf="*->default" transitive="false"/>
I found the Jboss dependencies in the java.net repository for revision="4.2.2.GA". Seems the best option. But I couldn't find the scheduler.
ivysettings.xml
<ibiblio name="jboss-java.net" m2compatible="true"
root="http://download.java.net/maven/2/"/>
In my project, I use Ivy to resolve dependencies. I use Spring's repository. The problem is that I don't want to download sources and licence/notice files. The settings which produce the problem are as follows:
ivyconf.xml
<ivysettings>
<settings defaultResolver="default" />
<resolvers namespace="apache">
<chain name="default" returnFirst="true">
<url name="com.springsource.repository.bundles.release">
<!--<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />-->
<!-- or this one? -->
<ivy pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/ivy-[revision].xml" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
<url name="com.springsource.repository.bundles.external">
<!--<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />-->
<ivy pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/ivy-[revision].xml" />
<artifact pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
</url>
</chain>
</resolvers>
</ivysettings>
ivy.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="file:///home/nikem/workspace/ark/test.xsl"?>
<ivy-module version="2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="com.foo-corp" module="bar" />
<configurations>
<conf name="runtime" description="Modules needed for running the application"/>
</configurations>
<dependencies>
<dependency org="org.apache.batik" name="com.springsource.org.apache.batik.dom.svg" rev="1.7.0" conf="runtime->runtime">
<exclude type="src" ext="jar" conf="runtime"/>
</dependency>
<dependency org="org.apache.batik" name="com.springsource.org.apache.batik.bridge" rev="1.7.0" conf="runtime->runtime" />
<exclude type="src" ext="jar" conf="runtime"/>
<exclude type="javadoc" ext="jar" conf="runtime"/>
<exclude type="license" ext="txt" conf="runtime"/>
</dependencies>
</ivy-module>
build.xml
<project name="yunowork" default="ivy-runtime" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="run.lib.dir" value="projlib"/>
<property name="lib.dir" value="lib"/>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpath="${lib.dir}/ivy.jar"/>
<target name="clean-lib" description="Removes all libraries">
<delete dir="${run.lib.dir}" includes="*.jar"/>
</target>
<target name="ivy-clean-cache" description="Cleans Ivy cache">
<ivy:cleancache />
</target>
<target name="ivy-runtime">
<ivy:settings file="ivyconf.xml"/>
<ivy:resolve file="ivy.xml"/>
<ivy:retrieve pattern="${run.lib.dir}/[artifact].[ext]" conf="runtime"/>
</target>
</project>
In Ivy's cache I see:
<publications>
<artifact name="com.springsource.org.apache.batik.dom.svg"/>
<artifact name="com.springsource.org.apache.batik.dom.svg-sources" type="src" ext="jar"/>
<artifact name="license" type="license" ext="txt"/>
<artifact name="notice" type="license" ext="txt"/>
</publications>
They are published for all the configs by defaults.
The question is: Why don't the source and licence files get excluded?
One workaround to achieve what I want (no sources, no licence/notice files) was to add type to <ivy:retrieve> task.
<ivy:retrieve pattern="${run.lib.dir}/[artifact].[ext]" type="jar" />
In this case, I don't need any <exclude> tags. This, however, doesn't answer the question why exclude didn't work in the first place.
Could you try (omit the nested exclude in the first dependency):
<dependencies>
<dependency org="org.apache.batik" name="com.springsource.org.apache.batik.dom.svg" rev="1.7.0" conf="runtime->runtime"/
<dependency org="org.apache.batik" name="com.springsource.org.apache.batik.bridge" rev="1.7.0" conf="runtime->runtime" />
<exclude type="src" ext="jar" conf="runtime"/>
<exclude type="javadoc" ext="jar" conf="runtime"/>
<exclude type="license" ext="txt" conf="runtime"/>
</dependencies>
I have a feeling that the deeply nested exclude may be bugged. See here:
How to exclude commons logging dependency of spring with ivy?
It's just a hunch, everything seems very fine.
I've answered a similar question on Spring here.
In brief it amounts to:
1) Clear your ivy cache
2) Change your ivy settings file to use the Spring Maven repositories:
<ivysettings>
<settings defaultResolver="chain"/>
<resolvers>
<chain name="chain">
<ibiblio name="central" m2compatible="true"/>
<ibiblio name="spring-release" root="http://repository.springsource.com/maven/bundles/release" m2compatible="true"/>
<ibiblio name="spring-external" root="http://repository.springsource.com/maven/bundles/external" m2compatible="true"/>
</chain>
</resolvers>
</ivysettings>
3) Try change your configuration mapping from:
<dependency .... conf="runtime->runtime"/>
to:
<dependency .... conf="runtime->default"/>
Instead of trying to exclude all of the artifacts you don't want, try explicitly including only the artifacts you do want:
<dependency org="org.apache.batik" name="com.springsource.org.apache.batik.dom.svg" rev="1.7.0" conf="runtime->runtime">
<artifact name="com.springsource.org.apache.batik.dom.svg"/>
</dependency>
I'm using ant with maven to build a multi module project. Until now everything worked fine but now ivy complains that it finds a"bad module".
java.text.ParseException: inconsistent module descriptor file found
in 'XYZ.ivy.xml': bad module found in XYZ.ivy.xml: expected='true' found='null';
I don't know what ivy want's to tell me with this message, maybe somone else can?
The ivy xml:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:e="http://ant.apache.org/ivy/extra" xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd">
<info organisation="xyz" module="ebusiness-core" revision="1.0" status="integration" publication="20100104174318" e:package="jar"/>
<configurations>
<conf name="default" visibility="public" extends="runtime,master"/>
<conf name="master" visibility="public" />
<conf name="compile" visibility="public" />
<conf name="provided" visibility="public" />
<conf name="runtime" visibility="public" extends="compile"/>
<conf name="test" visibility="private extends="runtime"/>
<conf name="system" visibility="public" />
<conf name="sources" visibility="public"/>
<conf name="javadoc" visibility="public" "/>
<conf name="optional" visibility="public"/>
</configurations>
<publications>
<artifact conf="sources" ext="jar" type="source"/>
<artifact conf="javadoc" ext="jar" type="javadoc"/>
<artifact conf="default" ext="jar"/>
</publications>
<dependencies defaultconf="compile->default">
<dependency org="junit" name="junit" rev="4.5"/>
<dependency org="zak-components" name="zak-components" rev="1.0"/>
<dependency org="commons-collections" name="commons-collections" rev="3.2.1"/>
<dependency org="net.sf.dozer" name="dozer" rev="3.4"/>
<dependency org="org.springframework" name="spring" rev="2.0.2" transitive="false">
<exclude module="jsf-api "/>
</dependency>
<dependency name="velocity" org="velocity" rev="1.4"/>
<dependency name="mail" org="javax.mail" rev="1.4" conf="provided->default"/>
<dependency org="org.mortbay.jetty" name="servlet-api-2.5" rev="6.1.14" conf="provided->default"/>
<dependency org="org.acegisecurity" name="acegi-security" rev="1.0.1">
<exclude org="org.springframework"/>
<exclude org="tomcat"/>
</dependency>
<dependency org="dom4j" name="dom4j" rev="1.6.1"/>
<dependency org="xalan" name="xalan" rev="2.5.1"/>
<dependency org="log4j" name="log4j" rev="1.2.14"/>
<dependency org="org.hibernate" name="hibernate" rev="3.2.6.ga">
<exclude org="javax.transaction"/>
</dependency>
<dependency name="myfaces-api" org="org.apache.myfaces.core" rev="1.1.5">
<exclude org="javax.mail"/>
<exclude org="javax.resource"/>
</dependency>
<dependency org="commons-logging" name="commons-logging" rev="1.1.1"/>
<exclude org="javax.ejb"/>
<exclude org="javax.jms"/>
<exclude org="com.bea"/>
<exclude org="com.oracle"/>
<exclude org="javax.activation"/>
<exclude org="javax.ejb"/>
<exclude module="commonj-twm"/>
<exclude module="asm-util"/>
<exclude module="commons-attributes-compiler"/>
<exclude org="com.oracle"/>
<exclude org="org.apache.geronimo.specs"/>
<exclude org="openejb"/>
<exclude org="javax.portlet"/>
<exclude org="geronimo-spec"/>
<!-- exclude org=" javax.faces" module="jsf-api"/-->
</dependencies>
</ivy-module>
My stupidity. It was an old ivy.xml in a second repository ;-)