Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8190063
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T03:29:42+00:00 2026-06-07T03:29:42+00:00

I have just setup my first project using apache ant with ivy as dependency

  • 0

I have just setup my first project using apache ant with ivy as dependency manager. It is working great! But I have one thing I cannot get over. Since I have several dependencies that use slf4j there is a conflict with version mismatches. So I defined a conflict tag in the ivy.xml to force a certain version (1.5.6 in this case). Running the Ivy resolve with eclipse plugin IvyIDE works without error. But when using my ant build file to build my application I get a xml syntax error:

Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Buildfile: B:\core-lib\build.xml
parsing buildfile B:\core-lib\build.xml with URI = file:/B:/core-lib/build.xml
Project base dir set to: B:\core-lib
parsing buildfile jar:file:/C:/Program%20Files/InformDevTools/eclipse/plugins/org.apache.ant_1.8.2.v20120109-1030/lib/ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/Program%20Files/InformDevTools/eclipse/plugins/org.apache.ant_1.8.2.v20120109-1030/lib/ant.jar!/org/apache/tools/ant/antlib.xml from a zip file
Build sequence for target(s) `resolve' is [clean, init, resolve]
Complete build sequence is [clean, init, resolve, compile, resources, test, dist, ]
clean:
   [delete] Deleting directory B:\core-lib\build
   [delete] Deleting directory B:\core-lib\build\lib
   [delete] Deleting directory B:\core-lib\build\main
   [delete] Deleting directory B:\core-lib\build\report\test
   [delete] Deleting directory B:\core-lib\build\report
   [delete] Deleting directory B:\core-lib\build\test
   [delete] Deleting directory B:\core-lib\build
   [delete] Deleting directory B:\core-lib\dist
   [delete] Deleting directory B:\core-lib\dist
init:
Override ignored for property "DSTAMP"
Override ignored for property "TSTAMP"
Override ignored for property "TODAY"
    [mkdir] Created dir: B:\core-lib\build
    [mkdir] Created dir: B:\core-lib\build\main
    [mkdir] Created dir: B:\core-lib\build\lib
    [mkdir] Created dir: B:\core-lib\dist
    [mkdir] Created dir: B:\core-lib\build\test
    [mkdir] Created dir: B:\core-lib\build\report\test
resolve:
parsing buildfile jar:file:/C:/Users/admin/.eclipse/org.eclipse.platform_3.7.0_1992851616/plugins/org.apache.ivy.eclipse.ant_2.3.0.cr120120416000235/ivy.jar!/org/apache/ivy/ant/antlib.xml with URI = jar:file:/C:/Users/admin/.eclipse/org.eclipse.platform_3.7.0_1992851616/plugins/org.apache.ivy.eclipse.ant_2.3.0.cr120120416000235/ivy.jar!/org/apache/ivy/ant/antlib.xml from a zip file
[ivy:retrieve] No ivy:settings found for the default reference 'ivy.instance'.  A default instance will be used
[ivy:retrieve] Loading jar:file:/C:/Users/admin/.eclipse/org.eclipse.platform_3.7.0_1992851616/plugins/org.apache.ivy.eclipse.ant_2.3.0.cr120120416000235/ivy.jar!/org/apache/ivy/core/settings/ivy.properties
[ivy:retrieve] searching settings file: trying B:\core-lib\ivysettings.xml
[ivy:retrieve] :: Apache Ivy 2.3.0-rc1 - 20120416000235 :: http://ant.apache.org/ivy/ ::
[ivy:retrieve] jakarta commons httpclient not found: using jdk url handling
[ivy:retrieve] :: loading settings :: file = B:\core-lib\ivysettings.xml
[ivy:retrieve] no default ivy user dir defined: set to C:\Users\admin\.ivy2
[ivy:retrieve] no default cache defined: set to C:\Users\admin\.ivy2\cache
[ivy:retrieve] settings loaded (31ms)
[ivy:retrieve]  default cache: C:\Users\admin\.ivy2\cache
[ivy:retrieve]  default resolver: inform-artifactory
[ivy:retrieve]  -- 5 resolvers:
[ivy:retrieve]  inform [release] [ibiblio]
[ivy:retrieve]  inform [snapshot] [ibiblio]
[ivy:retrieve]  inform [proxied] [ibiblio]
[ivy:retrieve]  inform-artifactory [chain] [inform [proxied], inform  [third-party], inform [release], inform [snapshot]]
[ivy:retrieve]  inform  [third-party] [ibiblio]
[ivy:retrieve] no resolved descriptor found: launching default resolve
Overriding previous definition of property "ivy.version"
[ivy:retrieve] using ivy parser to parse file:/B:/core-lib/ivy.xml
[ivy:retrieve] [xml parsing: ivy.xml:28:108: cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "dependency" gefunden. "{conflict}" wird erwartet. in file:/B:/core-lib/ivy.xml
[ivy:retrieve] ]

BUILD FAILED
B:\core-lib\build.xml:77: syntax errors in ivy file: java.text.ParseException: [xml parsing: ivy.xml:28:108: cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "dependency" gefunden. "{conflict}" wird erwartet. in file:/B:/core-lib/ivy.xml
]
    at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:396)
    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
    at org.apache.ivy.ant.IvyPostResolveTask.ensureResolved(IvyPostResolveTask.java:231)
    at org.apache.ivy.ant.IvyPostResolveTask.prepareAndCheck(IvyPostResolveTask.java:178)
    at org.apache.ivy.ant.IvyRetrieve.doExecute(IvyRetrieve.java:87)
    at org.apache.ivy.ant.IvyTask.execute(IvyTask.java:277)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:390)
    at org.apache.tools.ant.Target.performTasks(Target.java:411)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
    at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
Caused by: java.text.ParseException: [xml parsing: ivy.xml:28:108: cvc-complex-type.2.4.a: Ungültiger Content wurde beginnend mit Element "dependency" gefunden. "{conflict}" wird erwartet. in file:/B:/core-lib/ivy.xml
]
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.checkErrors(AbstractModuleDescriptorParser.java:89)
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser$AbstractParser.getModuleDescriptor(AbstractModuleDescriptorParser.java:344)
    at org.apache.ivy.plugins.parser.xml.XmlModuleDescriptorParser.parseDescriptor(XmlModuleDescriptorParser.java:117)
    at org.apache.ivy.plugins.parser.AbstractModuleDescriptorParser.parseDescriptor(AbstractModuleDescriptorParser.java:48)
    at org.apache.ivy.core.resolve.ResolveEngine.resolve(ResolveEngine.java:184)
    at org.apache.ivy.Ivy.resolve(Ivy.java:503)
    at org.apache.ivy.ant.IvyResolve.doExecute(IvyResolve.java:326)
    ... 20 more

Total time: 500 milliseconds

If I remove the conflict definition, the build works as expected. Here is the ivy.xml:

<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="eu.inform" module="isac3-core" revision="1.0-snapshot"></info>
<configurations>
    <conf name="build" description="provide business logic for isac3"/>
    <conf name="test" extends="build" visibility="private" description="just for JUnit testing"/>
</configurations>
<publications>
    <artifact name="core-lib" type="jar" conf="build" ext="jar"/>
</publications>
<dependencies>

    <dependency org="org.apache.commons" name="commons-lang3" rev="3.1" conf="build->default"/>
    <dependency org="commons-codec" name="commons-codec" rev="1.6" conf="build->default"/>
    <dependency org="org.apache.mina" name="mina-core" rev="2.0.4" conf="build->default"/>
    <dependency org="org.apache.tika" name="tika-app" rev="1.1" conf="build->default"/>
    <!-- 
        Resolve conflict for SLF4J by selecting the latest compatible version:
        Apache tika comes packaged with slf4j 1.5.6, so we cannot exclude this dependency because it is part of the jar.
        Hibernate specifies a dependency to slf4j 1.6.1 by maven pom file.
     -->
    <conflict org="org.slf4j" rev="1.5.6"/>

    <dependency org="org.springframework" name="spring-aop" rev="3.1.1.RELEASE" conf="build->default"/>
    <dependency org="org.aspectj" name="aspectjweaver" rev="1.5.4" conf="build->default"/>
    <dependency org="org.springframework" name="spring-orm" rev="3.1.1.RELEASE" conf="build->default">
        <!-- don't include any ORM implementation since we defined the one we use -->
        <exclude org="org.eclipse.persistence" />
        <exclude org="toplink.essentials" />
        <exclude org="org.apache.ibatis" />
        <exclude org="org.apache.openjpa" />
        <exclude org="org.hibernate" />
    </dependency>
    <dependency org="org.hibernate" name="hibernate-core" rev="4.1.4.Final" conf="build->default"/>
    <dependency org="org.hibernate" name="hibernate-ehcache" rev="4.1.4.Final" conf="build->default"/>
    <dependency org="org.hibernate" name="hibernate-envers" rev="4.1.4.Final" conf="build->default"/>
    <dependency org="org.hibernate" name="hibernate-search-engine" rev="4.1.1.Final" conf="build->default"/>
    <dependency org="org.hibernate" name="hibernate-search-orm" rev="4.1.1.Final" conf="build->default"/>
    <dependency org="c3p0" name="c3p0" rev="0.9.1.2" conf="build->default"/>
    <dependency org="de.jollyday" name="jollyday" rev="0.4.6" conf="build->default"/>
    <dependency org="log4j" name="log4j" rev="1.2.17" conf="build->default"/>

    <!-- JDBC drivers -->
    <dependency org="net.sourceforge.jtds" name="jtds" rev="1.2.4" conf="build->default"/>
    <dependency org="com.microsoft" name="sqljdbc4" rev="4.0" conf="build->default"/>
    <dependency org="com.oracle" name="ojdbc6" rev="11.2.0.3" conf="build->default"/>

    <!-- dependencies solely for testing purposes (none-deployed) -->
    <dependency org="junit" name="junit" rev="4.10" conf="test->default"/>
</dependencies>

And that is the ant build.xml (I left out unnecessary lines to keep it more compact):

<?xml version="1.0" encoding="ISO-8859-1"?>

<property name="src_base" location="src/main" />
<property name="src" location="${src_base}/java" />
<property name="config" location="${src_base}/config" />
<property name="resource" location="${src_base}/resource" />
<property name="build" location="build" />
<property name="buildSrc" location="${build}/main" />
<property name="lib" location="${build}/lib" />
<property name="dist" location="dist" />

<property name="distName" value="isac3-core-lib" />
<property name="distFileName" value="${distName}-${build.timestamp}.jar" />
<property name="zipFileName" value="${distName}-${build.timestamp}.zip" />

<property name="test.src" location="src/test/java" />
<property name="test.build" location="build/test" />
<property name="test.reports" location="build/report/test" />

<property name="ant.build.javac.source" value="1.7" />
<!-- Source-level version number -->
<property name="ant.build.javac.target" value="1.7" />
<!-- Class-compatibility version number -->
<property name="build.compiler" value="modern" />

...

<!-- ================================= 
      target: init
     ================================= -->
<target name="init" depends="clean">
    <!-- Create the time stamp -->
    <tstamp />
    <!-- Create the build directory structure used by compile -->
    <mkdir dir="${build}" />
    <mkdir dir="${buildSrc}" />
    <mkdir dir="${lib}" />
    <mkdir dir="${dist}" />
    <mkdir dir="${test.build}" />
    <mkdir dir="${test.reports}" />
</target>

<!-- ================================= 
      target: resolve              
     ================================= -->
<target name="resolve" depends="init" description="retrieve dependencies with ivy">
    <ivy:retrieve pattern="${lib}/[conf]/[artifact].[ext]" />
</target>

...

The error happens in the ant target ‘resolve’. Ivy seems to be loaded an the settings file is also used as expected. But as already mentioned I get that syntax error.

Has anyone seen this before and can give me a hint?

Regards,

Sebastian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T03:29:44+00:00Added an answer on June 7, 2026 at 3:29 am

    I copied your work and I had the same error, but not in German 😉

    Anyway, I tried putting the conflict tag at the end and it worked.
    so now it looks like this:

    <dependencies>
        ... all dependencies
        <!-- dependencies solely for testing purposes (none-deployed) -->
        <dependency org="junit" name="junit" rev="4.10" conf="test->default"/>
    
        <conflict  org="org.slf4j" rev="1.5.6" />
    </dependencies>
    

    Another thing, it might be a copy-paste mistake, but you have to make sure ivy.xml file ends with

    </ivy-module>.
    

    Let us know.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just setup my first Spring MVC 3 project with Hibernate 3 using Maven.
I have an MVC 1.0 app just setup but it only shows the Index.aspx
I have an ASP.NET MVC 3 project that I just created using the project
I have setup my first core data project. Everything works fine until I do
I've just got my first VPS & have set up NGinx, Ruby, Rails &
I have just setup a new local site (localhost/pfb.net/) which has been cloned from
I have just setup a wordpress forum and I find that all images are
We have just setup our hudson server to build .NET projects which seems to
I have an app that I just got setup with a split view controller
I have a very simple ColorBox gallery setup just like the examples. Simple tags

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.