Alex Rivera | Logout

Best way to deploy on Glassfish V3

Asked 2010-09-03T12:48:28.333
18

What is the best way to deploy my web project (or ear project) to remote server and glassfish?

How to use ant-deploy.xml and build-impl.xml that netbeans create for this purpose?

Using autodeploy folder and separately adding sun-resources.xml to the GF Or Using ant and....

Would you please explain me step by step?

Regards

Edit
Report

1 Answer

5

More os independent way to deploy app:

<presetdef name="asadmin">
  <java jar="${glassfish.home}/modules/admin-cli.jar" fork="true" jvm="${java.home}/bin/java" >
    <arg line="--port ${glassfish.admin.port}" />
  </java>
</presetdef>
<target name="deploy">
  <asadmin failonerror="true">
    <arg value="deploy" />
    <arg value="--force=true" />
    <arg value="${ear.file}" />
  </asadmin>
</target>

you colud use asadmin preset with any asadmin tasks...

answered 2011-09-04T13:54:18.227

Your Answer