-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.xml
85 lines (71 loc) · 3.38 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
<?xml version="1.0"?>
<project name="Alfresco Disable Enable Download Action" default="dist">
<property name="project.dir" value="."/>
<property name="build.dir" value="${project.dir}/build"/>
<property name="config.dir" value="${project.dir}/config"/>
<property name="config.share.dir" value="${config.dir}/share"/>
<property name="config.repo.dir" value="${config.dir}/repository"/>
<property name="jar.file" value="${build.dir}/lib/AlfrescoDisableEnableDownloadAction.jar" />
<property name="amp.dir" value="${build.dir}/dist" />
<property name="amp.share.file" value="${amp.dir}/AlfrescoDisableEnableDownloadActionShare.amp"/>
<property name="amp.repo.file" value="${amp.dir}/AlfrescoDisableEnableDownloadActionRepo.amp"/>
<path id="class.path">
<dirset dir="${build.dir}/classes"/>
<fileset dir="lib/" includes="*.jar"/>
<fileset dir="lib/deploy" includes="*.jar"/>
<fileset dir="lib/compile" includes="*.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="init">
<mkdir dir="${build.dir}" />
<mkdir dir="${build.dir}/lib" />
<mkdir dir="${build.dir}/classes" />
<mkdir dir="${build.dir}/test-classes" />
<mkdir dir="${amp.dir}" />
</target>
<target name="compile" depends="init">
<javac classpathref="class.path"
srcdir="${project.dir}/src/main/java"
destdir="${build.dir}/classes"
target="1.6" source="1.6" debug="true" />
</target>
<target name="package-jar" depends="init,compile">
<jar destfile="${jar.file}" >
<fileset dir="${build.dir}/classes"
excludes="**/custom*,**/*Test*" includes="**/*.class" />
</jar>
<copy todir="${project.dir}/build/lib">
<fileset dir="${project.dir}/lib/deploy" includes="*.jar" />
</copy>
</target>
<target name="package-amps" depends="init,package-jar">
<zip destfile="${amp.repo.file}" >
<fileset dir="${project.dir}/config/repository/alfresco/module/net.codingfreaks.opensource.overridedownloadaction"
includes="module.properties" />
<zipfileset dir="${project.dir}/config/repository"
includes="**" excludes="**/module.properties"
prefix="config" />
</zip>
<zip destfile="${amp.share.file}" >
<fileset dir="${project.dir}/build" includes="lib/*.jar" />
<fileset dir="${project.dir}/config/share/alfresco/module/net.codingfreaks.opensource.overridedownloadaction"
includes="module.properties" />
<zipfileset dir="${project.dir}/config/share"
excludes="**/module.properties,file-mapping.properties"
includes="**" prefix="config" />
<zipfileset dir="${project.dir}/config/share/"
includes="file-mapping.properties" prefix="" />
<zipfileset dir="${project.dir}/src/main/web"
includes="**" prefix="web" />
</zip>
</target>
<target name="dist" depends="package-amps">
<echo message="AMP build is completed!" />
<echo message="You should now install the AMPs into Alfresco Repo and Share" />
<echo message=""/>
<echo message="Share: ${amp.share.file}"/>
<echo message="Alfresco: ${amp.repo.file}"/>
</target>
</project>