Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 38005 invoked from network); 1 Feb 2005 19:05:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Feb 2005 19:05:25 -0000 Received: (qmail 89053 invoked by uid 500); 1 Feb 2005 19:05:18 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 89004 invoked by uid 500); 1 Feb 2005 19:05:18 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 88991 invoked by uid 99); 1 Feb 2005 19:05:18 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from ev1s-216-127-78-4.ev1servers.net (HELO mail.ipov.net) (216.127.78.4) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 01 Feb 2005 11:05:16 -0800 Received: (qmail 12142 invoked from network); 1 Feb 2005 19:05:14 -0000 Received: from unknown (HELO ?192.168.5.47?) (216.77.58.66) by 0 with SMTP; 1 Feb 2005 19:05:14 -0000 Message-ID: <41FFD2F2.5060707@ipov.net> Date: Tue, 01 Feb 2005 13:05:22 -0600 From: "Robert r. Sanders" User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: [REPOST] Classfileset Confusion References: <00bc01c5086e$5d82dfd0$0d02a8c0@athlon> In-Reply-To: <00bc01c5086e$5d82dfd0$0d02a8c0@athlon> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Rhino wrote: >Hi everyone, > >I've been struggling with classfileset quite a bit in the last couple of >days and I'm afraid I'm just as confused now as I when I started out. Maybe >it's time to take a step back and ask a conceptual question or two. > >Given a single root class, named mydomain.foo.Foo.class, which resides in a >package called mydomain.foo that is situated in a directory called foo, can >I construct a classfileset that contains all of the classes upon which class >mydomain.foo.Foo.class depends, directly AND indirectly, even if they are in >different packages and directories? Or is classfilepath only capable of >finding direct dependents and/or dependents that are in the same package as >the root class? > >Here is my situation explained in a graphical manner. > >The main new code that I have written is in directory 'foo' which contains >two packages, 'mydomain.foo' and 'mydomain.foo.Resources'. Package >mydomain.foo contains three classes: >- Foo >- FooConstants >- FooPreferences >Package mydomain.foo.Resources contains a variety of List, Text, and Message >resource bundles used by class Foo and class FooPreferences. > >Class Foo is dependent on all of the items in these two packages. However, >only the List resource bundles actually involve class files; the other two >resource bundle types only result in .properties files. > >IN ADDITION, class FooPreferences has direct dependencies on these classes: >- AnimationPanel >- AudioPanel >- DigitalCountdownPanel >- DigitalClockPanel >all of which are in package mydomain.common AND >- LocalizationUtils >- LogUtils >- PreferenceUtils >- ReflectionUtils, all of which are in package mydomain.common.utilities. >All of the packages whose names begin 'mydomain.common' are in a directory >called 'common'. > >IN TURN, these classes have dependencies of their own, all of which are also >found in packages beginning with 'mydomain.common'. Therefore, they are all >found in directory 'common' too. > >There are a lot of classes in the 'common' directory, many of which are not >needed by class Foo to do its job, and they are organized into a variety of >packages, many of which Foo doesn't need, so I was hoping to construct a jar >that contained only the classes needed by Foo or its dependents. However, I >would be willing to simplify my requirement to having only the packages >needed by Foo to do its job, even if that means having several classes in >the jar that Foo will never use. > >I'm finding the documentation about classfileset confusing at best so I >truly can't tell if I have unrealistic expectations of 'classfileset' or if >I am just writing my definition incorrectly. > >It would really help me if someone could confirm categorically that a >classfileset will contain all direct AND INDIRECT dependencies of the root >class, even if they reside in different packages and directories than the >root class. > >If classfileset is capable of recursing to other packages in the same and >different directories, how do I make that happen? Right now, my classfileset >definition - > > > > > >is returning only these three classes: Foo, FooConstants, and >FooPreferences, in other words the immediate dependents of the root class >that are in the same package. The other immediate dependents that are in >another package in the same directory are NOT being picked up, nor are the >dependents in other packages under the common directory being picked up. > >If it is possible to incorporate all direct and indirect dependencies of my >root class in my classfileset, even if those depedent classes reside in >different packages and jars, what do I need to change in my definition to >make that happen? I have tried everything I could think of without success. > >Your assistance with this would be VERY VERY greatly appreciated. > >Rhino >--- >rhino1 AT sympatico DOT ca >"There are two ways of constructing a software design. One way is to make it >so simple that there are obviously no deficiencies. And the other way is to >make it so complicated that there are no obvious deficiencies." - C.A.R. >Hoare > > > > > I don't think you can do what you want with the . I have gotten something similar to work using some of the external tools (http://ant.apache.org/external.html) - GenJar and pack have both worked for me in the past. -- Robert r. Sanders Chief Technologist iPOV www.ipov.net --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org