File: maven.xml

package info (click to toggle)
commons-configuration 1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 3,440 kB
  • ctags: 4,113
  • sloc: java: 32,940; xml: 9,418; makefile: 13; sh: 5
file content (111 lines) | stat: -rw-r--r-- 4,298 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
<?xml version="1.0"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements.  See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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="jar:jar" xmlns:j="jelly:core" xmlns:maven="jelly:maven">

  <!-- Adds the jdbc-stdext to the dependency classpath if the
       dependency.jdbc property is defined.
  -->
  <preGoal name="java:compile">
    <j:if test="${dependency.jdbc != ''}">
      <path id="extended.dependency.path">
        <pathelement path="${dependency.jdbc}"/>
      </path>
      <maven:addPath id="maven.dependency.classpath" refid="extended.dependency.path"/>
    </j:if>
  </preGoal>
    
  <!-- Ensures that the conf directory and NOTICE.txt are included in the 
       source distro.
   -->
  <postGoal name="dist:prepare-src-filesystem">
    <mkdir dir="${maven.dist.src.assembly.dir}/conf"/>
    <copy todir="${maven.dist.src.assembly.dir}/conf">
      <fileset dir="${basedir}/conf">
      </fileset>
    </copy>
    <copy todir="${maven.dist.src.assembly.dir}">
      <fileset file="${basedir}/NOTICE.txt"/>
      <fileset file="${basedir}/RELEASE-NOTES.txt"/>
      <fileset file="${basedir}/default.properties"/>
      <fileset file="${basedir}/pom.xml"/>
    </copy>
    <mkdir dir="${maven.dist.src.assembly.dir}/xdocs"/>
    <copy todir="${maven.dist.src.assembly.dir}/xdocs">
      <fileset dir="${basedir}/xdocs">
      </fileset>
    </copy>
  </postGoal>
  
  <!-- Ensures that NOTICE.txt is added to the binary distro -->
  <preGoal name="dist:build-bin">
    <copy todir="${maven.dist.bin.assembly.dir}">
      <fileset file="${basedir}/NOTICE.txt"/>
      <fileset file="${basedir}/RELEASE-NOTES.txt"/>
    </copy>

    <!-- Create a jar file containing the sources -->
    <jar destfile="${maven.dist.bin.assembly.dir}/${maven.final.name}-sources.jar">
      <zipfileset prefix="META-INF" dir="${basedir}"
        includes="LICENSE*, NOTICE*"/>
      <fileset dir="${basedir}/src/java" includes="**/*.java"/>
    </jar>

    <!-- Create a jar file containing the Javadocs -->
    <jar destfile="${maven.dist.bin.assembly.dir}/${maven.final.name}-javadoc.jar">
      <zipfileset prefix="META-INF" dir="${basedir}"
        includes="LICENSE*, NOTICE*"/>
      <fileset dir="${basedir}/target/docs/apidocs"/>
    </jar>
  </preGoal>

  <!-- NonStringTestHolder.java contains tests shared by JUnit and Cactus
  tests.  This ugly hack moves the src from /src/test to /src/test-cactus
  so the Cactus tests will compile.  Not sure what is worse, this hack, or
  just duplicating the code!
  -->
  <preGoal name="cactus:compile">
    <copy todir="${basedir}/src/test-cactus/org/apache/commons/configuration">
      <fileset dir="${basedir}/src/test/" includes="**/NonStringTestHolder.java"/>
    </copy>
  </preGoal>

  <!-- Remove the files generated previously by JavaCC -->
  <preGoal name="javacc">
    <delete>
      <fileset dir="src/java/org/apache/commons/configuration/plist">
        <include name="PropertyListParser*.*"/>
        <include name="Token.java"/>
        <include name="TokenMgrError.java"/>
        <include name="SimpleCharStream.java"/>
        <include name="ParseException.java"/>
        <exclude name="*.jj"/>
      </fileset>
    </delete>
  </preGoal>

  <!-- Move the files generated by JavaCC to the source directory -->
  <postGoal name="javacc">
    <move todir="${basedir}/src/java/org/apache/commons/configuration/plist">
      <fileset dir="target/generated-src/main/java/org/apache/commons/configuration"/>
    </move>
  </postGoal>
</project>