File: module.xml

package info (click to toggle)
jetty 6.1.26-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 10,564 kB
  • ctags: 12,713
  • sloc: java: 92,788; xml: 7,765; sh: 1,962; jsp: 360; ansic: 340; makefile: 50
file content (182 lines) | stat: -rw-r--r-- 6,210 bytes parent folder | download
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
<project name="jetty module build" basedir="." default="package">
  <property name="jar.file" value="${module-name}-${module-version}.jar"/>
  <property name="javac.excludes" value=""/>
  <target name="package">
    <delete dir="${build.dir}"/>
    <mkdir dir="${build.dir}"/>
    
    <echo>generating javadoc for ${module-name}</echo>
    <javadoc packagenames="org.mortbay.*,javax.servlet.*"
             destdir="${javadoc.dir}"
             author="true"
             version="true"
             public="false"
             windowtitle="jetty-${module-version} API"
             doctitle="${module-name}-${module-version}"
             encoding="ISO-8859-1"
             bottom="Copyright &amp;copy; 2009 Mortbay Consulting Pty. Ltd. All Rights Reserved.">
       <classpath>
         <path refid="classpath"/>
       </classpath>
       <link href="/usr/share/doc/default-jdk-doc/api/" />
       <link href="/usr/share/doc/libmail-java/api/" />
       <link href="/usr/share/doc/libservlet2.5-java/api/" />
       <sourcepath>
         <pathelement path="${src.dir}"/>
       </sourcepath>
    </javadoc>
    
    <echo>compiling ${module-name}</echo>
    <javac srcdir="${src.dir}"
           classpathref="classpath"
           destdir="${build.dir}"
           deprecation="false"
           failonerror="true"
           debug="true"
           source="1.5"
           target="1.5"
           nowarn="true"
           excludes="${javac.excludes}"
           listfiles="true"/>
    
    <echo>generating ${jar.file}</echo>
    <property name="manifest.file" value="${rsrc.dir}/META-INF/MANIFEST.MF"/>
    <available file="${manifest.file}" type="file" property="manifest.file.exists"/>
    <available file="${rsrc.dir}" type="dir" property="rsrc.dir.exists"/>
    <antcall target="generate-jar-with-given-manifest"/>
    <antcall target="generate-jar-without-given-manifest"/>
    
    <echo>copying ${jar.file} to ${module-libdir}</echo>
    <copy file="${target.dir}/${jar.file}" todir="${module-libdir}"/>
    
    <available file="${config.dir}" type="dir" property="config.dir.exists"/>
    <antcall target="copy-to-etc"/>
    <antcall target="tests" inheritRefs="true"/>
  </target>
  
  <target name="generate-jar" unless="jar.main.class">
    <antcall target="jar-with-resources"/>
    <antcall target="jar"/>
  </target>
  
  <target name="generate-jar-with-given-manifest" if="manifest.file.exists">
    <antcall target="jar-with-given-manifest-and-resources"/>
    <antcall target="jar-with-given-manifest"/>
  </target>

  <target name="generate-jar-without-given-manifest" unless="manifest.file.exists">
    <antcall target="generate-jar-with-manifest"/>
    <antcall target="generate-jar"/>
  </target>

  <target name="generate-jar-with-manifest" if="jar.main.class">
    <antcall target="jar-with-manifest-and-resources"/>
    <antcall target="jar-with-manifest"/>
  </target>
  
  <target name="jar" unless="rsrc.dir.exists">
    <jar destfile="${target.dir}/${jar.file}">
      <fileset dir="${build.dir}">
        <include name="**/*"/>
      </fileset>
      <manifest>
         <attribute name="Class-Path" value="jetty.jar mx4j.jar javax.mail.jar slf4j.jar xerces2.java tomcat7.jar geronimo-jta-1.0.1b-spec.jar"/>
      </manifest>
    </jar>
  </target>
  
  <target name="jar-with-resources" if="rsrc.dir.exists">
    <jar destfile="${target.dir}/${jar.file}">
      <fileset dir="${build.dir}">
        <include name="**/*"/>
      </fileset>
      <fileset dir="${rsrc.dir}">
        <include name="**/*"/>
      </fileset>
    </jar>
  </target>

  <target name="jar-with-manifest" unless="rsrc.dir.exists">
    <jar destfile="${target.dir}/${jar.file}">
      <fileset dir="${build.dir}">
        <include name="**/*"/>
      </fileset>
      <manifest>    
        <attribute name="Main-Class" value="${jar.main.class}"/>
      </manifest>
    </jar>
  </target>
  
  <target name="jar-with-manifest-and-resources" if="rsrc.dir.exists">
    <jar destfile="${target.dir}/${jar.file}">
      <fileset dir="${build.dir}">
        <include name="**/*"/>
      </fileset>
      <fileset dir="${rsrc.dir}">
        <include name="**/*"/>
      </fileset>
      <manifest>    
        <attribute name="Main-Class" value="${jar.main.class}"/>
      </manifest>
    </jar>
  </target>
  
  <target name="jar-with-given-manifest" unless="rsrc.dir.exists">
    <jar destfile="${target.dir}/${jar.file}" manifest="${manifest.file}">
      <fileset dir="${build.dir}">
        <include name="**/*"/>
      </fileset>
      <fileset dir="${rsrc.dir}">
        <include name="**/*"/>
      </fileset>
    </jar>
  </target>

  <target name="jar-with-given-manifest-and-resources" if="rsrc.dir.exists">
    <jar destfile="${target.dir}/${jar.file}" manifest="${manifest.file}">
      <fileset dir="${build.dir}">
        <include name="**/*"/>
      </fileset>
      <fileset dir="${rsrc.dir}">
        <include name="**/*"/>
      </fileset>
    </jar>
  </target>
  
  <target name="copy-to-etc" if="config.dir.exists">
    <echo>copying ${config.dir} to ${etc.dir} from ${module-name}</echo>
    <copy todir="${etc.dir}">
      <fileset dir="${config.dir}" excludes="**/*.svn"/>
    </copy>
  </target>

  <target name="tests" if="run-tests">
    <javac srcdir="${test.dir}"
           classpathref="classpath"
           deprecation="false"
           failonerror="true"
           debug="true"
           source="1.5"
           target="1.5"
           nowarn="true"
           listfiles="true"/>
    <junit haltonfailure="off">
       <classpath>
         <path refid="classpath"/>
         <pathelement path="${test.dir}"/>
       </classpath>
      <formatter type="plain" usefile="false"/>
      <batchtest>
        <fileset dir="${test.dir}">
          <include name="**/*Test.java"/>
          <include name="**/*TestCase.java"/>
          <exclude name="org/mortbay/jetty/servlet/AbstractSessionTest.java"/>
          <exclude name="org/mortbay/jetty/AsyncStressTest.java"/>
          <exclude name="org/mortbay/resource/*.java"/>
          <exclude name="org/mortbay/xml/XmlConfigurationTest.java"/>
        </fileset>
      </batchtest>
    </junit>
  </target>
</project>