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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T07:34:51+00:00 2026-06-08T07:34:51+00:00

I’m using Ivy for my projects, but we’re using Artifactory as our jar repository.

  • 0

I’m using Ivy for my projects, but we’re using Artifactory as our jar repository. I actually use <ivy:makepom> Ant task to create a Maven pom.xml, so I can deploy the jars and wars back to my Maven repository via the Maven deploy:deploy workflow.

I build a big jar called common-all.jar that requires about 30 jars for its compilation. I specify about 10 jars, and Ivy pulls down the dependencies. As part of the compile process, I specify the log4j jar, and some JBoss jars. These jars, of course, will be provided by our environment.

With this Jar, I also a bunch of wars. I specify the common-all.jar as part of my dependency, and the 30 jars that common-all.jar requires are also pulled down. All is well and good.

The problem is when I build the war. I do not want the JBoss jars or the log4j jars included as part of the war. These will be provided by the environment. I’ve marked them as provided in the pom.xml file. when I build common-all.jar.

Now, the question is how do I specify that I want these when I compile the code for the war, but I don’t want to include them in my war itself.

Here’s a sample of my ivy.xml file.

How can I specify that the common-all.jar requires certain specific jars for compilation, but when I build it in a war, I don’t want all of these jars

<ivy-module version="1.0">
    <info
        organisation="com.travelclick"
        module="TC-AppUtil"
        revision="4.1"
        status="release"/>

    <configurations>
        <conf name="default" visibility="public"
            description="The single built artifact. Nothing else"/>

        <conf name="compile" visibility="public"
            description="The master module and transitive dependencies"/>

        <conf name="provided" visibility="public"
            description="Needed for compile. Will be provided outside or war"/>

        <conf name="runtime" visibility="public"
            description="Not required for compile, but for runtime"
            extends="compile"/>

        <conf name="default" visibility="public"
            description="The default configuration"
            extends="runtime"/>

        <conf name="test" visibility="private"
            description="Required for testing" extends="runtime"/>

    </configurations>
    <dependencies>

        <!-- Normal Compile Dependencies -->

        <dependency org="ximpleware" name="vtd-xml"
            rev="2.5" conf="compile->default"/>

        <dependency org="com.travelclick" name="common-all"
            rev="4.1" conf="compile->compile,runtime"/>

        <!-- Testing -->

        <dependency org="junit"             name="junit"
            rev="4.10"                      conf="test->default"/>
    </dependencies>
</ivy-module>
  • 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-08T07:34:52+00:00Added an answer on June 8, 2026 at 7:34 am

    You haven’t demonstrated how you declare the common-all dependency, so I’ll make up the following example:

    <dependency org="mygroup" name="common-all" rev="1.0" conf="compile->default;provided"/>
    

    The magic is the configuration mapping:

    • The local “compile” configuration is mapped to the common module and its default (compile) scope dependencies, and
    • The local “provided” configuration is mapped to the common module and its provided scope dependencies.

    Inside your build file the configurations are used as follows:

    <project name="demo" default="build" xmlns:ivy="antlib:org.apache.ivy.ant">
    
        <target name="resolve">
            <ivy:resolve/>
            <ivy:cachepath pathid="compile.path"  conf="compile"/>
            <ivy:cachepath pathid="provided.path" conf="provided"/>
        </target>
    
        <target name="compile" depends="resolve">
            <javac ...
                <classpath>
                    <path refid="compile.path"/>
                    <path refid="provide.path"/>
                </classpath>
            </javac>
    
        </target>
    
        <target name="build" depends="compile">
            <ivy:retrieve pattern="build/lib/[artifact].[ext]" conf="runtime"/>
    
            <war ...
                <lib dir="build/lib"/>
            </war>
        </target>
    
        <target name="clean">
            <delete dir="build"/>
            <ivy:cleancache/>
        </target>
    
    </project>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
I am trying to understand how to use SyndicationItem to display feed which is
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

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.