• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you examined the build.xml file to see what classpath it is passing to the compiler?
 
Stan Smith
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yep, sorry, forgot to add that part. This is the reference in the .xml file:
 
Stan Smith
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Bump?
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Marilyn de Queiroz
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic