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

  • Home
  • SEARCH
  • 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 9181169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T18:13:24+00:00 2026-06-17T18:13:24+00:00

When I use convertpom task in Ivy to convert a pom.xml to ivy.xml ,

  • 0

When I use convertpom task in Ivy to convert a pom.xml to ivy.xml, I get default publications

<publications>
    <artifact name="XYZ" type="jar" ext="jar" conf="master"/>
</publications>

How do I modify pom.xml, so that more artifacts are added to this in conversion. Where does converttopom pick up the artifacts from. Also, how do I change the type?

Is it possible to override these in ivy:publish call?

found this piece of code in convertpom ant task, not sure how it is used.

   private void addSourcesAndJavadocArtifactsIfPresent(
         PomModuleDescriptorBuilder mdBuilder, ParserSettings ivySettings) {
     if (mdBuilder.getMainArtifact() == null) {
         // no main artifact in pom, we don't need to search for meta artifacts
        return;
     }
     ModuleDescriptor md = mdBuilder.getModuleDescriptor();
     ModuleRevisionId mrid = md.getModuleRevisionId();
     DependencyResolver resolver = ivySettings.getResolver(
         mrid);

    if (resolver == null) {
        Message.debug("no resolver found for " + mrid 
                         + ": no source or javadoc artifact lookup");
    } else {
        ArtifactOrigin mainArtifact = resolver.locate(mdBuilder.getMainArtifact());

        if (!ArtifactOrigin.isUnknown(mainArtifact)) {
            String mainArtifactLocation = mainArtifact.getLocation();

            ArtifactOrigin sourceArtifact = resolver.locate(mdBuilder.getSourceArtifact());
            if (!ArtifactOrigin.isUnknown(sourceArtifact)
                    && !sourceArtifact.getLocation().equals(mainArtifactLocation)) {
                Message.debug("source artifact found for " + mrid);
                mdBuilder.addSourceArtifact();
            } else {
                // it seems that sometimes the 'src' classifier is used instead of 'sources'
                // Cfr. IVY-1138
                ArtifactOrigin srcArtifact = resolver.locate(mdBuilder.getSrcArtifact());
                if (!ArtifactOrigin.isUnknown(srcArtifact)
                        && !srcArtifact.getLocation().equals(mainArtifactLocation)) {
                    Message.debug("source artifact found for " + mrid);
                    mdBuilder.addSrcArtifact();
                } else {
                    Message.debug("no source artifact found for " + mrid);
                }
            }
            ArtifactOrigin javadocArtifact = resolver.locate(mdBuilder.getJavadocArtifact());
            if (!ArtifactOrigin.isUnknown(javadocArtifact) 
                    && !javadocArtifact.getLocation().equals(mainArtifactLocation)) {
                Message.debug("javadoc artifact found for " + mrid);
                mdBuilder.addJavadocArtifact();
            } else {
                Message.debug("no javadoc artifact found for " + mrid);
            }
        }
    }
}
  • 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-17T18:13:25+00:00Added an answer on June 17, 2026 at 6:13 pm

    This really demonstrates one of the key differences between Maven and ivy…

    An ivy file explicitly lists all the files contained in the module. A Maven POM on the other hand does not. Instead zero or more additional files can be stored in Maven each with a different “classifier” to make the filename unique.

    I can’t see any way to build the complete “publications” section in ivy without having access to the Maven module’s filesystem. Are you using a Maven repository manager? Nexus has a REST API that perhaps you could invoke to obtain all files in a module (Just a thought)

    Another idea is to submit a request to extend the convertpom task. Create some optional child tags that enable you to list the available classifiers:

    <ivy:convertpom pomFile="pom.xml" ivyFile="ivy.xml">
        <classifier name="sources"/>
        <classifier name="javadoc"/>
        <classifier name="archive" type="tar.gz/>
    </ivy:convertpom>
    

    I don’t see this change being very popular (or useful). Most people are converting in the other direction using the makepom task.

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

Sidebar

Related Questions

use the [] symbol in the name of the form field you are submitting
Note: I'm using ConvertTo-XML and cannot use Export-Clixml : I create a simple PSObjec
How do I properly use $_ in out-file? Here's my code: get-content computers.txt |
For bean->xml convertion in webservices we use Aegis from CXF (it is jaxb-compatible, as
I want to use the Get-Credential cmdlet in my code. How is is possible
Use Case Show a photo uploaded by the user in a square box with
use C#,want to upload excel file on google doc. bellow syntax use to upload
use Text::Table; my $tb = Text::Table->new(Planet,Radius\nkm,Density\ng/cm^3); $tb->load( [ Mercury,2360,3.7], [ Mercury,2360,3.7], [ Mercury,2360,3.7], );
use strict; use warnings; use Time::HiRes qw(sleep); use Test::WWW::Selenium; use Test::More no_plan; use Test::Exception;
Use of gradient images is very common among developers for styling a page. Gradient

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.