Commit c2e7bf8c authored by Andreas Tille's avatar Andreas Tille
Browse files

New upstream version 18.09.0-pre1+dfsg

parent c1b883f0
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -3,19 +3,19 @@
	<classpathentry kind="src" path="source/java"/>
	<classpathentry kind="src" path="sourceExamples/java"/>
	<classpathentry kind="src" path="sourceTest/java"/>
	<classpathentry kind="lib" path="/libraries/commons-lang/commons-lang.jar" sourcepath="/libraries/commons-lang/src.zip"/>
	<classpathentry kind="lib" path="/libraries/commons-io/commons-io.jar" sourcepath="/libraries/commons-io/src.zip"/>
	<classpathentry kind="lib" path="/libraries/cisd-args4j/cisd-args4j.jar"/>
	<classpathentry kind="lib" path="/libraries/restrictionchecker/restrictions.jar"/>
	<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
	<classpathentry kind="lib" path="/libraries/testng/testng-jdk15.jar" sourcepath="/libraries/testng/src.zip"/>
	<classpathentry kind="lib" path="/libraries/jmock/jmock.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/hamcrest/hamcrest-core.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/hamcrest/hamcrest-integration.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/hamcrest/hamcrest-library.jar"/>
	<classpathentry kind="lib" path="/libraries/jmock/objenesis/objenesis-1.0.jar"/>
	<classpathentry kind="lib" path="libs"/>
	<classpathentry kind="lib" path="/libraries/sis-base/sis-base.jar" sourcepath="/libraries/sis-base/sis-base-src.zip"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="lib" path="libs/test/hamcrest-core.jar"/>
	<classpathentry kind="lib" path="libs/test/hamcrest-integration.jar"/>
	<classpathentry kind="lib" path="libs/test/hamcrest-library.jar"/>
	<classpathentry kind="lib" path="libs/test/jmock.jar"/>
	<classpathentry kind="lib" path="libs/test/objenesis-1.0.jar"/>
	<classpathentry kind="lib" path="libs/test/testng-jdk15.jar"/>
	<classpathentry kind="lib" path="libs/build/ecj-4.6.1.jar"/>
	<classpathentry kind="lib" path="libs/prod/cisd-args4j-9.11.2.jar" sourcepath="libs/prod/cisd-args4j-9.11.2-sources.jar"/>
	<classpathentry kind="lib" path="libs/prod/commons-lang3-3.7.jar" sourcepath="libs/prod/commons-lang3-3.7-sources.jar"/>
	<classpathentry kind="lib" path="libs/prod/commons-io-2.6.jar" sourcepath="libs/prod/commons-io-2.6-sources.jar"/>
	<classpathentry kind="lib" path="libs/prod/sis-base-18.08.0.jar" sourcepath="libs/prod/sis-base-18.08.0-sources.jar"/>
	<classpathentry kind="output" path="targets/classes"/>
</classpath>
+1 −0
Original line number Diff line number Diff line
@@ -7,3 +7,4 @@
/test-output
/source/c/build
source/c/hdf5*tar*
source/c/CMake*zip
+102 −189
Original line number Diff line number Diff line
apply from: 'javaproject.gradle'

group='sis'
sourceCompatibility='1.8'
targetCompatibility='1.8'

dependencies {
    compile 'cisd:cisd-args4j:+',
            'cisd:cisd-base:+',
            'rinn:restrictions:+'
    
    testCompile 'testng:testng:+',
                'jmock:jmock:+'
    compile fileTree(dir: 'libs/prod', include: '*.jar')
    testCompile fileTree(dir: 'libs/test', include: '*.jar')
}

tasks.withType(Test) {
    systemProperty "java.library.path", "libs/native/jhdf5/amd64-Linux:libs/native/jhdf5/amd64-Linux:libs/native/jhdf5/x86_64-Mac OS X:libs/native/jhdf5/x86_64-Mac OS X"
}

// Eclipse Gradle plugin always uses the default JRE, so we need to explicitly set it to 1.7.
// (https://issues.gradle.org/browse/GRADLE-3100)
eclipse {
    classpath {
         containers.remove('org.eclipse.jdt.launching.JRE_CONTAINER')
         containers 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7'
    }
}

jar {
    baseName "${project.group}-jhdf5-core"
    from (sourceSets.main.output.classesDir) { 
        exclude('ch/systemsx/cisd/hdf5/h5ar') 
        exclude('ch/systemsx/cisd/hdf5/io')
    }
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.BuildAndEnvironmentInfo'
        attributes 'Class-Path': configurations.runtime.collect { it.getName() }.join(' ')
    }
    
}

task nativeJarLinuxIntel(type: Jar) {
    archiveName 'hdf5-linux-intel.jar'
    from ("libs") {
        include 'native/jhdf5/amd64-Linux/**/*'
        include 'native/jhdf5/arm-Linux/**/*'
    }
    
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
}

task nativeJarMacIntel(type: Jar) {
    archiveName 'hdf5-macosx-intel.jar'
    from ("libs") {
        include 'native/jhdf5/x86_64-Mac OS X/**/*'
    }
    
    from('targets/dist') {
        include 'BUILD*INFO'
    }    
}

task nativeJarWindowsIntel(type: Jar) {
    archiveName 'hdf5-windows-intel.jar'
    from ("libs") {
        include 'native/jhdf5/amd64-Windows/**/*'
    }
    
    baseName "${project.group}-jhdf5"
    from('targets/dist') {
        include 'BUILD*INFO'
    }
}

task toolsJar(type: Jar, dependsOn: [compileJava]) {
    baseName "${project.group}-jhdf5-tools"
    from (sourceSets.main.output.classesDir) {
        include('ch/systemsx/cisd/hdf5/h5ar/**/*') 
        include('ch/systemsx/cisd/hdf5/io/**/*') 
    }

    from('targets/dist') {
        include 'BUILD*INFO'
    from ("libs/") {
        include 'native/jhdf5/**/**/*'
    }

    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.h5ar.HDF5ArchiverMain'
        attributes 'Class-Path': configurations.runtime.collect { it.getName() }.join(' ') + " ${project.group}-jhdf5-core.jar " + [nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel].collect {it.archiveName}.join(' ')
        attributes 'Class-Path': configurations.runtime.collect { it.getName().contains("-sources") ? "" : it.getName() + " " }.join('')
    }
}

task allJar(type: Jar, dependsOn: [compileJava]) {
sourcesJar {
    baseName "${project.group}-jhdf5"

    from (sourceSets.main.output.classesDir) {
        include '**/*'
    }

    from (configurations.runtime.collect {zipTree(it)}) {
        exclude 'native/**/*'
        exclude 'BUILD-*.INFO'
    }

    from('targets/dist') {
        include 'BUILD*INFO'
    }    
    
    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.h5ar.HDF5ArchiverMain'
        attributes 'Class-Path': [nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel].collect {it.archiveName}.join(' ')
    }
}


task batteriesIncluded(type: Jar, dependsOn: [allJar, nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel]) {
    archiveName "${project.group}-jhdf5-batteries_included.jar"
    from (zipTree(allJar.archivePath)) {
        include '**/*'
    }
    
    from (configurations.runtime.collect {zipTree(it)}) {
        include 'native/**/*'
    }

    from (zipTree(nativeJarLinuxIntel.archivePath)) {
        include 'native/**/*'
    }
    from (zipTree(nativeJarMacIntel.archivePath)) {
        include 'native/**/*'
    }
    from (zipTree(nativeJarWindowsIntel.archivePath)) {
        include 'native/**/*'
    from ("targets/dist") {
        include "BUILD-jhdf5.INFO"
    }

    manifest {
        attributes 'Main-Class': 'ch.systemsx.cisd.hdf5.h5ar.HDF5ArchiverMain'
    }
}

task myJavadoc(type: Javadoc) {
	source = [ sourceSets.main.allJava, "base-src" ]
	classpath = configurations.compile
task myJavadoc(type: Javadoc, dependsOn: [compileJava]) {
	source = [ sourceSets.main.allJava, "base-sources" ]
	classpath = files(sourceSets.main.output.classesDir) + fileTree(dir: 'libs/prod', include: '*.jar') + files("libs/build/restrictions-1.0.2.jar")
	options.memberLevel = JavadocMemberLevel.PUBLIC
	options.overview = "overview.html"
	include "ch/systemsx/cisd/hdf5/**"
@@ -159,13 +54,24 @@ task myJavadoc(type: Javadoc) {
	exclude "ch/systemsx/cisd/hdf5/ReflectionUtils.java"
}

task javadocZip(type: Zip, dependsOn: myJavadoc) {
    archiveName "${project.group}-jhdf5-javadoc.zip"
task javadocJar(type: Jar, dependsOn: myJavadoc) {
    archiveName "${project.group}-jhdf5-javadoc-${project.version}.jar"
    from javadoc.destinationDir
    from ("sourceExamples/java") {
        include '**/*'
    }
    from ("dist/doc") {
        include 'JHDF5.pdf'
    }

task exampleZip(type: Jar) {
    archiveName "${project.group}-jhdf5-examples-src.zip"
    from ("targets/dist") {
        include "BUILD-jhdf5.INFO"
    }

}

task exampleJar(type: Jar) {
    baseName "${project.group}-jhdf5-examples-sources"

    from ("sourceExamples/java") {
        include '**/*'
@@ -174,78 +80,101 @@ task exampleZip(type: Jar) {
    from ("targets/dist") {
        include "BUILD-jhdf5.INFO"
    }
}

task distributionZip(type: Zip, dependsOn: [jar, toolsJar, allJar, nativeJarLinuxIntel, nativeJarMacIntel, nativeJarWindowsIntel, batteriesIncluded, javadocZip, sourcesJar, exampleZip]) {
    baseName "${project.group}-jhdf5"

    from (jar.archivePath) {
        into "${project.group}-jhdf5/lib"
        rename '(.*)', "${project.group}-jhdf5-core.jar"
}

    from (toolsJar.archivePath) {
        into "${project.group}-jhdf5/lib"
        rename '(.*)', "${project.group}-jhdf5-tools.jar"
def execute(command, arguments) {
    new ByteArrayOutputStream().withStream { os ->
        print "execute: ${command}"
        arguments.collect({print " ${it}"})
        println ''
        def result = exec {
            executable = command
            args = arguments
            standardOutput = os
        }
        return os.toString().split('\n')
    }
}

    from (allJar.archivePath) {
        into "${project.group}-jhdf5/lib"
        rename '(.*)', "${project.group}-jhdf5.jar"
task processDistFiles( type: Copy) {
    into "$buildDir/output/dist"

    from ("dist") {
        exclude 'doc/JHDF5.odt'
    }

    from (configurations.runtime) {
        exclude '*restriction*'
        exclude '*bcel*'
        into "${project.group}-jhdf5/lib"
    from ("dist") {
        include 'doc/JHDF5.odt'
        rename { "JHDF5-${version}.odt" }
    }

    from (zipTree(batteriesIncluded.archivePath)) {
        into "${project.group}-jhdf5/lib"
        include 'native/**'
   doLast {
        execute('lowriter', [ '--headless', '--convert-to', 'pdf', '--outdir', "$buildDir/output/dist/doc", "$buildDir/output/dist/doc/JHDF5-${version}.odt" ])
   }

    from (nativeJarLinuxIntel.archivePath) {
        into "${project.group}-jhdf5/lib/nativejar"
}

    from (nativeJarMacIntel.archivePath) {
        into "${project.group}-jhdf5/lib/nativejar"
task distributionZip(type: Zip, dependsOn: [jar, javadocJar, sourcesJar, exampleJar, processDistFiles]) {
    baseName "${project.group}-jhdf5"

    from('targets/dist') {
        into "${project.group}-jhdf5"
        include 'version.txt'
        include 'build.txt'
    }

    from (nativeJarWindowsIntel.archivePath) {
        into "${project.group}-jhdf5/lib/nativejar"
    from ("$buildDir/output/dist") {
        into "${project.group}-jhdf5"
        include '*'
    }

    from (batteriesIncluded.archivePath) {
        into "${project.group}-jhdf5/lib/batteries_included"
    from ("$buildDir/output/dist") {
        into "${project.group}-jhdf5"
        include 'bin/*'
    }

    from ("dist") {
    from ("$buildDir/output/dist") {
        into "${project.group}-jhdf5"
        include 'doc/*'
    }

    from (javadocZip.archivePath) {
    from (javadocJar.archivePath) {
        into "${project.group}-jhdf5/doc"
    }
   
    from (exampleZip.archivePath) {
    from (exampleJar.archivePath) {
        into "${project.group}-jhdf5/doc"
    }

    from (configurations.runtime) {
        include '*-sources*'
        into "${project.group}-jhdf5/sources"
    }

    from (sourcesJar.archivePath) {
        into "${project.group}-jhdf5/src"
        rename '(.*)', "${project.group}-jhdf5-src.zip"
        into "${project.group}-jhdf5/sources"
    }

	// BR 2014-06-09:
	// This is a workaround for an issue in Gradle: if one of entries from a jar file gets extraced read-only, 
	// overwriting it in a subsequent run will fail. It should be fixed in a future version of Gradle.
	// See http://forums.gradle.org/gradle/topics/ziptree_unable_to_overwrite_temporary_read_only_files 
    doLast {
        exec {
            commandLine = "chmod -R u+w $buildDir/tmp/expandedArchives".tokenize()
    from (jar.archivePath) {
        into "${project.group}-jhdf5/lib"
    }

    from (configurations.runtime) {
        exclude '*restriction*'
        exclude '*bcel*'
        exclude '*-sources*'
        into "${project.group}-jhdf5/lib"
    }
    
    from ("libs") {
        into "${project.group}-jhdf5/lib"
        include 'native/**'
    }

    from (configurations.runtime.collect {zipTree(it)}) {
        into "${project.group}-jhdf5/lib"
        include 'native/**/*'
    }

}
@@ -258,22 +187,6 @@ if (project == project.rootProject)
                module "${project.group}-jhdf5"
                revision project.revisionForPublication
                from components.java
                artifact(toolsJar) {
                    name = "${project.group}-jhdf5-tools"
                    conf = "runtime"
                }
                artifact(nativeJarLinuxIntel) {
                    name = "hdf5-linux-intel"
                    conf = "runtime"
                }
                artifact(nativeJarMacIntel) {
                    name = "hdf5-macosx-intel"
                    conf = "runtime"
                }
                artifact(nativeJarWindowsIntel) {
                    name = "hdf5-windows-intel"
                    conf = "runtime"
                }
                artifact(sourcesJar) {
                    type = "source"
                }
+53 −37
Original line number Diff line number Diff line
Documentation
  doc/jhdf5-javadoc.zip
General Information:
  build.txt
    The build information of this distribution in human readable form.
  version.txt
    The version information of this distribution in machine readable form.
  CONTENT
    This file.
  COPYING
    Copyright notice of the JHDF5 and the SIS base libraries.
  COPYING-hdf5
    Copyright notice of the HDF5 library.
  COPYING-commons
    Copyright notice of the Apache "Commons IO" and "Commons Lang3" libraries.
  COPYING-args4j
    Copyright notice of the CISD args4j library.
  LICENSE
    The Apache Sofware License 2.0.

  doc/cisd-jhdf5-examples-src.zip
    Example programs for some of the features of JHDF5
Documentation:
  doc/sis-jhdf5-javadoc-<VERSION>.jar
    The Javadoc of JHDF5.
  
Source
  src/jhdf5-src.zip
  doc/sis-jhdf5-examples-sources-<VERSION>.jar
    Simple example programs showing some features of JHDF5.

Library
  lib/cisd-jhdf5-core.jar: 
    The Java class files of the JHDF5 library. Requires commons-io.jar, commons-lang.jar and  
    cisd-base.jar on the class path. Requires the native libraries to be provided separately (see 
    below at lib/native).
  doc/JHDF5-<VERSION>.pdf
     A simple (and incomplete) introduction into JHDF5 (in Portable Document Format).

  lib/cisd-jhdf5-tools.jar: 
    The Java class files of the h5ar archiver. It can be used like 'java -jar cisd-jhdf5-tools.jar'. 
    Requires commons-io.jar, commons-lang.jar, cisd-base.jar, cisd-args4j.jar and cisd-jhdf5-core.jar in 
    the class path. Requires the native libraries to be provided separately (see below at lib/native).
  doc/JHDF5-<VERSION>.odt
     A simple (and incomplete) introduction into JHDF5 (in OpenDocument Text Format).

  lib/cisd-jhdf5.jar: 
    All Java class files packaged in one jar file. Requires the native libraries to be provided 
    separately. 

  lib/batteries_included:
    Includes all Java class files of the JHDF5 library and the h5ar archiver and all native 
    libraries necessary to use JHDF5.
    No other file is needed when using one of these jar files. 

	  All supported platforms:
	    lib/batteries_included/cisd-jhdf5-batteries_included_lin_win_mac_sol.jar 
	  
	  Linux/MacOS X/Windows, but no Solaris support: 
	    lib/batteries_included/cisd-jhdf5-batteries_included_lin_win_mac.jar
Source Code:
  sources/jhdf5-sources-<VERSION>.jar
    The source code of jhdf5.
  sources/sis-base-18.08.0-sources.jar
    The source code of the SIS base library.
  sources/cisd-args4j-9.11.2-sources.jar
    The source code of the CISD args4j library.
  sources/commons-io-2.6-sources.jar
    The source code of the Apache "Commons IO" library.
  sources/commons-lang3-3.7-sources.jar
    The source code of the Apache "Commons Lang3" library.
  
Libraries:
  lib/sis-jhdf5.jar: 
    The Java class files of the JHDF5 library, the h5ar archiver and the hdf5 native libraries. 
    Requires commons-io-2.6.jar, commons-lang3-3.7.jar, sis-base-18.08.0.jar and cisd-args4j-9.11.2 
    (only needed for h5ar archiver) on the class path. 
  lib/sis-base-18.08.0.jar
    The Java class files of the SIS base library. Requires commons-io-2.6.jar, commons-lang3-3.7.jar
    on the class path.
  lib/cisd-args4j-9.11.2.jar
    The Java class files of the CISD args4j library.
  lib/commons-lang3-3.7.jar
    The Java class files of the Apache "Commons Lang3" library.
  lib/commons-io-2.6.jar
    The Java class files of the Apache "Commons IO" library.
  lib/native:
    The native libraries as files in folders jhdf5 and unix. In order to use them ensure that you 
    point the Java property native.libpath to the root of this hierarchy,
    e.g.: "-Dnative.libpath=/home/joe/lib/native"

  lib/nativejar:
    The jar files in this folder contain the native libraries for each platform, e.g. 
    hdf5-linux-intel.jar has the shared libraries for Linux on Intel/AMD. Note that these jar 
    files do not contain the Java class files. In order to make use of these jar files you need
    to ensure that the file for your platform is in the class path of the jre.
 
Wrapper
Wrapper Executables:
  bin/h5ar.sh:
    A script that calls h5ar by invoking the JRE with appropriate parameters. Suitable for being 
    symlinked to e.g. /usr/local/bin
+1 −1
Original line number Diff line number Diff line
/*
 * Copyright 2008-2012 ETH Zuerich, CISD
 * Copyright 2007 - 2018 ETH Zuerich, CISD and SIS.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
Loading