nbproject/ant-deploy.xml

Wed, 29 Mar 2017 16:06:22 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 29 Mar 2017 16:06:22 +0200
changeset 1
34241be7db73
parent 0
ad22b29e3a40
child 3
acf54d3fa1d1
permissions
-rw-r--r--

adds HomeServerlet and Resource Bundle

0
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 <?xml version="1.0" encoding="UTF-8"?>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 <project default="-deploy-ant" basedir=".">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 <target name="-init-cl-deployment-env" if="deploy.ant.enabled">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 <property file="${deploy.ant.properties.file}" />
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 <available file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" property="sun.web.present"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 <available file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" property="glassfish.web.present"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 <available file="${deploy.ant.resource.dir}" property="has.setup"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 <tempfile prefix="gfv3" property="gfv3.password.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 <echo message="AS_ADMIN_PASSWORD=${gfv3.password}" file="${gfv3.password.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 <target name="-parse-sun-web" depends="-init-cl-deployment-env" if="sun.web.present">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 <tempfile prefix="gfv3" property="temp.sun.web" destdir="${java.io.tmpdir}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 <copy file="${deploy.ant.docbase.dir}/WEB-INF/sun-web.xml" tofile="${temp.sun.web}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 <!-- The doctype triggers resolution which can fail -->
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 <replace file="${temp.sun.web}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 </replace>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 <replace file="${temp.sun.web}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 <replacetoken><![CDATA[<sun-web-app]]></replacetoken>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 <replacevalue><![CDATA[--> <sun-web-app]]></replacevalue>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 </replace>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 <xmlproperty file="${temp.sun.web}" validate="false">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 </xmlproperty>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 <delete file="${temp.sun.web}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 <condition property="deploy.ant.client.url" value="${gfv3.url}${sun-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 <isset property="sun-web-app.context-root"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 </condition>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 <condition property="deploy.context.root.argument" value="&amp;contextroot=${sun-web-app.context-root}" else="/${ant.project.name}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 <isset property="sun-web-app.context-root"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 </condition>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 <target name="-parse-glassfish-web" depends="-init-cl-deployment-env" if="glassfish.web.present">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 <tempfile prefix="gfv3" property="temp.gf.web" destdir="${java.io.tmpdir}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 <copy file="${deploy.ant.docbase.dir}/WEB-INF/glassfish-web.xml" tofile="${temp.gf.web}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 <!-- The doctype triggers resolution which can fail -->
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 <replace file="${temp.gf.web}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 <replacetoken><![CDATA[<!DOCTYPE]]></replacetoken>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 <replacevalue><![CDATA[<!-- <!DOCTYPE]]></replacevalue>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 </replace>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 <replace file="${temp.gf.web}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 <replacetoken><![CDATA[<glassfish-web-app]]></replacetoken>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 <replacevalue><![CDATA[--> <glassfish-web-app]]></replacevalue>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 </replace>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 <xmlproperty file="${temp.gf.web}" validate="false">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 </xmlproperty>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 <delete file="${temp.gf.web}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 <condition property="deploy.ant.client.url" value="${gfv3.url}${glassfish-web-app.context-root}" else="${gfv3.url}/${ant.project.name}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 <isset property="glassfish-web-app.context-root"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 </condition>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 <condition property="deploy.context.root.argument" value="&amp;contextroot=${glassfish-web-app.context-root}" else="/${ant.project.name}">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 <isset property="glassfish-web-app.context-root"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 </condition>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 <target name="-no-parse-sun-web" depends="-init-cl-deployment-env" unless="sun.web.present">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 <property name="deploy.context.root.argument" value=""/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 <target name="-add-resources" depends="-init-cl-deployment-env" if="has.setup">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60 <tempfile prefix="gfv3" property="gfv3.resources.dir" destdir="${java.io.tmpdir}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 <mkdir dir="${gfv3.resources.dir}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 <mkdir dir="${gfv3.resources.dir}/META-INF"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 <copy todir="${gfv3.resources.dir}/META-INF">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 <fileset dir="${deploy.ant.resource.dir}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 </copy>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 <jar destfile="${deploy.ant.archive}" update="true">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 <fileset dir="${gfv3.resources.dir}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 </jar>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 <delete dir="${gfv3.resources.dir}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 <target name="-deploy-ant" depends="-parse-glassfish-web, -parse-sun-web, -no-parse-sun-web,-add-resources" if="deploy.ant.enabled">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 <antcall target="-deploy-without-pw"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 <antcall target="-deploy-with-pw"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 <target name="-deploy-without-pw" unless="gfv3.password">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 <echo message="Deploying ${deploy.ant.archive}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 <get src="${gfv3.admin.url}/__asadmin/deploy?path=${full.deploy.ant.archive}${deploy.context.root.argument}&amp;force=true&amp;name=${ant.project.name}"
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 dest="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 <delete file="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 <target name="-deploy-with-pw" if="gfv3.password">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 <echo message="Deploying ${deploy.ant.archive}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 <property name="full.deploy.ant.archive" location="${deploy.ant.archive}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 <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}"
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 dest="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 <delete file="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 <target name="-undeploy-ant" depends="-init-cl-deployment-env" if="deploy.ant.enabled">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 <antcall target="-undeploy-without-pw"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 <antcall target="-undeploy-with-pw"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 <target name="-undeploy-without-pw" unless="gfv3.password">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 <echo message="Undeploying ${deploy.ant.archive}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 <get src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 dest="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 <delete file="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 <target name="-undeploy-with-pw" if="gfv3.password">
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 <echo message="Undeploying ${deploy.ant.archive}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 <tempfile prefix="gfv3" property="gfv3.results.file" destdir="${java.io.tmpdir}"/> <!-- do not forget to delete this! -->
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
107 <get username="${gfv3.username}" password="${gfv3.password}" src="${gfv3.admin.url}/__asadmin/undeploy?name=${ant.project.name}"
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 dest="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 <delete file="${gfv3.results.file}"/>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110 </target>
ad22b29e3a40 project initialization
Mike Becker <universe@uap-core.de>
parents:
diff changeset
111 </project>

mercurial