Gentoo Archives: gentoo-commits

From: "Tom Wijsman (tomwij)" <tomwij@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-java/felix-utils/files: felix-utils-1.2.0-java-fixes.patch felix-utils-1.2.0-build.xml
Date: Wed, 02 Oct 2013 22:18:56
Message-Id: 20131002221852.B42F12004E@flycatcher.gentoo.org
1 tomwij 13/10/02 22:18:52
2
3 Added: felix-utils-1.2.0-java-fixes.patch
4 felix-utils-1.2.0-build.xml
5 Log:
6 New package for dev-java/felix-utils, Felix Utils. Indirect dependency needed for Struts 2.
7
8 (Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)
9
10 Revision Changes Path
11 1.1 dev-java/felix-utils/files/felix-utils-1.2.0-java-fixes.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/felix-utils/files/felix-utils-1.2.0-java-fixes.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/felix-utils/files/felix-utils-1.2.0-java-fixes.patch?rev=1.1&content-type=text/plain
15
16 Index: felix-utils-1.2.0-java-fixes.patch
17 ===================================================================
18 --- a/src/main/java/org/apache/felix/utils/filter/FilterImpl.java 2012-06-12 08:56:50.000000000 +0200
19 +++ b/src/main/java/org/apache/felix/utils/filter/FilterImpl.java 2013-05-13 14:25:58.601527069 +0200
20 @@ -25,6 +25,7 @@
21 import java.security.AccessController;
22 import java.security.PrivilegedAction;
23 import java.util.*;
24 +import java.util.Map.Entry;
25
26 import org.apache.felix.utils.version.VersionTable;
27 import org.osgi.framework.Filter;
28 @@ -111,6 +111,19 @@
29 converted = conv;
30 }
31
32 + @Override
33 + public boolean matches(Map<String, ?> map)
34 + {
35 + Map nonGenericMap = new HashMap();
36 +
37 + for(Entry<String, ?> entry : map.entrySet())
38 + {
39 + nonGenericMap.put(entry.getKey(), entry.getValue());
40 + }
41 +
42 + return match0(nonGenericMap);
43 + }
44 +
45
46 /**
47 * Filter using a service's properties.
48 @@ -575,13 +587,13 @@
49 switch (operation) {
50 case APPROX :
51 case EQUAL : {
52 - return ((Version) value1).compareTo(converted) == 0;
53 + return ((Version) value1).compareTo((Version) converted) == 0;
54 }
55 case GREATER: {
56 - return ((Version) value1).compareTo(converted) >= 0;
57 + return ((Version) value1).compareTo((Version) converted) >= 0;
58 }
59 case LESS: {
60 - return ((Version) value1).compareTo(converted) <= 0;
61 + return ((Version) value1).compareTo((Version) converted) <= 0;
62 }
63 }
64 } else {
65
66
67
68 1.1 dev-java/felix-utils/files/felix-utils-1.2.0-build.xml
69
70 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/felix-utils/files/felix-utils-1.2.0-build.xml?rev=1.1&view=markup
71 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-java/felix-utils/files/felix-utils-1.2.0-build.xml?rev=1.1&content-type=text/plain
72
73 Index: felix-utils-1.2.0-build.xml
74 ===================================================================
75 <?xml version="1.0" encoding="UTF-8"?>
76
77 <!-- ====================================================================== -->
78 <!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
79 <!-- ====================================================================== -->
80
81 <!-- ====================================================================== -->
82 <!-- ===================== - DO NOT EDIT THIS FILE! - ===================== -->
83 <!-- ====================================================================== -->
84 <!-- -->
85 <!-- Any modifications will be overwritten. -->
86 <!-- -->
87 <!-- Generated by Maven Ant Plugin on 5/13/13 2:09 PM -->
88 <!-- See: http://maven.apache.org/plugins/maven-ant-plugin/ -->
89 <!-- -->
90 <!-- ====================================================================== -->
91
92 <project name="org.apache.felix.utils-from-maven" default="package" basedir=".">
93
94 <!-- ====================================================================== -->
95 <!-- Build environment properties -->
96 <!-- ====================================================================== -->
97
98 <property file="${user.home}/.m2/maven.properties"/>
99 <property file="maven-build.properties"/>
100
101 <property name="maven.build.finalName" value="org.apache.felix.utils-1.2.0"/>
102 <property name="maven.build.dir" value="target"/>
103 <property name="maven.build.outputDir" value="${maven.build.dir}/classes"/>
104 <property name="maven.build.srcDir.0" value="src/main/java"/>
105 <property name="maven.build.resourceDir.0" value="src/main/resources"/>
106 <property name="maven.build.resourceDir.1" value="."/>
107 <property name="maven.build.testOutputDir" value="${maven.build.dir}/test-classes"/>
108 <property name="maven.build.testDir.0" value="src/test/java"/>
109 <property name="maven.build.testResourceDir.0" value="src/test/resources"/>
110 <property name="maven.test.reports" value="${maven.build.dir}/test-reports"/>
111 <property name="maven.reporting.outputDirectory" value="${maven.build.dir}/site"/>
112
113 <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
114 <property name="maven.settings.offline" value="false"/>
115 <property name="maven.settings.interactiveMode" value="true"/>
116
117 <!-- ====================================================================== -->
118 <!-- Defining classpaths -->
119 <!-- ====================================================================== -->
120
121 <path id="build.classpath">
122 <pathelement location="${maven.repo.local}/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"/>
123 <pathelement location="${maven.repo.local}/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar"/>
124 </path>
125 <path id="build.test.classpath">
126 <pathelement location="${maven.repo.local}/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"/>
127 <pathelement location="${maven.repo.local}/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar"/>
128 <pathelement location="${maven.repo.local}/junit/junit/4.0/junit-4.0.jar"/>
129 <pathelement location="${maven.repo.local}/org/easymock/easymock/2.4/easymock-2.4.jar"/>
130 <pathelement location="${maven.repo.local}/org/mockito/mockito-all/1.7/mockito-all-1.7.jar"/>
131 </path>
132
133 <!-- ====================================================================== -->
134 <!-- Cleaning up target -->
135 <!-- ====================================================================== -->
136
137 <target name="clean" description="Clean the output directory">
138 <delete dir="${maven.build.dir}"/>
139 </target>
140
141 <!-- ====================================================================== -->
142 <!-- Compilation target -->
143 <!-- ====================================================================== -->
144
145 <target name="compile" depends="get-deps" description="Compile the code">
146 <mkdir dir="${maven.build.outputDir}"/>
147 <javac destdir="${maven.build.outputDir}"
148 encoding="UTF-8"
149 nowarn="false"
150 debug="true"
151 optimize="false"
152 deprecation="true"
153 target="jsr14"
154 verbose="false"
155 fork="false"
156 source="1.5">
157 <src>
158 <pathelement location="${maven.build.srcDir.0}"/>
159 </src>
160 <classpath refid="build.classpath"/>
161 </javac>
162 <mkdir dir="${maven.build.outputDir}/META-INF"/>
163 <copy todir="${maven.build.outputDir}/META-INF">
164 <fileset dir="${maven.build.resourceDir.1}">
165 <include name="changelog.txt"/>
166 </fileset>
167 </copy>
168 </target>
169
170 <!-- ====================================================================== -->
171 <!-- Test-compilation target -->
172 <!-- ====================================================================== -->
173
174 <target name="compile-tests"
175 depends="compile"
176 description="Compile the test code"
177 unless="maven.test.skip">
178 <mkdir dir="${maven.build.testOutputDir}"/>
179 <javac destdir="${maven.build.testOutputDir}"
180 encoding="UTF-8"
181 nowarn="false"
182 debug="true"
183 optimize="false"
184 deprecation="true"
185 target="jsr14"
186 verbose="false"
187 fork="false"
188 source="1.5">
189 <src>
190 <pathelement location="${maven.build.testDir.0}"/>
191 </src>
192 <classpath>
193 <path refid="build.test.classpath"/>
194 <pathelement location="${maven.build.outputDir}"/>
195 </classpath>
196 </javac>
197 <copy todir="${maven.build.testOutputDir}">
198 <fileset dir="${maven.build.testResourceDir.0}"/>
199 </copy>
200 </target>
201
202 <!-- ====================================================================== -->
203 <!-- Run all tests -->
204 <!-- ====================================================================== -->
205
206 <target name="test"
207 depends="compile-tests, junit-missing"
208 unless="junit.skipped"
209 description="Run the test cases">
210 <mkdir dir="${maven.test.reports}"/>
211 <junit printSummary="yes" haltonerror="true" haltonfailure="true" fork="true" dir=".">
212 <sysproperty key="basedir" value="."/>
213 <formatter type="xml"/>
214 <formatter type="plain" usefile="false"/>
215 <classpath>
216 <path refid="build.test.classpath"/>
217 <pathelement location="${maven.build.outputDir}"/>
218 <pathelement location="${maven.build.testOutputDir}"/>
219 </classpath>
220 <batchtest todir="${maven.test.reports}" unless="test">
221 <fileset dir="${maven.build.testDir.0}">
222 <include name="**/Test*.java"/>
223 <include name="**/*Test.java"/>
224 <include name="**/*TestCase.java"/>
225 <exclude name="**/*Abstract*Test.java"/>
226 </fileset>
227 </batchtest>
228 <batchtest todir="${maven.test.reports}" if="test">
229 <fileset dir="${maven.build.testDir.0}">
230 <include name="**/${test}.java"/>
231 <exclude name="**/*Abstract*Test.java"/>
232 </fileset>
233 </batchtest>
234 </junit>
235 </target>
236
237 <target name="test-junit-present">
238 <available classname="junit.framework.Test" property="junit.present"/>
239 </target>
240
241 <target name="test-junit-status"
242 depends="test-junit-present">
243 <condition property="junit.missing">
244 <and>
245 <isfalse value="${junit.present}"/>
246 <isfalse value="${maven.test.skip}"/>
247 </and>
248 </condition>
249 <condition property="junit.skipped">
250 <or>
251 <isfalse value="${junit.present}"/>
252 <istrue value="${maven.test.skip}"/>
253 </or>
254 </condition>
255 </target>
256
257 <target name="junit-missing"
258 depends="test-junit-status"
259 if="junit.missing">
260 <echo>=================================== WARNING ===================================</echo>
261 <echo> JUnit is not present in your $ANT_HOME/lib directory. Tests not executed.</echo>
262 <echo>===============================================================================</echo>
263 </target>
264
265 <!-- ====================================================================== -->
266 <!-- Javadoc target -->
267 <!-- ====================================================================== -->
268
269 <target name="javadoc" description="Generates the Javadoc of the application">
270 <javadoc sourcepath="${maven.build.srcDir.0}"
271 packagenames="*"
272 destdir="${maven.reporting.outputDirectory}/apidocs"
273 access="protected"
274 old="false"
275 verbose="false"
276 version="true"
277 use="true"
278 author="true"
279 splitindex="false"
280 nodeprecated="false"
281 nodeprecatedlist="false"
282 notree="false"
283 noindex="false"
284 nohelp="false"
285 nonavbar="false"
286 serialwarn="false"
287 charset="ISO-8859-1"
288 linksource="false"
289 breakiterator="false"/>
290 </target>
291
292 <!-- ====================================================================== -->
293 <!-- Package target -->
294 <!-- ====================================================================== -->
295
296 <target name="package" depends="compile,test" description="Package the application">
297 <jar jarfile="${maven.build.dir}/${maven.build.finalName}.jar"
298 compress="true"
299 index="false"
300 basedir="${maven.build.outputDir}"
301 excludes="**/package.html">
302 </jar>
303 </target>
304
305 <!-- ====================================================================== -->
306 <!-- A dummy target for the package named after the type it creates -->
307 <!-- ====================================================================== -->
308
309 <target name="jar" depends="package" description="Builds the jar for the application"/>
310
311 <!-- ====================================================================== -->
312 <!-- Download dependencies target -->
313 <!-- ====================================================================== -->
314
315 <target name="test-offline">
316 <condition property="maven.mode.offline">
317 <equals arg1="${maven.settings.offline}" arg2="true"/>
318 </condition>
319 </target>
320
321 <target name="get-deps"
322 depends="test-offline"
323 description="Download all dependencies"
324 unless="maven.mode.offline">
325 <mkdir dir="${maven.repo.local}"/>
326 <mkdir dir="${maven.repo.local}/org/osgi/org.osgi.core/4.1.0"/>
327 <get src="http://repository.apache.org/snapshots/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"
328 dest="${maven.repo.local}/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"
329 usetimestamp="false"
330 ignoreerrors="true"/>
331 <get src="http://repo.maven.apache.org/maven2/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"
332 dest="${maven.repo.local}/org/osgi/org.osgi.core/4.1.0/org.osgi.core-4.1.0.jar"
333 usetimestamp="false"
334 ignoreerrors="true"/>
335 <mkdir dir="${maven.repo.local}/org/osgi/org.osgi.compendium/4.1.0"/>
336 <get src="http://repository.apache.org/snapshots/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar"
337 dest="${maven.repo.local}/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar"
338 usetimestamp="false"
339 ignoreerrors="true"/>
340 <get src="http://repo.maven.apache.org/maven2/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar"
341 dest="${maven.repo.local}/org/osgi/org.osgi.compendium/4.1.0/org.osgi.compendium-4.1.0.jar"
342 usetimestamp="false"
343 ignoreerrors="true"/>
344 <mkdir dir="${maven.repo.local}/junit/junit/4.0"/>
345 <get src="http://repository.apache.org/snapshots/junit/junit/4.0/junit-4.0.jar"
346 dest="${maven.repo.local}/junit/junit/4.0/junit-4.0.jar"
347 usetimestamp="false"
348 ignoreerrors="true"/>
349 <get src="http://repo.maven.apache.org/maven2/junit/junit/4.0/junit-4.0.jar"
350 dest="${maven.repo.local}/junit/junit/4.0/junit-4.0.jar"
351 usetimestamp="false"
352 ignoreerrors="true"/>
353 <mkdir dir="${maven.repo.local}/org/easymock/easymock/2.4"/>
354 <get src="http://repository.apache.org/snapshots/org/easymock/easymock/2.4/easymock-2.4.jar"
355 dest="${maven.repo.local}/org/easymock/easymock/2.4/easymock-2.4.jar"
356 usetimestamp="false"
357 ignoreerrors="true"/>
358 <get src="http://repo.maven.apache.org/maven2/org/easymock/easymock/2.4/easymock-2.4.jar"
359 dest="${maven.repo.local}/org/easymock/easymock/2.4/easymock-2.4.jar"
360 usetimestamp="false"
361 ignoreerrors="true"/>
362 <mkdir dir="${maven.repo.local}/org/mockito/mockito-all/1.7"/>
363 <get src="http://repository.apache.org/snapshots/org/mockito/mockito-all/1.7/mockito-all-1.7.jar"
364 dest="${maven.repo.local}/org/mockito/mockito-all/1.7/mockito-all-1.7.jar"
365 usetimestamp="false"
366 ignoreerrors="true"/>
367 <get src="http://repo.maven.apache.org/maven2/org/mockito/mockito-all/1.7/mockito-all-1.7.jar"
368 dest="${maven.repo.local}/org/mockito/mockito-all/1.7/mockito-all-1.7.jar"
369 usetimestamp="false"
370 ignoreerrors="true"/>
371 </target>
372
373 </project>