aspose file tools*
The moose likes Java in General and the fly likes Can't ant build a component due to ?faulty? build.xml file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Can Watch "Can New topic
Author

Can't ant build a component due to ?faulty? build.xml file.

Stan Smith
Greenhorn

Joined: Dec 15, 2004
Posts: 6
Howdy. I wasn't sure where to put this, so I put it in the general section. Feel free to move where needed?

Ok, so I'm going through the J2EE tutorials. I'm on chapter 3 when I stumble upon a little problem. The first Web Component they had me build worked out quite fine, because it didn't have any servlets to compile. But the 2nd one, and the following one have to get compiled. I can do that manually, using "javac -CLASSPATH c:\Java\Sun\AppServer\lib\j2ee.jar C:\...\file.java." But that's quite annoying, and I'd rather just use the asant build command.
What happens is the following, I enter the "asant (or just ant) build" and I get the following:

So I did "ant -projecthelp", which got me to "ant listprops". Which got me this output:

As you can see, the j2ee.home path is empty. But I've tried setting a thousand diffetenr Env Vars to make it work. I've put the /lib path into my PATH, as a separate "J2EE_Home/j2ee.home" variable, into CLASSPATH. Nothing helps, the listprops still shows it as empty. Please help?

[ December 15, 2004: Message edited by: Stan Vxxxx ]

(Marilyn broke long line of "code")
[ December 19, 2004: Message edited by: Marilyn de Queiroz ]

Calm like a bomb...
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12778
    
    5
Have you examined the build.xml file to see what classpath it is passing to the compiler?
Stan Smith
Greenhorn

Joined: Dec 15, 2004
Posts: 6
Yep, sorry, forgot to add that part. This is the reference in the .xml file:
Stan Smith
Greenhorn

Joined: Dec 15, 2004
Posts: 6
Bump?
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Does the build.xml file have a property named j2ee.home defined in it above the lines you quoted? Or is it defined in a build.properties file and the properties file is defined in build.xml? Or are you importing env properties?


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9046
    
  10
Welcome to JavaRanch, Stan Vxxxx! Please adjust your display name to meet the JavaRanch Naming Policy.
You can change it here.

Thanks!
Stan Smith
Greenhorn

Joined: Dec 15, 2004
Posts: 6
OMG! I love you! I was too quick looking through the build.xml file. It references a common targets.xml file where all the references are done. And that file references a build.properties file, that has the j2ee.home reference, that's empty. Thank you!!!

P.S. Name changed per request.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't ant build a component due to ?faulty? build.xml file.