Dominique,

To answer your question, *some* of my dependent classes are in ${bin.dir}
but most are in a different directory. Here is my setup:

${bin.dir} = eclipse\workspace\foo:
package mydomain.foo.Foo: -> mydomain.foo.Foo.class;
mydomain.foo.FooConstants.class; mydomain.foo.FooPreferences.class;
package mydomain.foo.Foo.Resources -> various resource files used by program
Foo

${common.dir} = eclipse\workspace\common:
package mydomain.common -> various classes used by program Foo or its
dependents
package mydomain.common.prefs -> various classes used by program Foo or its
dependents
package mydomain.common.utilities -> various classes used by program Foo or
its dependents

My root class is definitely mydomain.foo.Foo.class in ${bin.dir}.

My problem is that I'm not clear on how to define the classfileset so that
it includes the dependencies in ${common.dir}. The examples are not clear
enough for me to understand how to do this. It seems to me that the only
thing I should have to know is the root class and that Ant should be able to
figure out all dependencies from there; that's how I figured out the
dependencies mechanically. The code I've got know seems to limit the scope
so that the classfileset isn't considering dependencies outside of
${bin.dir} so I need to know how to expand that scope to include
${common.dir}. Nothing I've tried seems to work.

Rhino

----- Original Message ----- 
From: "Dominique Devienne" <[EMAIL PROTECTED]>
To: "Ant Users List" <[email protected]>
Sent: Friday, January 28, 2005 5:06 PM
Subject: RE: Problem with classfileset


> From: Rhino [mailto:[EMAIL PROTECTED]
>
> <classfileset id="reqdClasses" dir="${bin.dir}">
>   <root classname="mydomain.foo.Foo"/>
> </classfileset>
>
> When I run it, the jar contains only three class files (and a
manifest):
>
> mydomain.foo.Foo.class
> mydomain.foo.FooConstants.class
> mydomain.foo.FooPreferences.class
>
> mydomain.foo.Foo is indeed the main class of the program and it is
indeed
> dependent on mydomain.foo.FooConstants and
mydomain.foo.FooPreferences.
>
> Unfortunately, none of the classes that *they* depend on are present
in
> the jar. There are quite a few of them, all belonging to packages
starting
> with mydomain.common.

But are the missing dependent classes in ${bin.dir}?
And are they in the correct directory, i.e. mydomain.common.Foo
can be found in ${bin.dir}/mydomain/common/Foo.class?

Alternatively, you could use a <rootfileset> like the doc shows
to force including the missing classes, but my guess is that the classes
are not in ${bin.dir} for now. --DD

PS: I myself used <genjar> a long time ago to do what you're trying to
do, but I don't know if that task/project still exists.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 25/01/2005




-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.300 / Virus Database: 265.7.4 - Release Date: 25/01/2005


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to