ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stirling, Scott" <scott.stirl...@workscape.com>
Subject RE: compiling packages in an explicit order with javac
Date Fri, 21 Nov 2003 16:57:31 GMT
> From: Will Lopez [mailto:william.lopez@eds.com]
> 
> I think with what you're facing there isn't going to be 1 
> right answer. We face a similar problem with circular 
> references....the solution is to remove them and your 
> builds will simplify as a result...we are still not 100%
> cycle free but working on it.

Will is right.  There is no way to enforce the proper dependency ordering in a build script
unless you (a)just get lucky or (b) analyze and enforce the dependencies.  Pasta is a good
free tool for doing the analysis:
http://javacentral.compuware.com/pasta/

Other tools that are more or less accurate or free are SmallWorlds and JDepend (which has
an Ant task and an API for enforcing dependencies programmatically through JUnit tests).

> From: Steph Richardson
> >chris - the type of dependancy checking I mean is 
> >dependancies between packages, not between .java & .class
> >files. I want to have an explicit compilation order, to 
> >prohibit circular references between my packages.

What I do is analyze and identify the dependencies with Pasta.  This takes manual effort with
the tool (i.e., the tool doesn't fix anything, it just reports, although Pasta does have some
features to "fix" dependencies based on your input, I think).  Then we do some refactoring
with the code to eliminate circular, undesirable and wrong-direction dependencies.   Then
we simply use the build order and classpath settings in the <javac> targets to enforce
the dependencies in the direction we want.

Scott Stirling
Workscape, Inc.

***********************************************************************
This message is intended only for the use of the intended recipient and
may contain information that is PRIVILEGED and/or CONFIDENTIAL.  If you
are not the intended recipient, you are hereby notified that any use,
dissemination, disclosure or copying of this communication is strictly
prohibited.  If you have received this communication in error, please
destroy all copies of this message and its attachments and notify us
immediately.
***********************************************************************


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message