File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Ant, Maven and Other Build Tools and the fly likes how to set a dir with ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "how to set a dir with ant" Watch "how to set a dir with ant" New topic
Author

how to set a dir with ant

miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
at some point my dir looks like:
agilejava
sis exercicios

actually i'm running ant from inside exercicios and want to tell ant to get
sis package, but this doesnt work:


Can someone pls help me?

TiA


java amateur
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
miguel,

What doesn't work? What kind of error are you getting? What are you using that path in? Have you looked at verbose output (-v)?
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i get:
package sis.report does not exist
but it does exist.I cant reach that package; normally i'd do:
..\
but doesnt work and tried some other combinations but cant indicate, in the classpath, the right path...

with -v i get:
[javac] File to be compiled:
[javac] C:\javas\AgileJava\exercicios\util\StringUtil.java
[javac] C:\javas\AgileJava\exercicios\util\StringUtil.java:5: package sis.report does not exist

i want to reach the package sis that lies inside C:\javas\agilejava

i'm running ant from
C:\javas\AgileJava\exercicios

BTW thanks for helping
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
i guess its better to post my build.xml file:
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Well, it is probably looking in the directory you instructed it to look in, but have you compiled that code first? If you have, wouldn't it be in a classes dir (that's what your destdir is set to for javac in the directory you are working in).

I don't follow your project structure, why don't you create a build file at a higher level and take care of the dependencies?
miguel lisboa
Ranch Hand

Joined: Feb 08, 2004
Posts: 1281
Hi again, Carol

Well, it is probably looking in the directory you instructed it to look in, but have you compiled that code first? If you have, wouldn't it be in a classes dir

so instead i made:

and worked!!
thanks a lot
Carol Enderlin
drifter
Ranch Hand

Joined: Oct 10, 2000
Posts: 1364
Hi again miguel,

Glad to hear it worked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to set a dir with ant