Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Ant tool and build.xml" Watch "Ant tool and build.xml" New topic
Author

Ant tool and build.xml

anas ibraheem
Greenhorn

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
Greenhorn

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
Greenhorn

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>
<condition property="java_home_set">
<available file="${sun_jdk_root}" />
</condition>
<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"/>
</target>

<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
Sheriff

Joined: Oct 27, 2005
Posts: 19759
    
  20

Moving to our Ant / build tools forum.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

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
Greenhorn

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 .

thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Ant tool and build.xml