-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
71 lines (59 loc) · 2.27 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!--
***
***
*** build.xml
***
*** Ant file for simple tasks for packaging and deploying Alfresco jar module in $ALF_HOME/shared/lib
***
***
***
-->
<project default="package">
<target name="init">
<!-- module name and version-->
<basename property="module_name" file="${user.dir}"/>
<!-- <property name="module_name" value="" /> -->
<property name="ver_num" value="-v1.0" />
<!-- alfresco local environment -->
<property name="alfresco_home" value="/opt/alfresco512" />
<property name="shared_lib" value="${alfresco_home}/tomcat/shared/lib" />
</target>
<target name="clean" depends="init">
<delete dir="./target" quiet="true"/>
</target>
<target name="jar" depends="init">
<mkdir dir="./target" />
<jar destfile="./target/${module_name}${ver_num}.jar"
basedir="."
includes="**/*.*"
excludes="build.xml,./target/**"
manifest="./META-INF/MANIFEST.MF"
/>
</target>
<target name="package" depends="init,clean,jar">
<echo message="Packaged jar in ./target/${module_name}${ver_num}.jar" />
<echo message="***********************************************************" />
</target>
<target name="deploy" depends="init,clean,jar,stop-alfresco,copy-to-shared-lib,start-alfresco" />
<target name="copy-to-shared-lib" depends="init" description="Copy to Shared Lib">
<echo message="Copy ./target/${module_name}${ver_num}.jar to ${shared_lib}" />
<echo message="***********************************************************" />
<copydir src="./target/" dest="${shared_lib}"/>
</target>
<target name="stop-alfresco" depends="init" description="Stop Local Alfresco">
<echo message="Stopping Alfresco ....." />
<echo message="***********************************************************" />
<exec executable="/bin/bash">
<arg value="${alfresco_home}/alfresco.sh"/>
<arg value="stop"/>
</exec>
</target>
<target name="start-alfresco" depends="init" description="Start Local Alfresco">
<echo message="Starting Alfresco ....." />
<echo message="***********************************************************" />
<exec executable="/bin/bash">
<arg value="${alfresco_home}/alfresco.sh"/>
<arg value="start"/>
</exec>
</target>
</project>