-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuild.xml
91 lines (81 loc) · 4.07 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0"?>
<!--
=======================================================
* Alfresco Amazon S3 content store plugin build script
* Copyright © 2014. Abhinav Kumar Mishra.
* All rights reserved.
* Developed by Abhinav K Mishra
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
=======================================================
-->
<project name="Alfresco Cloud Store Build Project" default="build-amp" basedir=".">
<property name="alfresco.install.dir" value="C:/Alfresco"/>
<property name="alfresco.deploy.dir" value="${alfresco.install.dir}/tomcat/webapps"/>
<property name="ref.lib" value="${basedir}\buildscript-lib"/>
<property name="project.dir" value="${basedir}"/>
<property name="build.dir" value="${project.dir}/appbuild"/>
<property name="config.dir" value="${project.dir}/config"/>
<property name="jar.file" value="${build.dir}/lib/alfresco-amazon-s3-contentstore.jar"/>
<property name="amp.file" value="${build.dir}/amp/alfresco-amazon-s3-contentstore.amp"/>
<property name="alfresco.war.file" value="C:/Alfresco/tomcat/webapps/alfresco.war"/>
<target name="-clean">
<delete dir="${build.dir}/amp"/>
<delete dir="${build.dir}/lib" />
<delete dir="${build.dir}/classes"/>
</target>
<target name="-init" depends="-clean">
<mkdir dir="${build.dir}/amp" />
<mkdir dir="${build.dir}/lib" />
<mkdir dir="${build.dir}/classes" />
</target>
<path id="class.path">
<dirset dir="${build.dir}" />
<fileset dir="${basedir}/lib" includes="**/*.jar"/>
<fileset dir="${ref.lib}" includes="**/*.jar"/>
</path>
<target name="-compile" depends="-init">
<javac debug="true" classpathref="class.path" srcdir="${project.dir}/src"
destdir="${build.dir}/classes" includeantruntime="true"/>
</target>
<target name="jar" depends="-compile" description="Package the Module in jar file." >
<mkdir dir="${build.dir}/classes/META-INF" />
<jar destfile="${jar.file}">
<fileset dir="${build.dir}/classes" includes="**/*.class, META-INF/*.*" />
</jar>
</target>
<target name="build-amp" depends="jar" description="Package the Module in amp file." >
<zip destfile="${amp.file}" >
<fileset dir="${build.dir}" includes="lib/*.jar" />
<fileset dir="${project.dir}" includes="config/**/*.*" excludes="**/module.properties" />
<fileset dir="${project.dir}/config/alfresco/module/cloudstore" includes="module.properties" />
<fileset dir="${project.dir}" includes="lib/*.jar"
excludes="lib/commons-logging-1.1.1.jar lib/commons-httpclient-3.1.jar" />
</zip>
</target>
<target name="deploy-war" depends="build-amp" description="Deploy the war file to alfresco webapps" >
<echo>Installing amp into war files..</echo>
<java dir="." fork="true"
classname="org.alfresco.repo.module.tool.ModuleManagementTool">
<classpath refid="class.path"/>
<arg line="install ${build.dir}/amp/ ${alfresco.war.file}
-directory -force"/>
</java>
<java dir="." fork="true"
classname="org.alfresco.repo.module.tool.ModuleManagementTool">
<classpath refid="class.path"/>
<arg line="list ${alfresco.war.file}"/>
</java>
<echo>Deployment has been completed..</echo>
</target>
</project>