ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeffrey Jensen" <JJEN...@agribank.com>
Subject Re: Building a source reference
Date Tue, 01 Oct 2002 22:51:11 GMT
I am still struggling with this and hope someone will shed the light.

I want to do something like this (this is obviously not correct
syntax!):

  <path id="src.java">
    <pathelement location="csourceweb/source"/>
    <pathelement location="csourceweb/test" if="compile.tests"/>
  </path>

  <javac ...>
    <src refid="src.java">

What works and is the best practice for this (adding additional source
directories for <javac> and <javadoc> source dirs based on a property)? 
Can someone please point me to the info in either the ant manual or Erik
& Steve's book (or some other URL)?  I just cannot find the details (and
have been trying a variety of things)...


>>> JJENSEN@agribank.com 10/01/02 12:57PM >>>
Hi,

In the snippet below, what is the solution to get "src.java"
shared/accessible in each target (<pathconvert> has to run only in a
target, right?!)?

And perhaps there is a better approach all around for javac & javadoc
to access the same source info with the "test" dir included only when
specified to...?


  <fileset id="src.java.files" dir="csourceweb">
    <include name="source/**/*.java"/>
    <include name="test/**/*.java" if="compile.tests"/>
  </fileset>
  
  <pathconvert property="src.java" pathsep=","
refid="src.java.files"/>

<target ...
  <javac ...>
    <src refid="src.java">

<target ...
  <javadoc ...>
    <sourcepath refid="src.java">


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


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


Mime
View raw message