File plexus-archiver-build.xml of Package plexus-archiver
143
1
2
3
<project name="plexus-archiver" default="package" basedir=".">
4
5
<!-- ====================================================================== -->
6
<!-- Build environment properties -->
7
<!-- ====================================================================== -->
8
9
<property file="build.properties"/>
10
11
<property name="project.groupId" value="org.codehaus.plexus"/>
12
<property name="project.artifactId" value="plexus-archiver"/>
13
<property name="project.version" value="4.9.2"/>
14
15
<property name="compiler.release" value="8"/>
16
<property name="compiler.source" value="1.${compiler.release}"/>
17
<property name="compiler.target" value="${compiler.source}"/>
18
19
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
20
<property name="build.dir" value="target"/>
21
<property name="build.outputDir" value="${build.dir}/classes"/>
22
<property name="build.srcDir" value="src/main/java"/>
23
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
24
25
<!-- ====================================================================== -->
26
<!-- Defining classpaths -->
27
<!-- ====================================================================== -->
28
29
<path id="build.classpath">
30
<fileset dir="lib">
31
<include name="**/*"/>
32
</fileset>
33
</path>
34
35
<!-- ====================================================================== -->
36
<!-- Cleaning up target -->
37
<!-- ====================================================================== -->
38
39
<target name="clean" description="Clean the output directory">
40
<delete dir="${build.dir}"/>
41
</target>
42
43
<!-- ====================================================================== -->
44
<!-- Compilation target -->
45
<!-- ====================================================================== -->
46
47
<target name="compile" description="Compile the code">
48
<mkdir dir="${build.outputDir}"/>
49
<javac destdir="${build.outputDir}"
50
nowarn="false"
51
debug="true"
52
encoding="UTF-8"
53
optimize="false"
54
deprecation="true"
55
release="${compiler.release}"
56
target="${compiler.target}"
57
verbose="false"
58
fork="false"
59
source="${compiler.source}">
60
<src>
61
<pathelement location="${build.srcDir}"/>
62
</src>
63
<classpath refid="build.classpath"/>
64
</javac>
65
</target>
66
67
<!-- ====================================================================== -->
68
<!-- Sisu javax.inject.Named generation target -->
69
<!-- ====================================================================== -->
70
71
<target name="sisu"
72
depends="compile"
73
description="Generate javax.inject.Name index">
74
<sequential>
75
<java classname="org.eclipse.sisu.space.SisuIndex"
76
failonerror="true"
77
fork="true">
78
<classpath>
79
<path refid="build.classpath"/>
80
</classpath>
81
<arg value="${build.outputDir}"/>
82
</java>
83
<move todir="${build.outputDir}/META-INF">
84
<fileset dir="META-INF"/>
85
</move>
86
</sequential>
87
</target>
88
89
<!-- ====================================================================== -->
90
<!-- Javadoc target -->
91
<!-- ====================================================================== -->
92
93
<target name="javadoc" description="Generates the Javadoc of the application">
94
<javadoc sourcepath="${build.srcDir}"
95
packagenames="*"
96
destdir="${reporting.outputDirectory}/apidocs"
97
access="protected"
98
source="${compiler.source}"
99
verbose="false"
100
version="true"
101
use="true"
102
author="true"
103
splitindex="false"
104
nodeprecated="false"
105
nodeprecatedlist="false"
106
notree="false"
107
noindex="false"
108
nohelp="false"
109
nonavbar="false"
110
serialwarn="false"
111
encoding="UTF-8"
112
linksource="false"
113
breakiterator="false">
114
<classpath refid="build.classpath"/>
115
</javadoc>
116
</target>
117
118
<!-- ====================================================================== -->
119
<!-- Package target -->
120
<!-- ====================================================================== -->
121
122
<target name="package" depends="sisu" description="Package the application">
123
<jar jarfile="${build.dir}/${build.finalName}.jar"
124
compress="true"
125
index="false"
126
basedir="${build.outputDir}"
127
excludes="**/package.html">
128
<manifest>
129
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
130
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
131
<attribute name="JavaPackages-Version" value="${project.version}"/>
132
</manifest>
133
</jar>
134
</target>
135
136
<!-- ====================================================================== -->
137
<!-- A dummy target for the package named after the type it creates -->
138
<!-- ====================================================================== -->
139
140
<target name="jar" depends="package" description="Builds the jar for the application"/>
141
142
</project>
143