ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roman Kennke <ro...@kennke.org>
Subject Re: Advanced includes/excludes for javac
Date Mon, 23 Jun 2008 12:32:22 GMT
Hi Scot,

> Give this a try:
> 
> <javac ..>
>  	<include name="src/proj1/Class1.java src/proj2/Class2.java"/>
> </javac>

I don't think this works because the include/exclude is always relative
to the src dirs. I think I could trick it by setting the source dir to
some common top-level dir of the two subprojects, but then the javac
task could not map the source to class files anymore and I would end up
compiling all the stuff all the time (something I'd like to avoid).

> The javac task HTML has some more information on this...

Yeah, I already read through it and tried a couple of options, but none
of them seemed to work, for example:

    <javac>
      <src>
        <pathelement location="proj1" />
        <exclude name="Class1.java" />
      </src>
      <src>
        <pathelement location="proj2" />
      </src>
    </javac>

doesn't work.

    <javac>
      <src>
        <fileset dir="proj1">
          <include name="Class1.java" />
        </fileset>
        <fileset dir="proj2">
          <include name="Class2.java" />
        </fileset>
      </src>
    </javac>

Doesn't work either. Etc etc. The basic problem is that javac only
accepts one set of includes/excludes per javac task, but I need one set
of includes/excludes per srcdir. I'm hoping that I simply overlooked
something...?

If this is really not possible, I'd think about extending the javac task
for that, OR implement a special task that can do this. Then I'd like to
discuss at which point you think I should add the includes/excludes.

/Roman

-- 
http://kennke.org/blog/

Mime
View raw message