You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Digambar, Shaligram (Consultant)" <Sh...@GTECH.COM> on 2004/02/20 16:38:11 UTC

Multiple source paths for javac

I have a javac task that looks like
<javac destdir="builddir" srcdir="buildroot/${srcPath}"> 
where I have defined srcPath in properties file as
srcPath=src/folder1:src/folder2
Depending on the project I am building, the srcPath will have variable
number of folders in various properties files. The javac task takes the
srcdir path as "buildroot/src/folder1:src/folder2" whihch is not what I
want. I want the the srcdir path as
"buildroot/src/folder1:buildroot/src/folder2" etc - (note the path for
folder2).

How do I achive this?



Thanks,
Shaligram


-----------------------------------------
This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message.  Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof.


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


Re: Multiple source paths for javac

Posted by Matt Benson <gu...@yahoo.com>.
--- "Digambar, Shaligram  (Consultant)"
<Sh...@GTECH.COM> wrote:
> I have a javac task that looks like
> <javac destdir="builddir"
> srcdir="buildroot/${srcPath}"> 
> where I have defined srcPath in properties file as
> srcPath=src/folder1:src/folder2

> want. I want the the srcdir path as
> "buildroot/src/folder1:buildroot/src/folder2" etc -
> (note the path for
> folder2).
> 
> How do I achive this?

First, I would try
<javac destdir="builddir" srcdir="${srcPath}">
  ...
</javac> 

if that doesn't work, this--

<pathconvert property="expanded.srcPath"
             targetos="unix">
  <path id="src.path">
    <pathelement path="${srcPath}" />
  </path>
</pathconvert>

<javac destdir="builddir" 
       srcdir="${expanded.srcPath}">
  ...
</javac> 

--should.

-Matt

__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

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