OFFTOPIC: ANT's javac, multiple source directories, exclude some packages

Hello,

I know, there are a lot of ANT experts using IDEA. Maybe one can help
me.

Our project has multiple sub-projects, each in it's own source
directory:

src/project1/com/company/a
com/company/b
com/company/c
src/project2/com/company/d

Now I want to compile all sub-projects except the packages
com.company.b and com.company.c and therefor tried this javac-task:

<javac destdir="$"
debug="on"
optimize="off"
deprecation="on">
]]>
<fileset dir="$/project1"> <exclude name="com/company/b"/> <exclude name="com/company/c"/> </fileset> </src> <src path="$/project2"/>
<classpath refid="$"/>
</javac>

But I get following error:

...\build.xml:65: ...\src\project1\com\company\b\a\MyClass.java is not
a directory.

Does somebody knows a solution?

Thanks in advance!

Cheers,
Tom

1 comment
Comment actions Permalink

I've got it myself:

<javac destdir="$" debug="on" optimize="off" deprecation="on"> <src path="$/project1"/> <src path="$/project2"/> <exclude name="com/company/b/**"/> <exclude name="com/company/c/**"/> </src> <classpath refid="$"/> </javac> Sorry for any inconveniences. Tom On Fri, 11 Oct 2002 08:46:21 GMT, idea@regnis.de (Thomas Singer) wrote: > Hello, > > I know, there are a lot of ANT experts using IDEA. Maybe one can help > me. > > Our project has multiple sub-projects, each in it's own source > directory: > > src/project1/com/company/a > com/company/b > com/company/c > src/project2/com/company/d > > Now I want to compile all sub-projects except the packages > com.company.b and com.company.c and therefor tried this javac-task: > > <javac destdir="$"

debug="on"
optimize="off"
deprecation="on">
<src>
<fileset dir="$/project1"> > <exclude name="com/company/b"/> > <exclude name="com/company/c"/> > </fileset> > </src> > <src path="$/project2"/>
<classpath refid="$"/>
</javac>

But I get following error:

...\build.xml:65: ...\src\project1\com\company\b\a\MyClass.java is not
a directory.

Does somebody knows a solution?

Thanks in advance!

Cheers,
Tom


0

Please sign in to leave a comment.