[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to replace eclipse compiler in libsis-jhdf5-java

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;



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

Kind regards


[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


Reply to: