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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:01:42+00:00 2026-05-13T18:01:42+00:00

I have a WebApp with two dependencies as shown below. I would like to

  • 0

I have a WebApp with two dependencies as shown below. I would like to build a war file for deployment on Tomcat using Ant + Ivy.

+
+-MyWebApp // this Dynamic Java Web Application (deployed Tomcat and launches
           // a thread contained in MyApp) 
+-MyApp // this is just a vanilla Java Application
+-MyCommonStuff // these are common classes shared between MyApp and MyWebApp
                // Ex. Database access code & business classes

Using the Ant documentation I’ve worked out how to create the appropriate build.xml files for each project.
In other words each project has an independent build.xml, so in order to build the whole project all I have to do is:

mkdir build
cd build
export SOME_COMMONBASE=`pwd`
svn co https://mybuildmachine.lan/svn/mycommonstuff mycommonstuff
cd mycommonstuff
ant
cd ..
% this produces mycommonstuff.jar
svn co https://mybuildmachine.lan/svn/myapp myapp
cd myapp
ant
cd ..
% this produces myapp.jar
svn co https://mybuildmachine.lan/svn/mywebapp mywebapp
cd mycommonstuff
ant
cd ..
% this produces mywebapp.war and deploys it to Tomcat

Now what I would like to do is bring it all together so that I can kick off a single build. On the surface it looks like I should somehow be able to create an Ivy build.xml which wires the dependencies together. However, I’ve read the Ivy documentation and Googled for examples but I’m still none-the-wiser about how I can accomplish this task.
Can someone give me some pointers on how I can do this?

  • 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-13T18:01:42+00:00Added an answer on May 13, 2026 at 6:01 pm

    What you want to do is to use Ivy’s Ant tasks for the wiring. There’s quite a lot of finer details in there but basically you need your own Ivy repository and then just publish your own project artifacts there to use them elsewhere.

    For JAR library projects:

    • Use ivy:retrieve to get the dependencies so that you can build the project into a library.
    • Use ivy:publish to publish the built JAR into your own Ivy repository.

    For WAR projects:

    • Once again, use ivy:retrieve to get the dependencies so that you can build the project into a WAR.

    As for other parts, Ant itself has many many tasks to help you and then there’s some tasks provided by others such as svn task by tigris for getting the source from SVN and Ant’s optional SCP task for transferring the WAR file to extenral server.

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

Sidebar

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.