File: maven.xml

package info (click to toggle)
libcommons-attributes-java 2.2-8
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 872 kB
  • ctags: 771
  • sloc: java: 3,458; xml: 2,561; makefile: 21; sh: 5
file content (285 lines) | stat: -rw-r--r-- 11,456 bytes parent folder | download | duplicates (2)
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
<!--
=
= Copyright 2003-2004 The Apache Software Foundation
= 
= 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 default="attributes:help" xmlns:maven="jelly:maven" xmlns:j="jelly:core" xmlns:util="jelly:util">
    
    <property file="${basedir}/../build.properties"/>
    <property file="${basedir}/../project.properties"/>
    <property file="project.properties"/>
    <property name="maven.jar.manifest.extensions.add" value="true"/>
    <property name="maven.checkstyle.format" value="avalon"/>
    <property name="pom.organization.identifier" value="ASF"/>
    <property name="pom.specificationVersion" value="1.0"/>
    
    <property name="javadoc14.jar" value="${maven.repo.local}/javadoc/jars/javadoc-1.4.jar"/>
    
    <goal name="attributes:help"
        description="Print some help.">
        <echo><![CDATA[
-----------------------------------------------------------------------
JAKARTA COMMONS ATTRIBUTES: How To Build This Thing
-----------------------------------------------------------------------

Since the unit tests depend on the Maven plugin, which depend on the
api, which require the unit tests to pass, you have to build this
package in the following way:

    maven install
    maven install-plugin
    maven test

]]></echo>
    </goal>
    
    <goal name="attributes:install-javadoc-1.4">
        <available file="${javadoc14.jar}" property="javadoc14.jar.present"/>
        <j:set var="jd14present" value="${javadoc14.jar.present}"/>
        <j:if test="${!jd14present.equals ('true')}">
            
            <echo><![CDATA[
-----------------------------------------------------------------------
JAKARTA COMMONS ATTRIBUTES: Dependency Resolution
-----------------------------------------------------------------------

You do not have Javadoc-1.4.jar in your local repository. Since this 
jar can't be downloaded, it will be created from your tools.jar and put 
in your local repository. Should the creation fail, please copy the
files 

    com/sun/javadoc/*.class
    com/sun/tools/doclets/Taglet.class

from your tools.jar (which should be in $JAVA_HOME/lib/) into a jar file
named 

    ${maven.repo.local}/javadoc/jars/javadoc-1.4.jar

If you don't find the Taglet.class file in your tools.jar, this is
probably caused by you not having Javadoc 1.4 or later. In order for
the compilation to proceed anyway, you can do the following:

    1. Go to java.sun.com
    2. Download JDK 1.4.2 (without NetBeans)
    3. Install it.
    4. Get the tools.jar from the installation.
    5. Get the files listed above and put them into a jar file
       as described above.

If that's too much, then you should perhaps look into the binary
distributions available at the project's homepage.

Finally, please be aware that I *have* contacted Sun regarding putting
the javadoc API classes into a Maven repository...
]]></echo>
            
            <mkdir dir="${maven.repo.local}/javadoc/jars/"/>
            <jar destfile="${maven.repo.local}/javadoc/jars/javadoc-1.4.jar">
                <zipfileset src="${java.home}/../lib/tools.jar" includes="com/sun/javadoc/**,com/sun/tools/doclets/Taglet.class"/>
            </jar>
        </j:if>        
    </goal>
    
    <goal name="install" 
        description="Build and install the Jakarta Commons Attributes jars." >
        <attainGoal name="attributes:install-javadoc-1.4"/>
        <maven:reactor
            basedir="${basedir}"
            includes="api/project.xml,compiler/project.xml"
            goals="jar:install"
            banner="Building:"
            ignoreFailures="false" />
    </goal>
    
    <goal name="install-snapshot" 
        description="Build and install the Jakarta Commons Attributes jars." >
        <attainGoal name="attributes:install-javadoc-1.4"/>
        <maven:reactor
            basedir="${basedir}"
            includes="api/project.xml,compiler/project.xml"
            goals="jar:install-snapshot"
            banner="Building:"
            ignoreFailures="false" />
    </goal>
    
    <goal name="test" 
        description="Test the installation." >
        <maven:reactor
            basedir="${basedir}"
            includes="unittest/project.xml"
            goals="attributes:test"
            banner="Building:"
            ignoreFailures="false" />
    </goal>
    
    <goal name="clean">
        <maven:reactor
            basedir="${basedir}"
            includes="*/project.xml"
            goals="clean:clean"
            banner="Cleaning subproject:"
            ignoreFailures="false"/>
    </goal>
    
    <goal name="site">
        <maven:reactor
            basedir="${basedir}"
            includes="site/project.xml"
            goals="license,xjavadoc,attributes:site"
            banner="Building Site:"
            ignoreFailures="false" />
    </goal>
    
    <goal name="deploy-site">
        <maven:reactor
            basedir="${basedir}"
            includes="site/project.xml"
            goals="site:deploy"
            banner="Building Site:"
            ignoreFailures="false" />
    </goal>
    
    <goal name="dist">
        <property name="maven.dist.assembly.dir" value="${maven.build.dir}/${maven.final.name}"/>
        <property name="maven.dist.bin.archive.dir" value="${maven.dist.assembly.dir}/bin"/>
        <property name="maven.dist.src.archive.dir" value="${maven.dist.assembly.dir}/src"/>
        <property name="maven.dist.bin.assembly.dir" value="${maven.dist.assembly.dir}/bin/${maven.final.name}"/>
        <property name="maven.dist.src.assembly.dir" value="${maven.dist.assembly.dir}/src/${maven.final.name}"/>
        <property name="maven.dist.dir" value="${maven.build.dir}/distributions"/>
        
        
        <attainGoal name="clean"/>
        <attainGoal name="install"/>
        <attainGoal name="install-plugin"/>
        <attainGoal name="site"/>
        
        <delete dir="${maven.dist.dir}"/>
        <mkdir dir="${maven.dist.dir}"/>
        
        <!--
        Copy the Jars across
        -->
        <copy todir="${maven.dist.dir}">
            <fileset dir="${basedir}/api/target/"
                includes="commons-attributes-api-${pom.currentVersion}.jar"/>
            <fileset dir="${basedir}/compiler/target/"
                includes="commons-attributes-compiler-${pom.currentVersion}.jar"/>
            <fileset dir="${basedir}/plugin/target/"
                includes="commons-attributes-plugin-${pom.currentVersion}.jar"/>
        </copy>
        
        <!--
        
        Make binary distribution consisting of:
        
        + Compiler and API Jars.
        + Maven plugin
        + Javadocs
        + LICENSE, NOTICE and RELEASE files
        
        -->
        <mkdir dir="${maven.dist.bin.assembly.dir}"/>
        <copy todir="${maven.dist.bin.assembly.dir}">
            <fileset dir="${basedir}/api/target/"
                includes="commons-attributes-api-${pom.currentVersion}.jar"/>
            <fileset dir="${basedir}/compiler/target/"
                includes="commons-attributes-compiler-${pom.currentVersion}.jar"/>
            <fileset dir="${basedir}/plugin/target/"
                includes="commons-attributes-plugin-${pom.currentVersion}.jar"/>
            <fileset dir="${basedir}/site/target/docs/" includes="api/**"/>
            <fileset dir="${basedir}/" includes="LICENSE.txt,NOTICE.txt,RELEASE.txt"/>
        </copy>
        <!-- zip and tar.gz -->
        <zip destfile="${maven.dist.dir}/${maven.final.name}.zip">
            <fileset dir="${maven.dist.bin.archive.dir}"/>
        </zip>
        <tar destfile="${maven.dist.dir}/${maven.final.name}.tar.gz"
            compression="gzip"
            basedir="${maven.dist.bin.archive.dir}"/>
        
        <!--
        
        Make source distribution consisting of:
        
        + Source files from api, compiler, plugin, site and unittest
        + build files
        + LICENSE, NOTICE and RELEASE files
        
        -->
        <copy todir="${maven.dist.src.assembly.dir}">
            <fileset dir="${basedir}/" includes="api/*,api/src/**" excludes="api/target/,**/CVS/**"/>
            <fileset dir="${basedir}/" includes="compiler/*,compiler/src/**" excludes="compiler/target/**/CVS/**"/>
            <fileset dir="${basedir}/" includes="plugin/*" excludes="**/CVS/**" />
            <fileset dir="${basedir}/" includes="site/*,site/etc/**,site/xdocs/" excludes="site/target/,**/CVS/**"/>
            <fileset dir="${basedir}/" includes="unittest/*,unittest/src/**" excludes="unittest/target/,**/CVS/**" />
            
            <fileset dir="${basedir}/" includes="build.xml,maven.xml,project.xml,project.properties" excludes="**/CVS/**" />
            
            <fileset dir="${basedir}/" includes="LICENSE.txt,NOTICE.txt,RELEASE.txt,README.html"/>
        </copy>
        <!-- zip and tar.gz -->
        <zip destfile="${maven.dist.dir}/${maven.final.name}-src.zip">
            <fileset dir="${maven.dist.src.archive.dir}"/>
        </zip>
        <tar destfile="${maven.dist.dir}/${maven.final.name}-src.tar.gz"
            compression="gzip"
            basedir="${maven.dist.src.archive.dir}"/>
    </goal>
    
    <goal name="install-plugin">
        <maven:reactor
            basedir="${basedir}"
            includes="plugin/project.xml"
            goals="plugin:install"
            banner="Installing plugin:"
            ignoreFailures="false"
            />
    </goal>
    
    <goal name="xjavadoc">
        <mkdir dir="${basedir}/target/docs/api" />
        <property name="copyright"
            value="Copyright &amp;copy; ${year} ${pom.organization.name}. All Rights Reserved." />
        <property name="title" value="Commons-${pom.name} ${pom.currentVersion} API"/>
        <javadoc destdir="${basedir}/target/docs/api" 
            doctitle="&lt;h1&gt;Jakarta Commons Attributes 2.2&lt;/h1&gt;" 
            noindex="false" author="true" use="true"
            windowtitle="${title}" 
            bottom="${copyright}"
            additionalparam="-J-Xmx128m "
            packagenames="org.apache.commons.attributes,org.apache.commons.attributes.validation"
            overview="${basedir}/../api/src/java/overview.html">
            <j:forEach var="packageGroup" items="${pom.packageGroups}">
                <group title="${packageGroup.title}" packages="${packageGroup.packages}"/>
            </j:forEach>
            <sourcepath path="${basedir}/../api/src/java"/>
            <sourcepath path="${basedir}/../compiler/src/java"/>
            <classpath>
                <path refid="maven.dependency.classpath"/>
            </classpath>
            <link href="${sun.j2se.link}" />
        </javadoc>
    </goal>
    
    <goal name="attributes:windeploysite">
        <attainGoal name="site"/>
        <mkdir dir="target"/>
        <zip destfile="target/site.zip">
            <fileset dir="site/target/docs/" includes="**/*"/>
        </zip>
    </goal>
    
</project>