Where sun-appserv- ant.jar for Glassfish v3

Where is sun-appserv- ant.jar in Glassfish v3

I created a small EJB sample project, and I want to use ant to deploy the application in Glassfish v3.

I spent a lot of time on Google trying to achieve this, and all ant samples seem to reference a jar file called "sun-appserv-ant.jar" which should be in the application server installation modules directory, however I cannot find it nowhere and I can not find the reason for this, or if there is even an alternative to ant.

thank

+3
source share
3 answers

The sun-appserv- ant.xml file was not migrated using v3.

You are not completely stuck.

Ant exec, asadmin.

, bp-, , Java EE 6 SDK.

bp-, Glassfish-.

+5

glassfish-ant-tasks GlassFish

+3

, V3.x ant

- , . , Java Java.

, , ant , Sun (Oracle):

  • Glassfish, glassfish-ant-tasks.

  • * glassfish_dir */lib/ ant/ant-tasks.jar.

  • as-ant-init build.xml

    <target name="as-ant-init">
        <taskdef name="sun-appserv-deploy"
            classname="org.glassfish.ant.tasks.DeployTask"
            classpath="${build-lib}/ant-tasks.jar" />
        <taskdef name="sun-appserv-undeploy"
            classname="org.glassfish.ant.tasks.UndeployTask"
            classpath="${build-lib}/ant-tasks.jar" />
        <taskdef name="sun-appserv-component"
            classname="org.glassfish.ant.tasks.ComponentTask"
            classpath="${build-lib}/ant-tasks.jar" />
        <taskdef name="sun-appserv-admin"
            classname="org.glassfish.ant.tasks.AdminTask"
            classpath="${build-lib}/ant-tasks.jar" />
        <taskdef name="sun-appserv-redeploy"
            classname="org.glassfish.ant.tasks.RedeployTask"
            classpath="${build-lib}/ant-tasks.jar" />
        <taskdef name="sun-appserv-start-server"
            classname="org.glassfish.ant.tasks.StartServerTask"
            classpath="${build-lib}/ant-tasks.jar" />
        <taskdef name="sun-appserv-stop-server"
            classname="org.glassfish.ant.tasks.StopServerTask"
            classpath="${build-lib}/ant-tasks.jar" />
    </target>
    
  • . , , EXCEPT

    . <server>, .

    B. All attributes that would be bound to <server>in the old version of the API are now bound directly to the containing element, for example <sun-appserv-deploy>, for example:

    <target name="deploy">
        <sun-appserv-deploy
            user="${glassfish.admin-user}"
            passwordfile="${glassfish.passwordfile}}"
            host="${glassfish.host}"
            port="${glassfish.admin-port}"
            installDir="${asinstalldir}"
            upload="true" >
    
            <component
                file="${dist.warfile}"
                name="My application"
                contextroot="${glassfish.context-root}" />
        </sun-appserv-deploy>
    </target>
    
+1
source

Source: https://habr.com/ru/post/1728319/


All Articles