Debian Codegraph @

animal-sniffer-ant-tasks/src/it/negative-test/build.xml

raw
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 The MIT License
4
5 Copyright (c) 2009 codehaus.org.
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 THE SOFTWARE.
24 -->
25 <project name="negative-test" xmlns:as="antlib:org.codehaus.mojo.animal_sniffer">
26
27 <property environment="env"/>
28
29 <path id="jre">
30 <fileset dir="${java.home}" includes="lib/rt.jar"/>
31 <fileset dir="${java.home}" includes="lib/jce.jar"/>
32 <fileset dir="${java.home}" includes="lib/jsse.jar"/>
33 </path>
34
35 <xmlproperty file="../../../pom.xml" prefix="pom.xml"/>
36 <typedef uri="antlib:org.codehaus.mojo.animal_sniffer">
37 <classpath path="../../../target/${pom.xml.project.artifactId}-${pom.xml.project.parent.version}.jar"/>
38 </typedef>
39
40 <target name="clean">
41 <delete dir="build"/>
42 </target>
43
44 <target name="compile" depends="package-api2">
45 <mkdir dir="build/classes"/>
46 <javac srcdir="src/main/java" destdir="build/classes" fork="true">
47 <classpath>
48 <path path="build/api2.jar"/>
49 </classpath>
50 </javac>
51 </target>
52
53 <target name="package" depends="compile">
54 <mkdir dir="build"/>
55 <jar destfile="build/${ant.project.name}.jar" basedir="build/classes"/>
56 </target>
57
58 <target name="verify" depends="package">
59 <as:check-signature>
60 <classpath path="build/${ant.project.name}.jar"/>
61 </as:check-signature>
62 </target>
63
64 <target name="build-signatures">
65 <as:build-signatures destfile="build/jdk.sig">
66 <path>
67 <fileset dir="${java.home}" includes="lib/rt.jar"/>
68 <fileset dir="${java.home}" includes="lib/jce.jar"/>
69 <fileset dir="${java.home}" includes="lib/jsse.jar"/>
70 </path>
71 </as:build-signatures>
72 </target>
73
74 <target name="compile-api1">
75 <mkdir dir="build/api1"/>
76 <javac srcdir="src/api1/java" destdir="build/api1" fork="true"/>
77 </target>
78
79 <target name="compile-api2">
80 <mkdir dir="build/api2"/>
81 <javac srcdir="src/api2/java" destdir="build/api2" fork="true"/>
82 </target>
83
84 <target name="package-api1" depends="compile-api1">
85 <mkdir dir="build"/>
86 <jar destfile="build/api1.jar" basedir="build/api1"/>
87 </target>
88
89 <target name="package-api2" depends="compile-api2">
90 <mkdir dir="build"/>
91 <jar destfile="build/api2.jar" basedir="build/api2"/>
92 </target>
93
94 <target name="build-signatures-api1" depends="package-api1">
95 <as:build-signatures destfile="build/api1.sig">
96 <path>
97 <fileset dir="build" includes="api1.jar"/>
98 </path>
99 </as:build-signatures>
100 </target>
101
102 <target name="build-signatures-api2" depends="package-api2">
103 <as:build-signatures destfile="build/api2.sig">
104 <path>
105 <fileset dir="build" includes="api2.jar"/>
106 </path>
107 </as:build-signatures>
108 </target>
109
110 <target name="check-signatures-api1" depends="package, build-signatures-api1">
111 <!--
112 in this case we are checking signatures not of the jdk, but of our API
113 so we need to add the classpath of the jdk, or else we will have
114 an error due to java.lang.Object being undefined
115 -->
116 <as:check-signature signature="build/api1.sig" classpathRef="jre">
117 <path path="build/${ant.project.name}.jar"/>
118 <ignore className="java.*"/>
119 <ignore className="javax.*"/>
120 </as:check-signature>
121 </target>
122
123 <target name="check-signatures-api2" depends="package, build-signatures-api2">
124 <!--
125 in this case we are checking signatures not of the jdk, but of our API
126 so we need to add the classpath of the jdk, or else we will have
127 an error due to java.lang.Object being undefined
128 -->
129 <as:check-signature signature="build/api2.sig" classpathRef="jre">
130 <path path="build/${ant.project.name}.jar"/>
131 <ignore className="java.*"/>
132 <ignore className="javax.*"/>
133 </as:check-signature>
134 </target>
135
136 </project>