[med-svn] r24047 - in trunk/packages/rdp-classifier/trunk/debian: . bin patches
Olivier Sallou
osallou at moszumanska.debian.org
Fri Sep 15 15:28:08 UTC 2017
Author: osallou
Date: 2017-09-15 15:28:08 +0000 (Fri, 15 Sep 2017)
New Revision: 24047
Added:
trunk/packages/rdp-classifier/trunk/debian/patches/
trunk/packages/rdp-classifier/trunk/debian/patches/fix_java9_compilation.patch
trunk/packages/rdp-classifier/trunk/debian/patches/series
Modified:
trunk/packages/rdp-classifier/trunk/debian/bin/rdp_classifier
trunk/packages/rdp-classifier/trunk/debian/changelog
trunk/packages/rdp-classifier/trunk/debian/control
trunk/packages/rdp-classifier/trunk/debian/junit.xml
trunk/packages/rdp-classifier/trunk/debian/rules
Log:
fix java 9 compilation
Modified: trunk/packages/rdp-classifier/trunk/debian/bin/rdp_classifier
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/bin/rdp_classifier 2017-09-15 10:01:30 UTC (rev 24046)
+++ trunk/packages/rdp-classifier/trunk/debian/bin/rdp_classifier 2017-09-15 15:28:08 UTC (rev 24047)
@@ -14,4 +14,4 @@
JAR=/usr/share/rdp-classifier/rdp_classifier.jar
-exec java -Xms512M -Xmx512M -jar "$JAR" "$@"
+exec java $JAVA_OPTS -Xms512M -Xmx512M -jar "$JAR" "$@"
Modified: trunk/packages/rdp-classifier/trunk/debian/changelog
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/changelog 2017-09-15 10:01:30 UTC (rev 24046)
+++ trunk/packages/rdp-classifier/trunk/debian/changelog 2017-09-15 15:28:08 UTC (rev 24047)
@@ -1,3 +1,11 @@
+rdp-classifier (2.10.2-2) UNRELEASED; urgency=medium
+
+ * d/control,d/junit.xml: fixes for Java 9 compilation (Closes #875789).
+ * debian/bin/rdp_classifier: add optional env variable JAVA_OPTS
+ to java command line
+
+ -- Olivier Sallou <osallou at debian.org> Fri, 15 Sep 2017 13:25:30 +0000
+
rdp-classifier (2.10.2-1) unstable; urgency=medium
* Initial upload to Debian (Closes: #790926)
Modified: trunk/packages/rdp-classifier/trunk/debian/control
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/control 2017-09-15 10:01:30 UTC (rev 24046)
+++ trunk/packages/rdp-classifier/trunk/debian/control 2017-09-15 15:28:08 UTC (rev 24047)
@@ -15,7 +15,8 @@
librdp-taxonomy-tree-java (>= 1.2.0),
libjfreechart-java,
ant,
- ant-optional
+ ant-optional,
+ ant-contrib
Standards-Version: 3.9.6
Vcs-Browser: http://anonscm.debian.org/viewvc/debian-med/trunk/packages/rdp-classifier/trunk/
Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/rdp-classifier/trunk/
Modified: trunk/packages/rdp-classifier/trunk/debian/junit.xml
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/junit.xml 2017-09-15 10:01:30 UTC (rev 24046)
+++ trunk/packages/rdp-classifier/trunk/debian/junit.xml 2017-09-15 15:28:08 UTC (rev 24047)
@@ -1,21 +1,44 @@
<!-- Snippet to drive junit tests in deb build. Build rdp-readseq.jar first. -->
<project>
<target name="junit">
+ <taskdef resource="net/sf/antcontrib/antlib.xml">
+ <classpath>
+ <pathelement location="/usr/share/java/ant-contrib.jar" />
+ </classpath>
+ </taskdef>
+
<property name="cp" value="rdp_classifier.jar:/usr/share/java/junit4.jar:test"/>
- <javac srcdir="test">
+ <javac srcdir="test" source="1.8" target="1.8">
<classpath path="${cp}"/>
</javac>
- <junit printsummary="yes" haltonfailure="yes" showoutput="yes">
- <classpath path="${cp}"/>
+ <echo>Using java version ${java.version}</echo>
+ <if><equals arg1="${ant.java.version}" arg2="1.8" />
+ <then>
+ <junit haltonfailure="yes" printsummary="yes" showoutput="true">
+ <classpath path="${cp}"/>
<formatter type="xml"/>
<batchtest fork="yes">
<fileset dir="test" includes="**/rrnaclassifier/**/*Test.java"/>
+ </batchtest>
+ </junit>
+ </then>
+ <else>
+ <junit haltonfailure="yes" printsummary="yes" showoutput="true">
+ <jvmarg line="--add-modules java.se.ee"/>
+ <classpath path="${cp}"/>
+
+ <formatter type="xml"/>
+
+ <batchtest fork="yes">
+ <fileset dir="test" includes="**/rrnaclassifier/**/*Test.java"/>
</batchtest>
</junit>
+ </else>
+ </if>
</target>
</project>
Added: trunk/packages/rdp-classifier/trunk/debian/patches/fix_java9_compilation.patch
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/patches/fix_java9_compilation.patch (rev 0)
+++ trunk/packages/rdp-classifier/trunk/debian/patches/fix_java9_compilation.patch 2017-09-15 15:28:08 UTC (rev 24047)
@@ -0,0 +1,78 @@
+Subject: fix resource loading for Java 9
+Description: resource loading modification for Java 9
+Author: Olivier Sallou
+Forwarded: no
+Last-Updated: 2017-09-15
+--- a/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TrainingInfoTest.java
++++ b/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TrainingInfoTest.java
+@@ -55,7 +55,7 @@
+ /** Test of createLogWordPriorArr method, of class classification.TrainingInfo. */
+ public void testCreateLogWordPriorArr() throws Exception{
+ System.out.println("testCreateLogWordPriorArr");
+- InputStream dstream = System.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
++ InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
+ Reader in = new InputStreamReader( dstream );
+
+ TrainingInfo train = new TrainingInfo();
+@@ -82,7 +82,7 @@
+ /** Test of createGenusWordProbLis method, of class classification.TrainingInfo. */
+ public void testCreateGenusWordProbList() throws Exception{
+ System.out.println("testCreateGenusWordConditionalProbList");
+- InputStream dstream = System.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
++ InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
+ Reader in = new InputStreamReader( dstream );
+ TrainingInfo train = new TrainingInfo();
+ train.createGenusWordProbList(in);
+@@ -104,7 +104,7 @@
+ /** Test of makeProbIndexArr method, of class classification.TrainingInfo. */
+ public void testCreateProbIndexArr() throws Exception {
+ System.out.println("testCreateProbIndexArr");
+- InputStream dstream = System.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
++ InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
+ Reader in = new InputStreamReader( dstream );
+ TrainingInfo train = new TrainingInfo();
+ train.createProbIndexArr(in);
+@@ -120,19 +120,19 @@
+ System.out.println("testCreateClassifier");
+ TrainingInfo train = new TrainingInfo();
+
+- InputStream dstream = System.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
++ InputStream dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testGenus_probList.txt");
+ Reader in = new InputStreamReader( dstream );
+ train.createGenusWordProbList(in);
+
+- dstream = System.class.getResourceAsStream("/test/classifier/test_bergeyTrainingTree.xml");
++ dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/test_bergeyTrainingTree.xml");
+ in = new InputStreamReader( dstream );
+ train.createTree(in);
+
+- dstream = System.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
++ dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testProbIndex.txt");
+ in = new InputStreamReader( dstream );
+ train.createProbIndexArr(in);
+
+- dstream = System.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
++ dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testLogWordPrior.txt");
+ in = new InputStreamReader( dstream );
+ train.createLogWordPriorArr(in);
+
+@@ -187,7 +187,7 @@
+
+
+ // end of
+- dstream = System.class.getResourceAsStream("/test/classifier/testQuerySeq.fasta");
++ dstream = TrainingInfoTest.class.getResourceAsStream("/test/classifier/testQuerySeq.fasta");
+ in = new InputStreamReader( dstream );
+ BufferedReader infile = new BufferedReader(in);
+ // test the first sequence
+--- a/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TreeFileParserTest.java
++++ b/test/edu/msu/cme/rdp/classifier/rrnaclassifier/TreeFileParserTest.java
+@@ -39,7 +39,7 @@
+ public void testParseTreeFile() throws Exception{
+ System.out.println("testParseTreeFile");
+ TreeFileParser parser = new TreeFileParser();
+- InputStream dstream = System.class.getResourceAsStream("/test/classifier/testTreeFile.xml");
++ InputStream dstream = TreeFileParserTest.class.getResourceAsStream("/test/classifier/testTreeFile.xml");
+ HierarchyVersion hVersion = null;
+
+ Reader in = new InputStreamReader( dstream );
Added: trunk/packages/rdp-classifier/trunk/debian/patches/series
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/patches/series (rev 0)
+++ trunk/packages/rdp-classifier/trunk/debian/patches/series 2017-09-15 15:28:08 UTC (rev 24047)
@@ -0,0 +1 @@
+fix_java9_compilation.patch
Modified: trunk/packages/rdp-classifier/trunk/debian/rules
===================================================================
--- trunk/packages/rdp-classifier/trunk/debian/rules 2017-09-15 10:01:30 UTC (rev 24046)
+++ trunk/packages/rdp-classifier/trunk/debian/rules 2017-09-15 15:28:08 UTC (rev 24047)
@@ -12,6 +12,7 @@
override_dh_auto_build:
jh_build -J rdp_classifier.jar src
#jar uf rdp_classifier.jar data
+ #jar uf rdp_classifier.jar -C test test
override_dh_auto_clean:
rm -f *.jar lib/*.jar TEST-*
More information about the debian-med-commit
mailing list