[program-java] Re: Glass Fish...

  • From: Anna Giller <anna.giller@xxxxxxxxxxxxxxx>
  • To: program-java@xxxxxxxxxxxxx
  • Date: Thu, 22 Jan 2009 15:58:52 -0500

Adrian,

I'm a very beginner in Java, so the words like ANT makes me scared.
I've recently learned what WAR file is, that's why feel more comfortable
with it.
<smile>

Anna

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Adrian Beech
Sent: Thursday, January 22, 2009 3:42 PM
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Glass Fish...

Yikes Anna... you wouldn't say that if you had an application containing
several hundred classes, libraries, etc!  Using a tool like ANT for example
is much quicker, cleaner and based on the build script will turn out
consistent results each time during the development life cycle.

...manually building a WAR, shudder, I get get cold swets just thinking of
it!

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Anna Giller
Sent: Friday, 23 January 2009 3:22 AM
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Glass Fish...

Jim:

Creating .WAR files manually seems much easier.

Thanks,
Anna


-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Corbett, James
Sent: Thursday, January 22, 2009 11:49 AM
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Glass Fish...

Anna:

I use WebLogic as my server and due to my ANT configuration I don't have
to use Eclipse to compile.... I just run a build.cmd file that I created
which for all intentional purposes is just a batch file. With in said
batch I run the Ant build with several parameters and then copy said
file to my deployment folder with in WL via the post.bat at the end of
my ant.bat. So to answer you, no Eclipse doesn't move my file by
default.

.

Here's an example:

...this is the FZFR.cmd file contents....


c:
cd c:\fzfr\FZFR\I*
CMD /c c:\fzfr\FZFR\Implementation\Build.cmd build 

And here is the contents of my build.cmd file

:::
::: Build project using Ant
:::
:::
@rem Set Ant related Environment Variables
@call ./setenv.cmd
::
@rem Execute the Ant build
@call %ANT_HOME%\bin\ant.bat -version
@call %ANT_HOME%\bin\ant.bat %1
::
@pause

And finally my ant.bat file

@echo off

REM  Copyright 2001,2004 The Apache Software Foundation
REM
REM  Licensed under the Apache License, Version 2.0 (the "License");
REM  you may not use this file except in compliance with the License.
REM  You may obtain a copy of the License at
REM
REM      http://www.apache.org/licenses/LICENSE-2.0
REM
REM  Unless required by applicable law or agreed to in writing, software
REM  distributed under the License is distributed on an "AS IS" BASIS,
REM  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.
REM  See the License for the specific language governing permissions and
REM  limitations under the License.

if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"

if "%OS%"=="Windows_NT" @setlocal

rem %~dp0 is expanded pathname of the current script under NT
set DEFAULT_ANT_HOME=%~dp0..

if "%ANT_HOME%"=="" set ANT_HOME=%DEFAULT_ANT_HOME%
set DEFAULT_ANT_HOME=

rem Slurp the command line arguments. This loop allows for an unlimited
number
rem of arguments (up to the command line limit, anyway).
set ANT_CMD_LINE_ARGS=%1
if ""%1""=="""" goto doneStart
shift
:setupArgs
if ""%1""=="""" goto doneStart
set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
shift
goto setupArgs
rem This label provides a place for the argument list loop to break out
rem and for NT handling to skip to.

:doneStart
rem find ANT_HOME if it does not exist due to either an invalid value
passed
rem by the user or the %0 problem on Windows 9x
if exist "%ANT_HOME%\lib\ant.jar" goto checkJava

rem check for ant in Program Files
if not exist "%ProgramFiles%\ant" goto checkSystemDrive
set ANT_HOME=%ProgramFiles%\ant
goto checkJava

:checkSystemDrive
rem check for ant in root directory of system drive
if not exist %SystemDrive%\ant\lib\ant.jar goto checkCDrive
set ANT_HOME=%SystemDrive%\ant
goto checkJava

:checkCDrive
rem check for ant in C:\ant for Win9X users
if not exist C:\ant\lib\ant.jar goto noAntHome
set ANT_HOME=C:\ant
goto checkJava

:noAntHome
echo ANT_HOME is set incorrectly or ant could not be located. Please set
ANT_HOME.
goto end

:checkJava
set _JAVACMD=%JAVACMD%

if "%JAVA_HOME%" == "" goto noJavaHome
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java.exe
goto checkJikes

:noJavaHome
if "%_JAVACMD%" == "" set _JAVACMD=java.exe

:checkJikes
if not "%JIKESPATH%"=="" goto runAntWithJikes

:runAnt
if not "%CLASSPATH%"=="" goto runAntWithClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%
%ANT_CMD_LINE_ARGS%
goto end

:runAntWithClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" org.apache.tools.ant.launch.Launcher %ANT_ARGS%
-lib "%CLASSPATH%" %ANT_CMD_LINE_ARGS%
goto end

:runAntWithJikes
if not "%CLASSPATH%"=="" goto runAntWithJikesAndClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS% %ANT_CMD_LINE_ARGS%
goto end

:runAntWithJikesAndClasspath
"%_JAVACMD%" %ANT_OPTS% -classpath "%ANT_HOME%\lib\ant-launcher.jar"
"-Dant.home=%ANT_HOME%" "-Djikes.class.path=%JIKESPATH%"
org.apache.tools.ant.launch.Launcher %ANT_ARGS%  -lib "%CLASSPATH%"
%ANT_CMD_LINE_ARGS%
goto end

:end
set _JAVACMD=
set ANT_CMD_LINE_ARGS=

if "%OS%"=="Windows_NT" @endlocal

:mainEnd
if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"

...and the post.bat file does the copy to my deploy.

Jim
-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Anna Giller
Sent: January 22, 2009 11:11
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Glass Fish...

Jim:

It will be in that directory only if I manually export my project as a
WAR file and then move that WAR file to that directory.
Is your version of Eclipse does it automatically for you?

Thanks,
Anna

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Corbett, James
Sent: Thursday, January 22, 2009 11:05 AM
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Glass Fish...

Anna:

Hmmmm, I know that this is where you or due to a default setting place
the .war file.... Is the war file in question with in that directory?

Jim  

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Anna Giller
Sent: January 22, 2009 11:00
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Glass Fish...

Jim:

It's a directory where I can manually deploy my .WAR files.
I had a problem with the Eclipse not creating .WAR files, but it's clear
now with the option "export".

Thanks,
Anna

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Corbett, James
Sent: Thursday, January 22, 2009 10:54 AM
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Re: Glass Fish...

Anna:

Look in the following dir:

install-dir/domains/domain1/autodeploy/. 

Where "Install-dir" is the directory where you have installed GF... This
is where typically your .war / .ear files are deployed to.

J.

-----Original Message-----
From: program-java-bounce@xxxxxxxxxxxxx
[mailto:program-java-bounce@xxxxxxxxxxxxx] On Behalf Of Corbett, James
Sent: January 22, 2009 10:47
To: program-java@xxxxxxxxxxxxx
Subject: [program-java] Glass Fish...

Anna:

Is GF running on your machine or another server?

j

James M. Corbett

A / Technical Specialist
GST/HST Micros | Micros de la TPS/TVH

(613) 941-1338












__________ NOD32 3790 (20090122) Information __________

This message was checked by NOD32 antivirus system.
http://www.eset.com





Other related posts: