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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:37:28+00:00 2026-05-30T08:37:28+00:00

I have a ivy.xml – https://gist.github.com/1898060 I also have the jar file related to

  • 0

I have a ivy.xml – https://gist.github.com/1898060
I also have the jar file related to this ivy.xml.
What i need is a mechanism to import this project to my maven repo and use it in my maven project.
SO basically if i am able to convert the ivy.xml to pom.xml , i might be able to get it work.
Is there some mechanism through which i can achieve this.
I am looking for something like a maven plugin to accomplish this task.
I know that there are ways we can edit the ivy.xml and build.xml to achieve this but then i dont want to do it , as the project is in a private repo.

  • 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-05-30T08:37:29+00:00Added an answer on May 30, 2026 at 8:37 am

    What you really need to do is publish the jars built by ANT project into your Maven repository.

    ant -Dproject.version=0.9.0-local-20120211095554 clean publish
    

    I know you don’t want to change the ANT build, but creating an extra “publish” target will properly integrate your ANT and Maven projects.

    The two jar artifacts, published by your modified ANT build, could be consumed normally as follows:

    <dependency>
        <groupId>com.opengamma</groupId>
        <artifactId>og-analytics</artifactId>
        <version>0.9.0-local-20120211095554</version>
    </dependency>
    
    <dependency>
        <groupId>com.opengamma</groupId>
        <artifactId>og-analytics</artifactId>
        <version>0.9.0-local-20120211095554</version>
        <classifier>sources</classifier>
    </dependency>
    

    Modifications to your ANT build

    ivy.xml

    Main changes are to your publications section:

    <ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
        <info organisation="com.opengamma" module="og-analytics"/>
    
        <publications>
          <artifact name="og-analytics" type="jar"/>
          <artifact name="og-analytics" type="pom"/>
          <artifact name="og-analytics" type="jar" e:classifier="sources"/>
        </publications>
    
        <dependencies>
          <dependency name="og-util" rev="0.9.0-local-20120211095525" revConstraint="latest.integration"/>
    
          <dependency org="org.jfree" name="jfreechart" rev="1.0.13"/>
          <dependency org="cern" name="colt" rev="1.2.0"/>
          <dependency org="cern" name="parallelcolt" rev="0.9.1"/>
          <dependency org="latexlet" name="latexlet" rev="1.11"/>
          <dependency org="org.apache.commons" name="commons-math" rev="2.1"/>
    
          <dependency org="it.dexy" name="json-doclet" rev="0.3.1"/>
          <dependency org="org.json" name="simple" rev="1.1"/>
          <exclude org="org.junit"/>
        </dependencies>
    </ivy-module> 
    

    Notes:

    • The ANT project will now publish 3 files, jar, sources jar and the Maven POM
    • In Maven source jars have a “classifier” attributes that is set to “sources” (Not source). To facilitate this we’re adding an ivy extra attribute.
    • No need for version and status information in the info tag header. This will be added by the publication step.

    build.xml

    <target name="prepare" description="Generate POM">
        <fail message="Unset property: project.version" unless="project.version"/>
    
        <ivy:deliver deliverpattern="${build.dir}/ivy.xml" pubrevision="${project.version}" status="release"/>
    
        <ivy:makepom ivyfile="${build.dir}/ivy.xml" pomfile="${build.dir}/${ivy.module}.pom"/>
    </target>
    
    <target name="publish" depends="build,prepare" description="Upload to Nexus">
        <ivy:publish resolver="nexus-deploy" pubrevision="${project.version}" overwrite="true" publishivy="false" >
            <artifacts pattern="${build.dir}/[artifact](-[classifier]).[ext]"/>
        </ivy:publish>
    </target>
    

    Notes:

    • The deliver task is optional, but recommended in case your ivy file contains dynamic revisions, such as “latest.release” or “latest.integration”.
    • The makepoms task has powerful support for convert ivy configurations into Maven scopes. Does not apply in your case, but an incentive to learn more about ivy 🙂
    • The publish task uses a specified pattern to find files specified in ivy’s publications section.

    ivysettings.xml

    This is where you configure the location of the repositories and credentials to be used by publish build target.

    <ivysettings>
        <settings defaultResolver="nexus-central"/>
        <credentials host="somehost" realm="Sonatype Nexus Repository Manager" username="????" passwd="????"/>
        <resolvers>
            <ibiblio name="nexus-central" root="http://somehost/nexus/content/repositories/central/" m2compatible="true"/>
            <ibiblio name="nexus-deploy" root="http://somehost/nexus/content/repositories/repo" m2compatible="true"/>
        </resolvers>
    </ivysettings>
    

    Notes:

    • Ivy downloads use the configured default resolver nexus-central.
    • The ivy publish task pushes to the Nexus repository called nexus-deploy
    • The security realm in this example matches Nexus Maven. Would be different for other repo managers.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

At the moment I have this configuration: build.xml: <!-- Ivy settings start--> <condition property=ivy.home
In my ivy.xml file I have dependency statements like: <dependency conf=*->* org=gnu name=gcc rev=4.2.1
I have following definition in ivy.xml <dependency org=southbeach name=ego rev=4.3.1 conf=properties->asterik > <artifact name=ego
I have a fairly large ivy.xml containing a number of configurations which are the
I have an ivy.xml that can successfully resolve all of its dependencies, except the
I have an ivy.xml containing <dependencies> <dependency org=commons-lang name=commons-lang rev=2.4/> <dependency org=foo-bar name=superwidgets rev=1.5/>
I am building a project using Ant and Ivy. The build.xml file depends on
I have an ivy file with the following dependency: <dependency org=totimm name=techcentral rev=1.6.+ conf=sdk->sdk
I have an issue where in I have defined dependancies in ivy.xml on our
Consider an ivy.xml like the following: <ivy-module version=2.0> <info organisation=com.foo module=FooBar /> <dependencies> <dependency

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.