users@glassfish.java.net

Re: Need help deploying to Glassfish cluster using netbeans generated ant

From: <glassfish_at_javadesktop.org>
Date: Fri, 18 Apr 2008 10:26:40 PDT

First off, let me apologize for not seeing this thread earlier... If I had, I might have been able to give you better news.

Yes, you can tweak the generated ant script... be fore warned that your tweak will get removed when you change server targets for the project, though. [keep a backup of the change in your project]

You should be able to change -deploy-ant to support deployment to a cluster and/or instance... not just to the "DAS"...

here is what I would change it to...

    <target name="-deploy-ant" depends="-parse-sun-web,-add-resources" if="deploy.ant.enabled">
        <echo message="Deploying ${deploy.ant.archive}"/>
        <taskdef name="sun-appserv-deploy" classname="org.apache.tools.ant.taskdefs.optional.sun.appserv.DeployTask"
                 classpath="${sjsas.root}/lib/sun-appserv-ant.jar" />
        <property name="deploy.ant.target" value="server"/>
        <sun-appserv-deploy user="${sjsas.username}"
                passwordfile="${sjsas.password.file}"
                host="${sjsas.host}" port="${sjsas.port}"
                file="${deploy.ant.archive}" asinstalldir="${sjsas.root}"
                target="${deploy.ant.target}"/>
        <delete file="${sjsas.password.file}"/>
    </target>

This will allow you to deploy to a different target, by defining deploy.ant.target on the ant command-line.

I will get this change integrated into the trunk of NetBeans. You won't see it in the 6.1 release... which I why I wish I had seen this message sooner. If I had seen this, i would have added this feature to 6.1.

vbk
[Message sent by forum member 'vbkraemer' (vbkraemer)]

http://forums.java.net/jive/thread.jspa?messageID=269973