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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:11:45+00:00 2026-06-11T14:11:45+00:00

So, let’s assume that I have an already installed SVN and installed ANT /

  • 0

So, let’s assume that I have an already installed SVN and installed ANT / Ivy locally.

I want to have the “shared” part of the ivy config point to some kind of share on a server. How would I need to set this up?

I know I have to dig through the ivy jar and pull out the ivysettings file and modify shared repositories.

So let’s assume that I have a server on my intranet at MyServer.intranet.net and my team’s folder was under /path/to/NetAdmin (thus the full path would be MyServer.intranet.net/path/to/NetAdmin ) How would I get this set up as a team repository for shared libraries? Would I just specify it and when I package the projects it writes the dependencies there?

Thanks

  • 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-11T14:11:46+00:00Added an answer on June 11, 2026 at 2:11 pm

    Here what I did:

    • I created a Subversion project called ivy.dir.
    • In this ivy.dir project, I have the latest ivy.jar.
    • In the ivy.dir, I have the ivysettings.xml setup for our environment. For example, we use a local Artifactory Maven repository for our own jars. The ivysettings.xml in the ivy.dir project points to that.
    • I created a file called ivy.tasks.xml. This is an Ant build file.

    The ivy.tasks.xml looks like this:

    <project name="Ivy.Tasks"
        xmlns:ivy="http://ant.apache.org/ivy"
        xmlns:jacoco="antlib:org.jacoco.ant">
    
        <property environment="env"/>
    
        <!-- Add Ivy Tasks -->
        <taskdef uri="http://ant.apache.org/ivy"
            resource="org/apache/ivy/ant/antlib.xml">
            <classpath>
                <fileset dir="${ivy.dir}">
                    <include name="ivy*.jar"/>
                </fileset>
            </classpath>
        </taskdef>
        <ivy:settings file="${ivy.dir}/ivysettings.xml"/>
    </project>
    

    Notice that I have my own Ivy settings, thank you. I didn’t have to munge up the one in the ivy.jar (although I could have since everyone will use my ivy.jar file!). My ivysettings.xml looks like this:

    <ivysettings>
    
        <!-- I'll explain this part below -->
        <property name="env.EXECUTOR_NUMBER" value="0" override="false"/>
        <caches
            defaultCacheDir="${ivy.default.ivy.user.dir}/cache-${env.EXECUTOR_NUMBER}"
            resolutionCacheDir="${ivy.dir}/../target/ivy.cache"/>
    
        <!-- Just the standard stuff you find in the `ivysettings.xml in the ivy.jar -->
        <settings defaultResolver="default"/>
        <include file="${ivy.dir}/ivysettings-public.xml"/> <!-- This one is different -->
        <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/>
        <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/>
        <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
        <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
    </ivysettings>
    

    The big change is the ivysetting-public.xml file:

    <ivysettings>
        <resolvers>
            <ibiblio name="public"
                m2compatible="true"
                checkmodified="true"
                root="http://repos.vegicorp.com/artifactory/libs-release" />
        </resolvers>
    </ivysettings>
    

    It’s pointing to my local Maven repository — my Artifactory server.

    Now, for a developer to use Ivy, all they have to do is:

    • In the root of their project in Subversion, add a svn:external. This svn:external will be used to bring my ivy.dir project into their Subversion project.
    • In the build.xml
      • Add an Ivy namespace definition to their build.xml in the <project> definition.
      • Set the property ivy.dir to `${basedir}/ivy.dir.
      • Use the <import> task to import ${ivy.dir}/ivy.tasks.xml into their build.xml file.

    Something like this:

    <project name="post-a-matic" default="package" basedir="."
        xmlns:ivy="http://ant.apache.org/ivy">
    
        <property name="ivy.dir" value="${basedir}/ivy.dir"/>
        <import file="${ivy.dir}/ivy.tasks.xml"/>
    
        <!-- A whole bundle of properties are set -->
    
        <target name="clean">
            <delete dir="${target.dir}"/>
            <ivy:cleancache/>   <!-- Look: They have access to Ivy! -->
        </target>
    
        <target name="-resolve">
            <ivy:resolve/>
        </target>
    
        <target name="compile"
            depends="-resolve">
    
           <ivy:cachpath 
               pathid="main.classpath" 
               conf="compile,provided"/>
    
           <!-- Boy that's easy! -->
    
           <javac srcdir="${main.srcdir}"
               destdir="${main.destdir}"
               classpathref="main.classpath"/>
       </target>
    
       <!-- On and on -->
    

    This solves a lot of problems:

    • You can update the ivy.settings and everyone will have the updated settings. This ended up being very important to us because we use Jenkins and I wanted Jenkins to clean the ivy cache on each build. Whoops! That cleans out the ivy cache on builds that are being executed at the same time! I solved the problem by changing the ivysettings.xml file to define a different Ivy cache for each Jenkins build executor. One the Jenkins server, you have Ivy caches called $HOME/.ivy2/cache-0, $HOME/.ivy2/cache-1, etc. Each executor can delete it’s own Ivy cache without affecting the others. Users, meanwhile will just have $HOME/.ivy2/cache-0.
    • You also can update Ivy when a new jar comes out. You update your Ivy jar file, and everyone gets the lated.
    • Big one of course is that Ivy installs itself when a project is checked out.
    • And an extra special bonus: You could use your ivy.dir and ivy.tasks.xml file to install other tasks. For example, each of our projects must run itself through Findbugs, PMD, CPD (part of the PMD project, Checkstyle, and use JaCoCo. for test coverage.

    Each one of these projects consist of a jar file, and a <taskdef> to pull the task definitions into Ant. And, how do you use these tasks too? They’re not defined in the standard Ant model. Developers don’t know how to use them.

    I’ve added these jars into my ivy.dir project, and installed all of those task definitions into my ivy.tasks.xml file. I also defined easy to use <macrodef> for most of these tasks, so it’s easy for the developers to use them. In fact, I’ve even included the old Ant-Contrib tasks just for fun.

    Now, once you add ivy.dir into your project, you have all of these extra tasks, and you have nothing to install on your machine.

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

Sidebar

Related Questions

Let assume we have two activities. A - main activity, that is home launcher
Let's say I don't have photoshop, but I want to make pattern files (.pat)
Let me explain best with an example. Say you have node class that can
Let's say that I have a SQLite database that I create in a separate
Let's say I have thousands of users and I want to make the passwords
Let's assume that we are building a high traffic site that will be used
Let's say I have multiple requirements for a password. The first is that the
Let's assume that a user votes for some movies in a scale of 1
Let's say that I have a date in R and it's formatted as follows.
I have a French site that I want to parse, but am running into

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.