-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
41 lines (36 loc) · 1.28 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
<?xml version="1.0"?>
<project name="default" basedir="." default="package">
<property environment="env" />
<property name="artifactId" value="backups" />
<property name="version" value="3.4" />
<property name="mainClass" value="com.imranzahid.backup.BackupMain" />
<property name="jarfile" value="${artifactId}-${version}.jar" />
<property name="targetdir" value="target" />
<path id="runtime.classpath">
<fileset dir="${targetdir}/libs" includes="*.jar" />
</path>
<pathconvert property="manifest.classpath" pathsep=" ">
<path refid="runtime.classpath"/>
<mapper>
<chainedmapper>
<flattenmapper/>
<globmapper from="*.jar" to="libs/*.jar"/>
</chainedmapper>
</mapper>
</pathconvert>
<target name="clean">
<delete file="${targetdir}/${jarfile}" failonerror="true" />
</target>
<target name="package" depends="clean">
<jar destfile="${targetdir}/${jarfile}" basedir="${targetdir}/classes">
<manifest>
<attribute name="Built-By" value="${user.name}" />
<attribute name="Main-Class" value="${mainClass}" />
<attribute name="Class-Path" value="${manifest.classpath}" />
</manifest>
</jar>
</target>
<target name="test">
<echo message="${manifest.classpath}" />
</target>
</project>