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 8323297
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T23:40:55+00:00 2026-06-08T23:40:55+00:00

I thought I wouldn’t need to ask this but I am not having any

  • 0

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 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-08T23:40:57+00:00Added an answer on June 8, 2026 at 11:40 pm

    This is how you map a dependency onto the local “provided” configuration:

    <dependency org="org.apache.tomcat" name="servlet-api" rev="6.0.16" conf="provided->master"/>
    

    The configuration mapping works as follows:

    provided->master
       ^        ^
       |        |
     Local    Remote
     config   config
    

    As explained in the answer the special “master” configuration contains only the artifact published by this module itself, with no transitive dependencies:

    • How are maven scopes mapped to ivy configurations by ivy

    This means the “transitive=false” attribute is not required.

    Update

    How you use the configuration is up to you. The first option is simpler, but I prefer the second approach because my configuration reports match my classpath contents

    Option 1

    You can create a single classpath as follows:

    <ivy:cachepath pathid="compile.path" conf="compile,provided"/>
    

    This can then be used in the javac task as follows:

    <javac ... classpathref="compile.path">
    ..
    

    Option 2

    Or I prefer to have a one-2-one mapping between configurations and classpaths:

    <ivy:cachepath pathid="compile.path" conf="compile"/>
    <ivy:cachepath pathid="provide.path" conf="provided"/>
    

    The problem with the latter approach is that the javac task need to have the classpath usage explicitly stated as follows:

    <javac ...
       <classpath>
          <path refid="compile.path"/>
          <path refid="provided.path"/>
       </classpath>
    

    I think this explicitly explains how you use this special provided scope, but it’s really up to you.

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

Sidebar

Related Questions

I thought this would be fairly simple but it turns out not to work
This is not a programming question per se, but here it goes. I am
I am having problems finding a solution for what I thought would be straight
I thought caseinsensitiveLocalizedCompare: would take care of this (that is not including the and
I thought I could do this with advanced CSS selectors, but struggling. I have
This is my first post in here and I wouldn't post a question here
This is a question that's been nagging me for some time. I always thought
I thought this approach would be safe, in that it wouldn't allow exceptions to
This is what I thought would be a simple select clause, however the following
Just a thought. Wouldn't it be useful to have optional type parameters in C#?

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.