views:

676

answers:

3

I'm having a bit of a problem building a Java Enterprise Edition web application on Mac OS X 10.6.2 using Ant 1.7.1, Glassfish v3 and Java EE 6.

The problem is that the build process does not find the Java EE libraries which fair enough as I don't think Apple supply them with the default Java installation but I know they exist in the Glassfish distribution.

Which jars are the correct ones to build against (I'm assuming javaee.jar is a general jar which references all the other needed jars) and what should I be putting in my ant build.xml file?

Any help is very much appreciated.

A: 

I would encourage you to get and use NetBeans or GlassFish Tools Bundle For Eclipse to start working with Java EE 6 and GlassFish v3... (read my profile to find out why).

If you are determined to avoid using either of these IDEs, then I would recommend that you download the Java EE 6 SDK, to get started. The SDK includes a number of different samples that can be built and deployed using Ant. (Use -verbose to learn the 'secrets')

vkraemer
I'd love to use NetBeans more but I can't stand not understanding what is going on under the surface. Plus if something does not work correctly I would have no idea how to fix it.The best method in my opinion when dealing with things like this is to do it yourself and then move on to an IDE when you know how to fix any potential problems that may occur.
Simon
+2  A: 

You need to have the javaee.jar in your ant classpath, but be aware: do not copy the javaee.jar to the webapp (WEB-INF/lib folder)!

Arne Burmeister
Thanks, that did it after spending more time figuring out the Ant documentation.
Simon
A: 

I have tried to install the Java EE 6 SDK on my Mac OS X Snow Leopard but i got this error message:

Using the user defined JAVA_HOME : /usr Entering setup... Unable to find a $JAVA_HOME at "/usr", continuing with system-provided Java... SwixML
1.5 (#144) SEVERE:  Expression NOME_DO_PRODUTO is undefined on line 86, column 289 in /templates/components.ftl. SEVERE: Erro fatal Erro fatal Argumentos=[-p, Default-Product-ID=glassfish, -p, Pkg-Format=zip, -p, Logs-Location=/tmp, -p, Platform-Plugin-Path=/tmp/install.032310154340/install/lib/platforms,
-p, Provider-Path=/tmp/install.032310154340/install/lib/providers,
-p, Answer-Files=,file:///tmp/install.032310154340/install.properties,
-p, Log-Level=INFO, -p, Media-Location=file:///tmp/install.032310154340/install/metadata/,
-p, Installable-Unit-Path=file:///tmp/install.032310154340/Product/] : Inicializando Orchestrator Causado por: Erro ao iniciar o assistente Causado por: Erro ao renderizar SWIXML Quadro=content area Causado por: Erro ao processar modelo swimxl Causado por: Expression NOME_DO_PRODUTO is undefined on line 86, column 289 in /templates/components.ftl.

Does any one know a solution?

Thanks

Thiago Diniz
You should add this as a new question.
Pool