How to copy runtime libraries without the provided ones in IVY

Viewed 1968

I thought I wouldn't need to ask this but I am not having any progress.

The solution to this question: How are maven scopes mapped to ivy configurations by ivy actually addresses question but in its theoretical part.

I have this configuration:

<conf name="compile"  description="???" />
<conf name="runtime"  description="???" extends="compile" />
<conf name="test"     description="???" extends="runtime" />
<conf name="provided" description="???" />

Assume I have this dependency:

<dependency org="org.apache.tomcat" name="servlet-api" rev="6.0.16" transitive="false" />

What I want is: when I invoke the ivy:retrieve to copy the libraries to the .war lib directory before bundling it, I want only to copy all runtime (and compile implicitly) but no servlet-api.

so how to use ivy:retrieve then?

<ivy:retrieve conf="WHAT_TO_PUT_HERE" />

and how to configure the dependency:

<dependency conf="WHAT_IS_THE_CONF_MAPPING" org="org.apache.tomcat" name="servlet-api" rev="6.0.16" transitive="false" />

I'm plateauing here, so please any help would be appreciated.

Knowing that the ivy.xml for servlet-api defines the artifact with

conf="master"

So I think the question is how to 'really' map Provided scope of maven to the provided configuration of IVY.

1 Answers
Related