[Debian-med-packaging] How to replace eclipse compiler in libsis-jhdf5-java

Andreas Tille tille at debian.org
Thu Sep 20 13:02:01 BST 2018


Hi Emmanuel,

On Thu, Sep 20, 2018 at 12:46:18PM +0200, Emmanuel Bourg wrote:
> Le 20/09/2018 à 08:48, Andreas Tille a écrit :
> > The import com.sun.xml.bind cannot be resolved
> 
> Somehow jaxb is not on the compilation classpath. I'm not familiar
> enough with the jhdf5 build to spot the error. Maybe you have to add the
> jar in libs/prod or libs/build? (the jar files in these directories
> should be removed btw).

For sure the jar files should be deleted.  Just an oversight which is fixed
now.  Thanks for spotting.

I tried to follow your hint via

 $ git diff
diff --git a/debian/patches/use_debian_packaged_libs.patch b/debian/patches/use_debian_packaged_libs.patch
index 4621e64..2cab95f 100644
--- a/debian/patches/use_debian_packaged_libs.patch
+++ b/debian/patches/use_debian_packaged_libs.patch
@@ -42,3 +42,16 @@
  }
  
  compileJava {
+--- a/build.gradle
++++ b/build.gradle
+@@ -3,8 +3,8 @@ apply from: 'javaproject.gradle'
+ group='sis'
+ 
+ dependencies {
+-    compile fileTree(dir: 'libs/prod', include: '*.jar')
+-    testCompile fileTree(dir: 'libs/test', include: '*.jar')
++    compile fileTree(dir: '/usr/share/java', include: '*.jar')
++    testCompile fileTree(dir: '/usr/share/java', include: '*.jar')
+ }
+ 
+ tasks.withType(Test) {


(see commit[1]) which seems to be successful for the above problem which
vanished.  The next issue looks challenging for me since args4j classes
are in ch.systemsx.cisd name space and thus seem to be rely on the
classes in libs/prod/cisd-args4j-9.11.2-sources.jar instead of
/usr/share/java/args4j.jar which I replaced in my patch[2]:


...
Compiling with Java command line compiler 'java'.
Starting process 'command 'java''. Working directory: /build/libsis-jhdf5-java-18.09.0-pre1+dfsg Command: java -cp /usr/share/java/ecj.jar org.eclipse.jdt.internal.compiler.batch.Main -nowarn @/build/libsis-jhd
Successfully started process 'command 'java''
invalid Class-Path header in manifest of jar file: /usr/share/maven-repo/org/debian/maven/maven-repo-helper/debian/maven-repo-helper-debian.jar
----------
1. ERROR in /build/libsis-jhdf5-java-18.09.0-pre1+dfsg/source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java (at line 31)
	import ch.systemsx.cisd.args4j.Argument;
	       ^^^^^^^^^^^^^^^^^^^^^^^
The import ch.systemsx.cisd.args4j cannot be resolved
----------
2. ERROR in /build/libsis-jhdf5-java-18.09.0-pre1+dfsg/source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java (at line 32)
	import ch.systemsx.cisd.args4j.CmdLineException;
	       ^^^^^^^^^^^^^^^^^^^^^^^
The import ch.systemsx.cisd.args4j cannot be resolved
----------
3. ERROR in /build/libsis-jhdf5-java-18.09.0-pre1+dfsg/source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java (at line 33)
	import ch.systemsx.cisd.args4j.CmdLineParser;
	       ^^^^^^^^^^^^^^^^^^^^^^^
...


Do you think I should exchange all

$ grep -R ch.systemsx.cisd.args4j
source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java:import ch.systemsx.cisd.args4j.Argument;
source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java:import ch.systemsx.cisd.args4j.CmdLineException;
source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java:import ch.systemsx.cisd.args4j.CmdLineParser;
source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java:import ch.systemsx.cisd.args4j.ExampleMode;
source/java/ch/systemsx/cisd/hdf5/h5ar/HDF5ArchiverMain.java:import ch.systemsx.cisd.args4j.Option;

by

  s/ch\.systemsx\.cisd/orgi.kohsuke.args4j/

?  Can I assume that this is safe or is there any trouble to be
expected?

Kind regards

      Andreas.


[1] https://salsa.debian.org/med-team/libsis-jhdf5-java/commit/027e5860855312df1c7bfca17c02c3a143b30980 
[2] https://salsa.debian.org/med-team/libsis-jhdf5-java/blob/use_gradle/debian/patches/use_debian_packaged_libs.patch

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list