ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kent Larsson" <>
Subject Clean way to differ between runtime and compile time dependencies? (So I do not include runtime deps in my war)
Date Sun, 11 Jan 2009 22:02:14 GMT
Hi. I'm new to Ivy and desperately need some help. :-)

I have this Ivy.xml:

<ivy-module version="2.0">
    <info organisation="domain.organisation" module="webproject"/>
        <dependency org="org.apache.wicket" name="wicket" rev="1.3.5">
            <exclude org="org.apache.portals.bridges"
            <exclude org="javax.portlet" module="portlet-api"/>
        <dependency org="org.slf4j" name="slf4j-log4j12" rev="1.5.6"/>
        <dependency org="javax.servlet" name="servlet-api" rev="2.3"/>

This gives me the following JAR files in lib/

log4j-1.2.14.jar     slf4j-api-1.5.6.jar      wicket-1.3.5.jar
servlet-api-2.3.jar  slf4j-log4j12-1.5.6.jar

I want to include all of these JAR files EXCEPT one in the .war file.
The file I do not want to include is servlet-api-2.3.jar as it's only
a compile time dependency. It will be provided by Tomcat in my case.

How would you cleanly separate these? After <ivy:retrieve sync="true"
/> I have all the dependencies in lib/ .

What is the nicest way to exclude this one JAR-file? Should I just
hard code it in my Ant script? Has Ivy some nice feature for this? I'm
new to Ivy, I have looked around but haven't found any example I can

Best regards, Kent

View raw message