java/nekurak.net-ejb/nbproject/ant-deploy.xml
changeset 145 0efefbf5f8b6
parent 27 88f3012c60a2
child 186 b0f7d9ab4a07
     1.1 --- a/java/nekurak.net-ejb/nbproject/ant-deploy.xml	Thu Feb 11 08:52:50 2010 +0100
     1.2 +++ b/java/nekurak.net-ejb/nbproject/ant-deploy.xml	Sun Jun 20 14:46:47 2010 +0200
     1.3 @@ -24,7 +24,7 @@
     1.4          </xmlproperty>    
     1.5          <delete file="${temp.sun.web}"/>
     1.6          <property name="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}"/>
     1.7 -        <property name="deploy.context.root.argument" value="?contextroot=${sun-web-app.context-root}"/>
     1.8 +        <property name="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}"/>
     1.9      </target>
    1.10      <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
    1.11          <property name="deploy.context.root.argument" value=""/>
    1.12 @@ -43,18 +43,43 @@
    1.13          <delete dir="${gfv3.resources.dir}"/>
    1.14      </target>
    1.15      <target name="-deploy-ant" depends="-parse-sun-web,-no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
    1.16 +        <antcall target="-deploy-without-pw"/>
    1.17 +        <antcall target="-deploy-with-pw"/>
    1.18 +    </target>
    1.19 +
    1.20 +    <target name="-deploy-without-pw" unless="gfv3.password">
    1.21          <echo message="Deploying ${deploy.ant.archive}"/>
    1.22          <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    1.23          <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
    1.24 -        <get src="${gfv3.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}?force=true?name=${ant.project.name}"
    1.25 +        <get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
    1.26              dest="${gfv3.results.file}"/>
    1.27          <delete file="${gfv3.results.file}"/>    
    1.28      </target>
    1.29 +    <target name="-deploy-with-pw" if="gfv3.password">
    1.30 +        <echo message="Deploying ${deploy.ant.archive}"/>
    1.31 +        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    1.32 +        <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
    1.33 +        <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
    1.34 +            dest="${gfv3.results.file}"/>
    1.35 +        <delete file="${gfv3.results.file}"/>
    1.36 +    </target>
    1.37      <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
    1.38 +        <antcall target="-undeploy-without-pw"/>
    1.39 +        <antcall target="-undeploy-with-pw"/>
    1.40 +    </target>
    1.41 +
    1.42 +    <target name="-undeploy-without-pw" unless="gfv3.password">
    1.43          <echo message="Undeploying ${deploy.ant.archive}"/>
    1.44          <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    1.45 -        <get src="${gfv3.url}/__asadmin/undeploy?name=${ant.project.name}"
    1.46 +        <get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
    1.47              dest="${gfv3.results.file}"/>
    1.48          <delete file="${gfv3.results.file}"/>    
    1.49      </target>
    1.50 +    <target name="-undeploy-with-pw" if="gfv3.password">
    1.51 +        <echo message="Undeploying ${deploy.ant.archive}"/>
    1.52 +        <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/>  <!-- do not forget to delete this! -->
    1.53 +        <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
    1.54 +            dest="${gfv3.results.file}"/>
    1.55 +        <delete file="${gfv3.results.file}"/>
    1.56 +    </target>
    1.57  </project>