users@glassfish.java.net

Re: sun-appserv-update fails

From: Gerald Holl <gerald_at_holl.co.at>
Date: Wed, 28 Nov 2007 08:22:34 +0100

Jane Young wrote:
> Hi Gerald,

Hi Jane,

> In your build.xml file, do you have a task that creates the app.ear
> archive?

Yes, I do.

Full build.xml:
<project name="app">
   <target name="deploy" depends="packageAll">
     <sun-appserv-deploy file="app.ear" passwordfile="passwd.txt"
       upload="false"/>
   </target>
   <target name="update" depends="packageAll">
     <sun-appserv-update domain="app" file="app.ear" />
   </target>
<!-- app.ear includes lib/entities.jar,sessions.jar,app.war -->
   <target name="packageAll" depends="package">
     <jar destfile="app.ear">
       <fileset dir="." includes="*.jar,*.war"/>
       <fileset dir=".">
         <include name="**/entities.jar"/>
       </fileset>
     </jar>
   </target>
   <target name="package" depends="createEntitiesJar,createSessionsJar">
     <war destfile="app.war" webxml="web/web.xml">
       <fileset dir="web/jsp"/>
       <fileset dir="images"/>
       <lib dir="lib"/>
       <classes dir="bin"/>
       <webinf dir="web"/>
     </war>
   </target>
   <target name="createEntitiesJar">
     <jar destfile="lib/entities.jar" basedir="bin"
       includes="beans/entity/**">
       <metainf dir="bin/META-INF/"/>
     </jar>
   </target>
   <target name="createSessionsJar">
     <jar destfile="sessions.jar" basedir="bin"
       includes="beans/service/**">
     </jar>
   </target>
</project>


> The sun-appserv-update task is used to expedite your deployement by
> copying the files that are modified in your development environment.
> This task can only be executed on the same machine as the Application
> Server.

The appserver runs on the same machine as I'm developing.

If I change a file (e. g. a .jsp file), the .war and the .ear files are
updated but the changes are not reflected on the server.
The update task should be aware which files have changed, but the update
is not working.
I'm still getting the folllowing output:
[sun-appserv-update] Warning: module app.ear does not exist in server
repository.
[sun-appserv-update] All files are up-to-date.

cheers,
Gerald