permaculture playing cards
The moose likes Ant, Maven and Other Build Tools and the fly likes Ant tool and build.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant tool and build.xml" Watch "Ant tool and build.xml" New topic

Ant tool and build.xml

anas ibraheem

Joined: Oct 01, 2010
Posts: 9
hi all

i have a web application that i want to build in netbeans IDE , this existing project has a build file and i want to build the enviroment using this build file and the ant build ,also i want to use glassfish v3 as my application server , so i used the netbeans wizard to build this web application from existing source but it always give me this error when i tey to clean and build the application "please JBOSS_HOME" , so it seems that the build file is built to deploy under jboss ... what should i do "i am also new to Ant build files "

any help please
ani bua

Joined: Mar 06, 2009
Posts: 22
May be in your project setting the application is set to JBOSS . Change it to Glassfish and then try .
anas ibraheem

Joined: Oct 01, 2010
Posts: 9
thank you ani for your reply

so what you mea, i should replace the JBOSS_HOME property to GLASSFISH_HOME ... i will show you a snipet of the build.xml file

<project name="AmpEP" default="build">

<property environment="env"/>
<property name="jboss_home" value="${env.JBOSS_HOME}" />
<property name="sun_jdk_root" value="${env.JAVA_HOME}"/>
<target name="init">
<condition property="jboss_home_set">
<available file="${jboss_home}" />
<condition property="java_home_set">
<available file="${sun_jdk_root}" />
<fail unless="jboss_home_set" message="Please set JBOSS_HOME to a valid location in your environment"/>
<fail unless="java_home_set" message="Please set JAVA_HOME to a valid location in your environment"/>

<property name="dist" location="dist"/>
<property name="ear" location="ear"/>
<property name="extlib" location="lib"/>
<property name="Build-status" value="Development"/>
<property name="exploded" location="ampep-exploded"/>

thank you ani ...
Rob Spoor

Joined: Oct 27, 2005
Posts: 20136

Moving to our Ant / build tools forum.

How To Ask Questions How To Answer Questions
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

As a start yes you'll need to change the various Jboss values to glassfish.

Actually a slightly better solution would be to pass in which application server you were targeting as a -D parameter on the command line (or read from a properties file). That way you could have both the Jboss and the glassfish configuration and simply call the one you wanted.

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
anas ibraheem

Joined: Oct 01, 2010
Posts: 9
thank you martijn

i think this would be a perfect solution .. i will try it and get back to you .

I agree. Here's the link:
subject: Ant tool and build.xml
It's not a secret anymore!