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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:57:48+00:00 2026-06-08T14:57:48+00:00

I just did a very ugly hack. I have a module A which produces

  • 0

I just did a very ugly hack.

I have a module A which produces two jars.

moduleA.jar and moduleA.test.jar

The module.test.jar is used by other projects in the same repository and won’t be published further to other repositories.

I added this to ivy.xml of moduleA

<publications>
    <artifact name="moduleA" type="jar" ext="jar" conf="compile"/>

    <artifact name="moduleA.test" type="jar" ext="jar" conf="test"/>
</publications>

How can I consume that in moduleB . I understand that Maven doesn’t support multiple artifacts per module, and I read somewhere that this is supported by IVY.
I just don’t seem to get it write.

I tried this in ivy.xml of moduleB:

<dependency org="my.org" name="moduleA" rev="SNAPSHOT" conf="compile,test->default,test" />
<dependency org="my.org" name="moduleA.test" rev="SNAPSHOT" conf="compile,test->default,test" />

But this obviously didn’t work, since ‘name’ is the name of the module not artifact. I had a work around using the type attribute:
in moduleA:

<artifact name="moduleA" type="test.jar" ext="jar" conf="test"/>

and in moduleB:

<dependency org="my.org" name="moduleA" rev="SNAPSHOT" conf="compile,test->default,test" />

This worked, but looks very ugly. since I have to produce the file in ANT looking like this:

moduleA-SNAPSHOT.test.jar

any neat solution to depending on multiple artifacts of the same module?

This question id different from:
How do I solve Multiple artifacts of the module X are retrieved to the same file in Apache 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-08T14:57:49+00:00Added an answer on June 8, 2026 at 2:57 pm

    Assuming that Module A looks like this:

    <info organisation="my.org" module="moduleA" .../>
    
    <configurations>
        <conf name="compile description="???"/>
        <conf name="test    description="???"/>
        ..
    </configurations>
    
    <publications>
        <artifact name="moduleA" type="jar" ext="jar" conf="compile"/>
        <artifact name="moduleA.test" type="jar" ext="jar" conf="test"/>
    </publications>
    

    The following Module B declaration will retrieve the moduleA.jar

    <dependency org="my.org" name="moduleA" rev="latest.integration" conf="default->compile" />
    

    The following Module B declaration will retrieve the moduleA.test.jar

    <dependency org="my.org" name="moduleA" rev="latest.integration" conf="default->test" />
    

    It’s the configuration mappings that make it work:

    default->compile
    ^          ^
    |          |
    Local configuration
               |
               Remote configuration
    

    The local configuration doesn’t have to be “default”. Obviously if Module B also uses configurations, you could use one of those.

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

Sidebar

Related Questions

This seems very foolish mistake, I just did a git stash pop on a
I just did a little test: I started my app, went to a certain
I've created a very simple test Document based application with Core Data. I did
I just did a syntax like this mysql_real_escape_string($var = 'Hello'); print_r($var); and I got
I just did something dumb with my SVN repository, I accidentally imported a load
I just did an svn merge from a branch to a trunk in my
I just did File -> New Project last night on a new project. Ah,
I just did a fresh installation of Visual Studio 2010 Ultimate and ReSharper 5.
I just did one of those auto updates of the Android SDK (API 15
I just did a fresh install of Apache server 2.2. Everything works. When I

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.