ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Phillip Rhodes <mindcr...@cpphacker.co.uk>
Subject Re: Deploying a Project(s)
Date Thu, 20 Dec 2007 01:27:28 GMT
Roger Kapsi wrote:

> And I want to tell Ivy or rather Ant to give me C and all its
> dependencies. In other words I want to get C.jar, B.jar, A.jar and all
> the other external Jars. Hope somebody can give me a hint how to do
> that or am I on the wrong track with Ivy?

There may be a cleaner way, but here's what I do:

1. in each sub-project, resolve the dependencies to the local "lib" dir
with configurations separating the dependencies that are needed at
runtime from the ones that arent'. So I wind up with something like

/myproject/subproject1/lib
			/core/
                   	   ajar.jar
                   	   bjar.jar
              		/compile/
                   	   compileonly1.jar
                   	   compileonly2.jar


2. in the "package" task for each sub-project (it probably more properly
 belongs in "publish" but I'm still tweaking this) copy all of the
"runtime" jars (the "core" directory) to a common dir

so I have something like this:

/myproject/
    subproject1/
    subproject2/
    subprojectN/
    commonlib/ :this contains all the dependent jars for all subprojects

3. then in the "master" project I just declare dependencies on the
artifacts from the subprojects like normal and resolve them to a dir
I call "assemble."  The I copy everything from the commonlib dir into
the "assemble" dir and package it.  In my case the subprojects are
typically building war files or ejb-jar files and the driver builds
an ear, but the same approach could be used for other things I guess.

Again, there might be a better way, but this seems to work for now.
HTH.


TTYL,


-- 
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net

Mime
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message