-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
143 lines (124 loc) · 6.66 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<project name="distro.build" default="build" basedir="./" xmlns:antcontrib="antlib:net.sf.antcontrib">
<loadproperties srcfile="build.properties"/>
<import file="${cfdistro.build.file}"/>
<path id="debrepo.lib.path">
<fileset dir="${debrepo.lib.dir}">
<include name="*.jar" />
</fileset>
</path>
<target name="build" depends="debrepo.jar">
</target>
<target name="debrepo.compile" depends="get.deps">
<delete dir="${debrepo.bin.dir}"/>
<mkdir dir="${debrepo.bin.dir}"/>
<javac-ecj srcdir="${debrepo.src.dir}/" destdir="${debrepo.bin.dir}"
classpath="${toString:debrepo.lib.path}" compliance="1.7"/>
</target>
<target name="debrepo.jar" depends="debrepo.compile">
<copy todir="${debrepo.bin.dir}debrepo/" file="${debrepo.src.dir}/version.properties">
<filterchain><expandproperties/><deletecharacters chars="\n"/><trim/><ignoreblank/></filterchain>
</copy>
<delete file="${debrepo.jar.file}"/>
<jar destfile="${debrepo.jar.file}" duplicate="preserve"
basedir="${debrepo.bin.dir}"
includes="**/*.class, **/*.png, **META-INF/services/*, **/*.dtd, **/*.xsd, **/META-INF/INDEX.LIST, **/*.properties, **/*.xml,"
filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="debrepo.Runner" />
<attribute name="Class-Path" value="./${debrepo.jar}" />
</manifest>
<zipgroupfileset dir="${debrepo.lib.dir}" includes="**/*.jar" excludes="**/ant*"/>
</jar>
</target>
<target name="undebTest" depends="debrepo.mvn">
<property name="deb.dir" value="${dist.dir}/debs" />
<property name="deb.repo" value="${dist.dir}/repo" />
<taskdef-dependency name="undeb" classname="debrepo.ant.UnDebTask" artifactId="debrepo" groupId="org.cfmlprojects" version="${debrepo.version}" />
<ant-set-log-level level="3"/>
<delete dir="${dist.dir}/undebbed" />
<!--
<undeb debFile="${deb.dir}/debrepo_${debrepo.version}-1_all.deb" dest="${dist.dir}/undebbed" />
-->
<undeb debFile="${dist.dir}/applabels.deb" dest="${dist.dir}/undebbed" />
</target>
<target name="test" depends="debrepo.mvn">
<property name="deb.dir" value="${dist.dir}/debs" />
<property name="deb.repo" value="${dist.dir}/repo" />
<delete dir="${deb.dir}"/>
<delete dir="${deb.repo}"/>
<mkdir dir="${deb.repo}"/>
<mkdir dir="${deb.dir}"/>
<property name="debrepo.sign.key.passphrase" value="inconceivable" />
<property name="debrepo.sign.key.id" value="D0B067EC" />
<property name="debrepo.sign.keyring" location="${tests.dir}/resources/secring.gpg" />
<taskdef-dependency name="deb" classname="debrepo.ant.DebTask" artifactId="debrepo" groupId="org.cfmlprojects" version="${debrepo.version}" />
<ant-set-log-level level="3"/>
<deb
todir="${deb.dir}"
package="railo-application"
section="web"
depends="java-common"
signpackage="true"
key="${debrepo.sign.key.id}" passphrase="${debrepo.sign.key.passphrase}"
keyring="${debrepo.sign.keyring}">
<version upstream="${debrepo.version}"/>
<maintainer name="Packager Name" email="packager@email.addy"/>
<description synopsis="This is the summary">This is the long description and it can go for several lines and whatnot</description>
<tarfileset file="${debrepo.jar.file}" prefix="usr/local/bin" filemode="755"/>
</deb>
<deb-create
todir="${deb.dir}"
package="debrepo"
section="web"
depends="java-common"
version="${debrepo.version}"
maintainer="Maintainer maintainer@host.org"
key="${debrepo.sign.key.id}"
passphrase="${debrepo.sign.key.passphrase}"
keyring="${debrepo.sign.keyring}"
description="create deb repo${line.separator} Version: ${debrepo.version}.${line.separator} note how consecutive lines${line.separator} begin with a space">
<tarfileset file="${debrepo.jar.file}" prefix="usr/local/bin" filemode="755"/>
</deb-create>
<jdeb destfile="${deb.dir}/debrepo-keyring_${debrepo.version}-1_all.deb" control="${tests.dir}/resources/debrepo-keyring/debian" verbose="true"
key="${debrepo.sign.key.id}" passphrase="${debrepo.sign.key.passphrase}" keyring="${debrepo.sign.keyring}">
<tarfileset dir="${tests.dir}/resources/debrepo-keyring/keyrings" prefix="usr/share/keyrings" filemode="644"/>
<tarfileset file="${tests.dir}/resources/debrepo-keyring/README" prefix="usr/share/doc/debrepo-keyring" filemode="644"/>
</jdeb>
<deb
todir="${deb.dir}"
control="${tests.dir}/resources/debrepo-keyring/debian"
signpackage="true"
key="${debrepo.sign.key.id}" passphrase="${debrepo.sign.key.passphrase}"
keyring="${debrepo.sign.keyring}"/>
<echo message="Updating apt (deb) repo in ${deb.repo}"/>
<taskdef-dependency name="debrepo" classname="debrepo.ant.DebRepoTask" artifactId="debrepo" groupId="org.cfmlprojects" version="${debrepo.version}" />
<debrepo debsDir="${deb.dir}" repoDir="${temp.dir}/deleteme" verbose="true"
key="" passphrase="" keyring=""
label="Debrepo" description="Debrepo Repo"
/>
<debrepo debsDir="${deb.dir}" repoDir="${deb.repo}" verbose="true"
key="${debrepo.sign.key.id}" passphrase="${debrepo.sign.key.passphrase}" keyring="${debrepo.sign.keyring}"
label="Debrepo" description="Debrepo Repo"
/>
</target>
<target name="debrepo.mvn" depends="debrepo.jar">
<pom-and-deploy pomid="debrepo.pom" packaging="jar" artifact="${debrepo.jar.file}"
groupId="org.cfmlprojects" artifactId="debrepo" version="${debrepo.version}" name="debrepo"/>
</target>
<target name="get.deps">
<delete dir="${debrepo.lib.dir}"/>
<mvn-repo id="jboss.repo" url="http://repository.jboss.org/nexus/content/repositories/releases" />
<dependency groupId="org.apache.ant" artifactId="ant" version="1.9.4" unzip="false" type="jar" dest="${debrepo.lib.dir}"/>
<dependency groupId="org.apache.commons" artifactId="commons-compress" version="1.9" unzip="false" type="jar" dest="${debrepo.lib.dir}"/>
<dependency groupId="org.vafer" artifactId="jdeb" version="1.6" unzip="false" type="jar" dest="${debrepo.lib.dir}">
<exclusions>
<exclusion groupId="commons-io" artifactId="commons-io"/>
<exclusion groupId="org.apache.commons" artifactId="commons-compress"/>
<exclusion groupId="org.apache.maven" artifactId="maven-core"/>
<exclusion groupId="org.apache.maven" artifactId="maven-plugin-api"/>
<exclusion groupId="org.apache.ant" artifactId="ant"/>
<exclusion groupId="org.bouncycastle" artifactId="bcpg-jdk15on"/>
</exclusions>
</dependency>
</target>
</project>