├── .github ├── build.sh ├── exit.sh ├── setup.sh └── workflows │ ├── build.yml │ └── release.yml ├── .gitignore ├── .mailmap ├── README.md ├── SNAPSHOTS.md ├── UNLICENSE ├── gradle-scijava ├── build.gradle.kts ├── gradle.bat ├── gradle │ └── wrapper │ │ ├── gradle-wrapper.jar │ │ └── gradle-wrapper.properties ├── gradlew └── settings.gradle.kts ├── non-maven ├── README.md ├── base-18.09.0.pom ├── jhdf5-14.12.6.pom ├── jhdf5-19.04.0.pom ├── jhdf5-19.04.1.pom ├── omero-client-4.4.8-452-cbe42bc-ice34-b326.pom ├── omero-client-4.4.8p1-ice33-b304.pom └── omero-client-5.0.0-beta1-256-019d14a-ice34-b3523.pom ├── pom.xml ├── rules.xml ├── settings.xml ├── tests ├── filter-build-log.py ├── generate-mega-melt.py ├── mega-melt-template.xml └── run.sh └── whatsnew.sh /.github/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Discern whether this is a release build. 4 | releasing= 5 | if [ -f release.properties ]; then 6 | releasing=1 7 | fi 8 | 9 | # Run the SciJava CI build script. 10 | curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-build.sh && 11 | sh ci-build.sh || { echo "Maven build failed. Skipping melting pot tests."; exit 1; } 12 | 13 | # Skip melting pot if cutting a release. 14 | if [ "$releasing" ]; then 15 | exit 0 16 | fi 17 | 18 | # Helper method to get the last cache modified date as seconds since epoch 19 | last_cache_modified() { 20 | find "$HOME/.cache/scijava/melting-pot" -type f | while read f 21 | do 22 | stat -c '%Y' "$f" 23 | done | sort -nr 2>/dev/null | head -n1 24 | } 25 | 26 | # Record the last time of cache modification before running melting-pot 27 | cache_modified_pre=0 28 | cache_modified_post=0 29 | 30 | if [ -d "$HOME/.cache/scijava/melting-pot" ]; then 31 | cache_modified_pre=$(last_cache_modified) 32 | fi 33 | 34 | # run melting-pot 35 | tests/run.sh 36 | meltResult=$? 37 | 38 | # Record the last time of cache modification after running melting-pot 39 | if [ -d "$HOME/.cache/scijava/melting-pot" ]; then 40 | cache_modified_post=$(last_cache_modified) 41 | fi 42 | 43 | # Determine if cache needs to be re-generated 44 | echo "cache_modified_pre=$cache_modified_pre" 45 | echo "cache_modified_post=$cache_modified_post" 46 | if [ "$cache_modified_post" -gt "$cache_modified_pre" ]; then 47 | echo "cacheChanged=true" 48 | echo "cacheChanged=true" >> $GITHUB_ENV 49 | else 50 | echo "cacheChanged=false" 51 | echo "cacheChanged=false" >> $GITHUB_ENV 52 | fi 53 | 54 | # NB: This script exits 0, but saves the exit code for a later build step. 55 | echo $meltResult > exit-code 56 | -------------------------------------------------------------------------------- /.github/exit.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | test -f exit-code || { 3 | echo "[ERROR] No build exit code was saved!" 4 | exit 255 5 | } 6 | exitCode=$(cat exit-code) 7 | rm -f exit-code 8 | exit $exitCode 9 | -------------------------------------------------------------------------------- /.github/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-setup-github-actions.sh 3 | sh ci-setup-github-actions.sh 4 | 5 | # Install needed packages. 6 | pkgs="libxml2-utils" # needed for melting pot 7 | pkgs="$pkgs libxcb-shape0" # org.janelia:H5J_Loader_Plugin (fiji/H5J_Loader_Plugin@d026a1bb) 8 | pkgs="$pkgs libgtk2.0-0" # net.imagej:imagej-opencv (imagej/imagej-opencv@21113e08) 9 | pkgs="$pkgs libblosc1" # org.janelia.saalfeldlab:n5-blosc 10 | sudo apt-get update 11 | sudo apt-get -y install $(echo "$pkgs") 12 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: build 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | pull_request: 8 | branches: 9 | - master 10 | schedule: 11 | - cron: "4 5 * * 0" # every Sunday at 0405, to keep cache alive 12 | 13 | jobs: 14 | build: 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v2 19 | - name: Set up Java 20 | uses: actions/setup-java@v3 21 | with: 22 | java-version: '8' 23 | java-package: 'jdk+fx' 24 | distribution: 'zulu' 25 | cache: 'maven' 26 | 27 | - name: Set up CI environment 28 | run: .github/setup.sh 29 | 30 | - name: Restore the melting-pot cache 31 | id: restore-cache 32 | uses: actions/cache/restore@v3 33 | with: 34 | path: ~/.cache/scijava/melting-pot 35 | key: ${{ runner.os }}-cache 36 | 37 | - name: Execute the build 38 | id: execute-build 39 | run: .github/build.sh 40 | env: 41 | GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} 42 | GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 43 | MAVEN_USER: ${{ secrets.MAVEN_USER }} 44 | MAVEN_PASS: ${{ secrets.MAVEN_PASS }} 45 | OSSRH_USER: ${{ secrets.OSSRH_USER }} 46 | OSSRH_PASS: ${{ secrets.OSSRH_PASS }} 47 | SIGNING_ASC: ${{ secrets.SIGNING_ASC }} 48 | 49 | - name: Delete the melting-pot cache 50 | if: env.cacheChanged == 'true' 51 | id: delete-cache 52 | run: | 53 | gh api --method DELETE -H "Accept: application/vnd.github+json" /repos/scijava/pom-scijava/actions/caches?key=${{ runner.os }}-cache || true 54 | env: 55 | GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} 56 | 57 | - name: Save the melting-pot cache 58 | if: env.cacheChanged == 'true' 59 | id: save-cache 60 | uses: actions/cache/save@v3 61 | with: 62 | path: ~/.cache/scijava/melting-pot 63 | key: ${{ runner.os }}-cache 64 | 65 | - name: Return the exit code 66 | id: exit-build 67 | run: .github/exit.sh 68 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: release 2 | 3 | on: 4 | push: 5 | tags: 6 | - "*-[0-9]+.*" 7 | 8 | jobs: 9 | build: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v2 14 | - name: Set up Java 15 | uses: actions/setup-java@v3 16 | with: 17 | java-version: '8' 18 | java-package: 'jdk+fx' 19 | distribution: 'zulu' 20 | cache: 'maven' 21 | 22 | - name: Set up CI environment 23 | run: .github/setup.sh 24 | 25 | - name: Execute the build 26 | id: execute-build 27 | run: .github/build.sh 28 | env: 29 | GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} 30 | GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} 31 | MAVEN_USER: ${{ secrets.MAVEN_USER }} 32 | MAVEN_PASS: ${{ secrets.MAVEN_PASS }} 33 | OSSRH_USER: ${{ secrets.OSSRH_USER }} 34 | OSSRH_PASS: ${{ secrets.OSSRH_PASS }} 35 | SIGNING_ASC: ${{ secrets.SIGNING_ASC }} 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.idea/ 2 | /.project 3 | /.settings/ 4 | /gradle-scijava/.gradle/ 5 | /target/ 6 | -------------------------------------------------------------------------------- /.mailmap: -------------------------------------------------------------------------------- 1 | Deborah Schmidt 2 | ImageJ Jenkins 3 | Jan Eglinger 4 | Johannes Schindelin 5 | Karl Duderstadt 6 | Lorenzo Scianatico 7 | Mark Hiner 8 | Nicolas Chiaruttini 9 | Philipp Hanslovsky 10 | Stefan Helfrich 11 | Tiago Ferreira 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![](https://img.shields.io/maven-central/v/org.scijava/pom-scijava.svg)](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22org.scijava%22%20AND%20a%3A%22pom-scijava%22) 2 | [![](https://github.com/scijava/pom-scijava/actions/workflows/build.yml/badge.svg)](https://github.com/scijava/pom-scijava/actions/workflows/build.yml) 3 | 4 | This POM provides a parent from which SciJava-based projects can declare their build configurations. It ensures that projects all use a compatible build environment, as well as versions of dependencies and plugins. Projects extending this POM inherit the unified SciJava [Bill of Materials](https://imagej.net/develop/architecture#bill-of-materials): component versions which have been tested to work together. 5 | 6 | This POM serves as the base for all Maven-based SciJava software, including: 7 | 8 | | Fiji | ImageJ2 | ImgLib2 | KNIME | LOCI | SCIFIO | SciJava | FLIMLib | Virtual Cell | 9 | |:----:|:-------:|:-------:|:-----:|:----:|:------:|:-------:|:----------:|:------------:| 10 | | [![Fiji](https://scijava.org/icons/fiji-icon-64.png)](https://github.com/fiji) | [![ImageJ2](https://scijava.org/icons/imagej2-icon-64.png)](https://github.com/imagej) | [![ImgLib2](https://scijava.org/icons/imglib2-icon-64.png)](https://github.com/imglib) | [![KNIME](https://scijava.org/icons/knime-icon-64.png)](https://knime.org) | [![LOCI](https://scijava.org/icons/loci-icon-64.png)](https://github.com/uw-loci) | [![SCIFIO](https://scijava.org/icons/scifio-icon-64.png)](https://github.com/scifio) | [![SciJava](https://scijava.org/icons/scijava-icon-64.png)](https://github.com/scijava) | [![FLIMLib](https://scijava.org/icons/flimlib-icon-64.png)](https://github.com/flimlib) | [![Virtual Cell](https://scijava.org/icons/vcell-icon-64.png)](https://github.com/virtualcell) | 11 | 12 | This POM is intended for use as the parent of your own Maven-based code. 13 | 14 | ## Examples 15 | 16 | * [ImageJ2 command template](https://github.com/imagej/example-imagej-command) 17 | * [ImageJ 1.x plugin template](https://github.com/imagej/example-legacy-plugin) 18 | * [ImageJ2 tutorials](https://github.com/imagej/tutorials/tree/master/maven-projects) 19 | 20 | ## Documentation 21 | 22 | The pom-scijava wiki contains articles on several topics: 23 | 24 | * [Adding a new project to the SciJava POM](https://github.com/scijava/pom-scijava/wiki/Adding-a-new-project-to-the-SciJava-POM) 25 | * [Addressing dependency clash](https://github.com/scijava/pom-scijava/wiki/Addressing-dependency-clash) 26 | * [Versioning of SciJava projects](https://github.com/scijava/pom-scijava/wiki/Versioning-of-SciJava-projects) 27 | 28 | ## Getting help with Maven 29 | 30 | For more information about Maven, see: 31 | 32 | * [ImageJ Maven overview](https://imagej.net/develop/maven) 33 | * [ImageJ Maven FAQ](https://imagej.net/develop/maven-faq) 34 | 35 | ## Troubleshooting 36 | 37 | * [Setting empty metadata fields](https://github.com/scijava/pom-scijava-base#how-to-override-a-field-with-an-empty-value) 38 | -------------------------------------------------------------------------------- /SNAPSHOTS.md: -------------------------------------------------------------------------------- 1 | So, you want to run the mega-melt, but with some SNAPSHOTs built from branches? 2 | 3 | Change the `components=` section of `tests/run.sh script` to include 4 | your changed components, as documented in the comment block there! 5 | -------------------------------------------------------------------------------- /UNLICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /gradle-scijava/build.gradle.kts: -------------------------------------------------------------------------------- 1 | import groovy.xml.XmlSlurper 2 | import groovy.xml.slurpersupport.GPathResult 3 | import groovy.xml.slurpersupport.NodeChild 4 | import java.io.ByteArrayOutputStream 5 | 6 | plugins { 7 | `java-platform` 8 | `version-catalog` 9 | `maven-publish` 10 | // id("org.gradlex.java-ecosystem-capabilities-base") // only rules 11 | // id("org.gradlex.logging-capabilities") // logging extension 12 | } 13 | 14 | layout.buildDirectory = layout.projectDirectory.asFile.parentFile.resolve("target/gradle") 15 | 16 | group = "org.scijava" 17 | version = File("../pom.xml") 18 | .readText() 19 | .substringAfter("pom-scijava<") 20 | .substringAfter("") 21 | .substringBefore('<') 22 | 23 | javaPlatform { 24 | allowDependencies() 25 | } 26 | 27 | val computeCatalogAndPlatform = tasks.register("generateCatalog") { 28 | 29 | workingDir = projectDir.parentFile 30 | commandLine("sh", "-c", "mvn -B -Dfile.encoding=UTF-8 -f pom.xml help:effective-pom") 31 | standardOutput = ByteArrayOutputStream() 32 | 33 | doLast { 34 | var output = standardOutput.toString() 35 | // Remove leading/trailing maven output from pom.xml 36 | output = output 37 | .substringAfter("Effective POMs, after inheritance, interpolation, and profiles are applied:") 38 | .substringBefore("[INFO]") 39 | .trim() 40 | 41 | operator fun GPathResult.div(child: String) = children().find { (it!! as NodeChild).name() == child } as GPathResult 42 | 43 | val xml = XmlSlurper().parseText(output) 44 | val deps = xml / "dependencyManagement" / "dependencies" 45 | val bundles = mutableMapOf>() 46 | val skip = listOf("mpicbg" to "mpicbg_") 47 | val cache = mutableSetOf() // skip duplicates, such as org.bytedeco:ffmpeg 48 | for (dep in deps.children()) { 49 | val node = dep as NodeChild 50 | val g = node / "groupId" 51 | val a = node / "artifactId" 52 | val v = node / "version" 53 | val gav = "$g:$a:$v" 54 | 55 | if (("$g" to "$a") in skip || gav in cache) 56 | continue 57 | 58 | cache += gav 59 | 60 | val camel = "$a".split('-', '_') 61 | .joinToString("") { if (it.isEmpty()) "" else it[0].uppercase() + it.substring(1).lowercase() } 62 | .replaceFirstChar { it.lowercase() } 63 | 64 | fun getAlias(group: String): String { 65 | val alias = "$group." + when { 66 | camel.startsWith(group) -> camel.substringAfter(group).replaceFirstChar { it.lowercase() }.ifEmpty { group } 67 | else -> camel 68 | } 69 | bundles.getOrPut(group, ::ArrayList) += alias 70 | return alias 71 | } 72 | 73 | val lastWordAsGroup = listOf("org.scijava", "net.imagej", "net.imglib2", "sc.fiji", "org.janelia.saalfeldlab") 74 | val alias = when ("$g") { 75 | in lastWordAsGroup -> getAlias(g.toString().substringAfterLast('.')) 76 | "io.scif" -> getAlias("scifio") 77 | else -> "$g.$camel" 78 | } 79 | 80 | catalog.versionCatalog { library(alias, gav) } 81 | 82 | dependencies { 83 | constraints { 84 | val ga = "$g:$a" 85 | if (ga in runtimeDeps || jogampNatives.any { it.startsWith(ga) }) 86 | runtime(gav) //.also { println("runtime($dep)") } 87 | else 88 | api(gav) //.also{ println("api($dep)") } 89 | } 90 | } 91 | } 92 | 93 | for ((alias, aliases) in bundles) 94 | catalog.versionCatalog { bundle(alias, aliases) } 95 | } 96 | } 97 | 98 | publishing { 99 | publications { 100 | repositories { 101 | maven { 102 | name = "sciJava" 103 | // credentials(PasswordCredentials::class) 104 | // url = uri("https://maven.scijava.org/content/repositories/releases") 105 | url = uri("repo") 106 | } 107 | } 108 | create("pomScijava") { 109 | from(components["javaPlatform"]) 110 | // from(components["versionCatalog"]) 111 | } 112 | } 113 | } 114 | 115 | val versionCatalogElements by configurations 116 | val javaPlatform by components.existing { 117 | this as AdhocComponentWithVariants 118 | addVariantsFromConfiguration(versionCatalogElements) {} 119 | } 120 | 121 | tasks { 122 | // dependsOn runs only if the src is successful, finalizedBy not 123 | generateCatalogAsToml { dependsOn(computeCatalogAndPlatform) } 124 | val generateMetadataFileForPomScijavaPublication by getting { dependsOn(computeCatalogAndPlatform) } 125 | register("generateCatalogAndPlatform") { dependsOn(generateMetadataFileForPomScijavaPublication, generateCatalogAsToml) } 126 | } 127 | 128 | val runtimeDeps = listOf("org.antlr:antlr-runtime", 129 | "xalan:serializer", 130 | "xalan:xalan", 131 | "com.github.vbmacher:java-cup-runtime", 132 | "nz.ac.waikato.cms.weka.thirdparty:java-cup-11b-runtime", 133 | "org.jogamp.gluegen:gluegen-rt-main", 134 | "org.jogamp.gluegen:gluegen-rt", 135 | "org.jogamp.joal:joal", 136 | "org.jogamp.jocl:jocl", 137 | "org.jogamp.jogl:jogl-all-main", 138 | "org.jogamp.jogl:jogl-all", 139 | "org.jogamp.jogl:jogl-all-noawt", 140 | "com.nativelibs4java:bridj", 141 | "org.bytedeco:ffmpeg", 142 | "org.bytedeco:hdf5", 143 | "org.bytedeco:leptonica", 144 | "org.bytedeco:openblas", 145 | "org.bytedeco:opencv", 146 | "org.bytedeco:tesseract", 147 | "org.jline:jline-native", 148 | "com.github.jnr:jffi", 149 | "org.jzy3d:jzy3d-native-jogl-awt", 150 | "org.jzy3d:jzy3d-native-jogl-swing") 151 | 152 | val jogampNatives = listOf("org.jogamp.gluegen:gluegen-rt-natives-", 153 | "org.jogamp.jogl:jogl-all-natives-", 154 | "org.jogamp.gluegen:gluegen-rt-natives-", 155 | "org.jogamp.jogl:jogl-all-natives-") 156 | -------------------------------------------------------------------------------- /gradle-scijava/gradle.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%" == "" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%" == "" set DIRNAME=. 29 | set APP_BASE_NAME=%~n0 30 | set APP_HOME=%DIRNAME% 31 | 32 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 33 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 34 | 35 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 36 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 37 | 38 | @rem Find java.exe 39 | if defined JAVA_HOME goto findJavaFromJavaHome 40 | 41 | set JAVA_EXE=java.exe 42 | %JAVA_EXE% -version >NUL 2>&1 43 | if "%ERRORLEVEL%" == "0" goto execute 44 | 45 | echo. 46 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 47 | echo. 48 | echo Please set the JAVA_HOME variable in your environment to match the 49 | echo location of your Java installation. 50 | 51 | goto fail 52 | 53 | :findJavaFromJavaHome 54 | set JAVA_HOME=%JAVA_HOME:"=% 55 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 56 | 57 | if exist "%JAVA_EXE%" goto execute 58 | 59 | echo. 60 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 61 | echo. 62 | echo Please set the JAVA_HOME variable in your environment to match the 63 | echo location of your Java installation. 64 | 65 | goto fail 66 | 67 | :execute 68 | @rem Setup the command line 69 | 70 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 71 | 72 | 73 | @rem Execute Gradle 74 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 75 | 76 | :end 77 | @rem End local scope for the variables with windows NT shell 78 | if "%ERRORLEVEL%"=="0" goto mainEnd 79 | 80 | :fail 81 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 82 | rem the _cmd.exe /c_ return code! 83 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 84 | exit /b 1 85 | 86 | :mainEnd 87 | if "%OS%"=="Windows_NT" endlocal 88 | 89 | :omega 90 | -------------------------------------------------------------------------------- /gradle-scijava/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scijava/pom-scijava/1e06f89495359eddfe12184978cd7e7804d33e57/gradle-scijava/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle-scijava/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /gradle-scijava/gradlew: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # Copyright © 2015-2021 the original authors. 5 | # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); 7 | # you may not use this file except in compliance with the License. 8 | # You may obtain a copy of the License at 9 | # 10 | # https://www.apache.org/licenses/LICENSE-2.0 11 | # 12 | # Unless required by applicable law or agreed to in writing, software 13 | # distributed under the License is distributed on an "AS IS" BASIS, 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | # See the License for the specific language governing permissions and 16 | # limitations under the License. 17 | # 18 | 19 | ############################################################################## 20 | # 21 | # Gradle start up script for POSIX generated by Gradle. 22 | # 23 | # Important for running: 24 | # 25 | # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is 26 | # noncompliant, but you have some other compliant shell such as ksh or 27 | # bash, then to run this script, type that shell name before the whole 28 | # command line, like: 29 | # 30 | # ksh Gradle 31 | # 32 | # Busybox and similar reduced shells will NOT work, because this script 33 | # requires all of these POSIX shell features: 34 | # * functions; 35 | # * expansions «$var», «${var}», «${var:-default}», «${var+SET}», 36 | # «${var#prefix}», «${var%suffix}», and «$( cmd )»; 37 | # * compound commands having a testable exit status, especially «case»; 38 | # * various built-in commands including «command», «set», and «ulimit». 39 | # 40 | # Important for patching: 41 | # 42 | # (2) This script targets any POSIX shell, so it avoids extensions provided 43 | # by Bash, Ksh, etc; in particular arrays are avoided. 44 | # 45 | # The "traditional" practice of packing multiple parameters into a 46 | # space-separated string is a well documented source of bugs and security 47 | # problems, so this is (mostly) avoided, by progressively accumulating 48 | # options in "$@", and eventually passing that to Java. 49 | # 50 | # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, 51 | # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; 52 | # see the in-line comments for details. 53 | # 54 | # There are tweaks for specific operating systems such as AIX, CygWin, 55 | # Darwin, MinGW, and NonStop. 56 | # 57 | # (3) This script is generated from the Groovy template 58 | # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt 59 | # within the Gradle project. 60 | # 61 | # You can find Gradle at https://github.com/gradle/gradle/. 62 | # 63 | ############################################################################## 64 | 65 | # Attempt to set APP_HOME 66 | 67 | # Resolve links: $0 may be a link 68 | app_path=$0 69 | 70 | # Need this for daisy-chained symlinks. 71 | while 72 | APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path 73 | [ -h "$app_path" ] 74 | do 75 | ls=$( ls -ld "$app_path" ) 76 | link=${ls#*' -> '} 77 | case $link in #( 78 | /*) app_path=$link ;; #( 79 | *) app_path=$APP_HOME$link ;; 80 | esac 81 | done 82 | 83 | APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit 84 | 85 | APP_NAME="Gradle" 86 | APP_BASE_NAME=${0##*/} 87 | 88 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 89 | DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' 90 | 91 | # Use the maximum available, or set MAX_FD != -1 to use that value. 92 | MAX_FD=maximum 93 | 94 | warn () { 95 | echo "$*" 96 | } >&2 97 | 98 | die () { 99 | echo 100 | echo "$*" 101 | echo 102 | exit 1 103 | } >&2 104 | 105 | # OS specific support (must be 'true' or 'false'). 106 | cygwin=false 107 | msys=false 108 | darwin=false 109 | nonstop=false 110 | case "$( uname )" in #( 111 | CYGWIN* ) cygwin=true ;; #( 112 | Darwin* ) darwin=true ;; #( 113 | MSYS* | MINGW* ) msys=true ;; #( 114 | NONSTOP* ) nonstop=true ;; 115 | esac 116 | 117 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar 118 | 119 | 120 | # Determine the Java command to use to start the JVM. 121 | if [ -n "$JAVA_HOME" ] ; then 122 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then 123 | # IBM's JDK on AIX uses strange locations for the executables 124 | JAVACMD=$JAVA_HOME/jre/sh/java 125 | else 126 | JAVACMD=$JAVA_HOME/bin/java 127 | fi 128 | if [ ! -x "$JAVACMD" ] ; then 129 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME 130 | 131 | Please set the JAVA_HOME variable in your environment to match the 132 | location of your Java installation." 133 | fi 134 | else 135 | JAVACMD=java 136 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 137 | 138 | Please set the JAVA_HOME variable in your environment to match the 139 | location of your Java installation." 140 | fi 141 | 142 | # Increase the maximum file descriptors if we can. 143 | if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then 144 | case $MAX_FD in #( 145 | max*) 146 | MAX_FD=$( ulimit -H -n ) || 147 | warn "Could not query maximum file descriptor limit" 148 | esac 149 | case $MAX_FD in #( 150 | '' | soft) :;; #( 151 | *) 152 | ulimit -n "$MAX_FD" || 153 | warn "Could not set maximum file descriptor limit to $MAX_FD" 154 | esac 155 | fi 156 | 157 | # Collect all arguments for the java command, stacking in reverse order: 158 | # * args from the command line 159 | # * the main class name 160 | # * -classpath 161 | # * -D...appname settings 162 | # * --module-path (only if needed) 163 | # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. 164 | 165 | # For Cygwin or MSYS, switch paths to Windows format before running java 166 | if "$cygwin" || "$msys" ; then 167 | APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) 168 | CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) 169 | 170 | JAVACMD=$( cygpath --unix "$JAVACMD" ) 171 | 172 | # Now convert the arguments - kludge to limit ourselves to /bin/sh 173 | for arg do 174 | if 175 | case $arg in #( 176 | -*) false ;; # don't mess with options #( 177 | /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath 178 | [ -e "$t" ] ;; #( 179 | *) false ;; 180 | esac 181 | then 182 | arg=$( cygpath --path --ignore --mixed "$arg" ) 183 | fi 184 | # Roll the args list around exactly as many times as the number of 185 | # args, so each arg winds up back in the position where it started, but 186 | # possibly modified. 187 | # 188 | # NB: a `for` loop captures its iteration list before it begins, so 189 | # changing the positional parameters here affects neither the number of 190 | # iterations, nor the values presented in `arg`. 191 | shift # remove old arg 192 | set -- "$@" "$arg" # push replacement arg 193 | done 194 | fi 195 | 196 | # Collect all arguments for the java command; 197 | # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of 198 | # shell script including quotes and variable substitutions, so put them in 199 | # double quotes to make sure that they get re-expanded; and 200 | # * put everything else in single quotes, so that it's not re-expanded. 201 | 202 | set -- \ 203 | "-Dorg.gradle.appname=$APP_BASE_NAME" \ 204 | -classpath "$CLASSPATH" \ 205 | org.gradle.wrapper.GradleWrapperMain \ 206 | "$@" 207 | 208 | # Use "xargs" to parse quoted args. 209 | # 210 | # With -n1 it outputs one arg per line, with the quotes and backslashes removed. 211 | # 212 | # In Bash we could simply go: 213 | # 214 | # readarray ARGS < <( xargs -n1 <<<"$var" ) && 215 | # set -- "${ARGS[@]}" "$@" 216 | # 217 | # but POSIX shell has neither arrays nor command substitution, so instead we 218 | # post-process each arg (as a line of input to sed) to backslash-escape any 219 | # character that might be a shell metacharacter, then use eval to reverse 220 | # that process (while maintaining the separation between arguments), and wrap 221 | # the whole thing up as a single "set" statement. 222 | # 223 | # This will of course break if any of these variables contains a newline or 224 | # an unmatched quote. 225 | # 226 | 227 | eval "set -- $( 228 | printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | 229 | xargs -n1 | 230 | sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | 231 | tr '\n' ' ' 232 | )" '"$@"' 233 | 234 | exec "$JAVACMD" "$@" 235 | -------------------------------------------------------------------------------- /gradle-scijava/settings.gradle.kts: -------------------------------------------------------------------------------- 1 | rootProject.name = "pom-scijava" -------------------------------------------------------------------------------- /non-maven/README.md: -------------------------------------------------------------------------------- 1 | This folder contains manually created POMs for pre-built binaries 2 | uploaded to maven.scijava.org's thirdparty repository. 3 | -------------------------------------------------------------------------------- /non-maven/base-18.09.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | cisd 6 | base 7 | 18.09.0 8 | 9 | ETH SIS Base Library 10 | Base library supporting JHDF5, among other projects. 11 | 12 | ETH Zurich Scientific IT Services 13 | https://sis.id.ethz.ch/ 14 | 15 | 16 | 17 | Apache 2 18 | https://apache.org/licenses/LICENSE-2.0.txt 19 | repo 20 | 21 | 22 | 23 | 24 | scm:git:https://sissource.ethz.ch/sispub/base 25 | scm:git:https://sissource.ethz.ch/sispub/base 26 | 18.09.0 27 | https://sissource.ethz.ch/sispub/base 28 | 29 | 30 | 31 | 2.7 32 | 3.10 33 | 34 | 35 | 36 | 37 | commons-io 38 | commons-io 39 | ${commons-io.version} 40 | 41 | 42 | org.apache.commons 43 | commons-lang3 44 | ${commons-lang3.version} 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /non-maven/jhdf5-14.12.6.pom: -------------------------------------------------------------------------------- 1 | 2 | 4.0.0 3 | cisd 4 | jhdf5 5 | 14.12.6 6 | 7 | 2.4 8 | 1.4 9 | 10 | 11 | 12 | commons-lang 13 | commons-lang 14 | ${commons-lang.version} 15 | 16 | 17 | commons-io 18 | commons-io 19 | ${commons-io.version} 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /non-maven/jhdf5-19.04.0.pom: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | cisd 6 | jhdf5 7 | 19.04.0 8 | 9 | JHDF5 (HDF5 for Java) 10 | 11 | HDF5 is an efficient, well-documented, non-proprietary binary data format 12 | and library developed and maintained by the HDF Group. The library provided 13 | by the HDF Group is written in C and available under a liberal BSD-style 14 | Open Source software license. It has over 600 API calls and is very powerful 15 | and configurable, but it is not trivial to use. 16 | 17 | JHDF5 is a Java binding for HDF5 focusing on ease-of-use, which was 18 | developed by CISD and is now maintained by ETH SIS. It is available under 19 | the Apache License 2.0. The library contains HDF5 1.10 from the HDF Group 20 | and files created with JHDF5 are fully compatible with HDF 1.10 (or HDF5 1.8 21 | if you initialize the library appropriately). 22 | 23 | https://wiki-bsse.ethz.ch/display/JHDF5/ 24 | 25 | ETH Zurich Scientific IT Services 26 | https://sis.id.ethz.ch/ 27 | 28 | 29 | 30 | Apache 2 31 | https://apache.org/licenses/LICENSE-2.0.txt 32 | repo 33 | 34 | 35 | 36 | 37 | scm:git:https://sissource.ethz.ch/sispub/jhdf5 38 | scm:git:https://sissource.ethz.ch/sispub/jhdf5 39 | 19.04.0 40 | https://sissource.ethz.ch/sispub/jhdf5 41 | 42 | 43 | 44 | 18.09.0 45 | 2.7 46 | 3.10 47 | 48 | 49 | 50 | 51 | cisd 52 | base 53 | ${base.version} 54 | 55 | 56 | commons-io 57 | commons-io 58 | ${commons-io.version} 59 | 60 | 61 | org.apache.commons 62 | commons-lang3 63 | ${commons-lang3.version} 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /non-maven/jhdf5-19.04.1.pom: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | cisd 6 | jhdf5 7 | 19.04.1 8 | 9 | JHDF5 (HDF5 for Java) 10 | 11 | HDF5 is an efficient, well-documented, non-proprietary binary data format 12 | and library developed and maintained by the HDF Group. The library provided 13 | by the HDF Group is written in C and available under a liberal BSD-style 14 | Open Source software license. It has over 600 API calls and is very powerful 15 | and configurable, but it is not trivial to use. 16 | 17 | JHDF5 is a Java binding for HDF5 focusing on ease-of-use, which was 18 | developed by CISD and is now maintained by ETH SIS. It is available under 19 | the Apache License 2.0. The library contains HDF5 1.10 from the HDF Group 20 | and files created with JHDF5 are fully compatible with HDF 1.10 (or HDF5 1.8 21 | if you initialize the library appropriately). 22 | 23 | https://unlimited.ethz.ch/display/JHDF/ 24 | 25 | ETH Zurich Scientific IT Services 26 | https://sis.id.ethz.ch/ 27 | 28 | 29 | 30 | Apache 2 31 | https://apache.org/licenses/LICENSE-2.0.txt 32 | repo 33 | 34 | 35 | 36 | 37 | scm:git:https://sissource.ethz.ch/sispub/jhdf5 38 | scm:git:https://sissource.ethz.ch/sispub/jhdf5 39 | 19.04.1 40 | https://sissource.ethz.ch/sispub/jhdf5 41 | 42 | 43 | 44 | 18.09.0 45 | 2.6 46 | 3.7 47 | 48 | 49 | 50 | 51 | cisd 52 | base 53 | ${base.version} 54 | 55 | 56 | commons-io 57 | commons-io 58 | ${commons-io.version} 59 | 60 | 61 | org.apache.commons 62 | commons-lang3 63 | ${commons-lang3.version} 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /non-maven/omero-client-4.4.8-452-cbe42bc-ice34-b326.pom: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | ome 6 | omero-client 7 | jar 8 | 4.4.8-452-cbe42bc-ice34-b326 9 | http://openmicroscopy.org/ 10 | 11 | 12 | 13 | GPL v2 or later 14 | http://www.gnu.org/licenses/gpl-2.0.txt 15 | repo 16 | 17 | 18 | 19 | 20 | 21 | org.springframework 22 | spring-beans 23 | 3.0.1.RELEASE 24 | 25 | 26 | org.springframework 27 | spring-context 28 | 3.0.1.RELEASE 29 | 30 | 31 | org.springframework 32 | spring-jdbc 33 | 3.0.1.RELEASE 34 | 35 | 36 | org.springframework 37 | spring-orm 38 | 3.0.1.RELEASE 39 | 40 | 41 | org.springframework 42 | spring-tx 43 | 3.0.1.RELEASE 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /non-maven/omero-client-4.4.8p1-ice33-b304.pom: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | ome 6 | omero-client 7 | jar 8 | 4.4.8p1-ice33-b304 9 | http://openmicroscopy.org/ 10 | 11 | 12 | 13 | GPL v2 or later 14 | http://www.gnu.org/licenses/gpl-2.0.txt 15 | repo 16 | 17 | 18 | 19 | 20 | 21 | org.springframework 22 | spring-beans 23 | 3.0.1.RELEASE 24 | 25 | 26 | org.springframework 27 | spring-context 28 | 3.0.1.RELEASE 29 | 30 | 31 | org.springframework 32 | spring-jdbc 33 | 3.0.1.RELEASE 34 | 35 | 36 | org.springframework 37 | spring-orm 38 | 3.0.1.RELEASE 39 | 40 | 41 | org.springframework 42 | spring-tx 43 | 3.0.1.RELEASE 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /non-maven/omero-client-5.0.0-beta1-256-019d14a-ice34-b3523.pom: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | ome 6 | omero-client 7 | jar 8 | 5.0.0-beta1-256-019d14a-ice34-b3523 9 | http://openmicroscopy.org/ 10 | 11 | 12 | 13 | GPL v2 or later 14 | http://www.gnu.org/licenses/gpl-2.0.txt 15 | repo 16 | 17 | 18 | 19 | 20 | 21 | org.springframework 22 | spring-beans 23 | 3.0.1.RELEASE 24 | 25 | 26 | org.springframework 27 | spring-context 28 | 3.0.1.RELEASE 29 | 30 | 31 | org.springframework 32 | spring-jdbc 33 | 3.0.1.RELEASE 34 | 35 | 36 | org.springframework 37 | spring-orm 38 | 3.0.1.RELEASE 39 | 40 | 41 | org.springframework 42 | spring-tx 43 | 3.0.1.RELEASE 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /rules.xml: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 20030911 8 | 3.0b5 9 | 3.0ea8 10 | 11 | 12 | 13 | 14 | .*-(alpha|beta|rc)-?[0-9]+ 15 | 16 | 1\.[34].* 17 | 18 | 19 | 20 | 21 | .*-(alpha|beta|rc)-?[0-9]+ 22 | 23 | 24 | 25 | 26 | .*-android 27 | 28 | 29 | 30 | 31 | .*-(alpha|beta|rc)-?[0-9]+ 32 | 33 | 34 | 35 | 36 | .*-kohsuke-?[0-9]+ 37 | 38 | 39 | 40 | 41 | 45 | ^(?!5\.).* 46 | 47 | 48 | 49 | 50 | .*-(alpha|beta|rc)[-\.]?[0-9]+ 51 | 52 | 53 | 54 | 55 | 59 | ^(?!3\.6\.).* 60 | 61 | 62 | 63 | 64 | [0-9]{8}.* 65 | 66 | 67 | 68 | 69 | 20040117.000000 70 | .*-pre[0-9]+ 71 | 72 | 73 | 74 | 75 | [0-9]{8}.* 76 | 77 | 78 | 79 | 80 | [0-9]{8}.* 81 | 82 | 83 | 84 | 85 | [0-9]{8}.* 86 | 87 | 88 | 89 | 90 | [0-9]{8}.* 91 | 92 | 93 | 94 | 95 | .*-does-not-exist 96 | 97 | 98 | 99 | 100 | 103 | ^(?!1\.8\.0\.).* 104 | 105 | 106 | 107 | 108 | .*[\.-](Alpha|Beta|CR|EDR|PFD|PRD)([0-9]+(\.[0-9]+)*[a-z]?)? 109 | 110 | 111 | 112 | 113 | .*\.M[0-9]+ 114 | 115 | 116 | 117 | 118 | .*-(alpha|beta|rc)-?[0-9]+ 119 | 120 | 121 | 122 | 123 | [0-9]{8} 124 | 125 | 126 | 127 | 128 | .*-m[0-9]+ 129 | 130 | 131 | 132 | 133 | .*-m[0-9]+-.* 134 | 135 | 136 | 137 | 138 | .*-(alpha|beta|rc)-?[0-9]+ 139 | 140 | 141 | 142 | 143 | .*-(alpha|beta|rc)-?[0-9]+ 144 | 145 | 146 | 147 | 148 | .*\.M[0-9]+ 149 | 150 | 151 | 152 | 153 | 157 | ^(?!9\.).* 158 | .*[-\.](alpha|beta|rc)-?[0-9]+ 159 | .*\.RC[0-9]+ 160 | 161 | 162 | 163 | 164 | .*-(Beta|RC)[0-9]* 165 | 166 | 167 | 168 | 169 | 173 | ^(?!1\.4\.).* 174 | 175 | 176 | 177 | 178 | 182 | ^(?!4\.).* 183 | 184 | 185 | 186 | 187 | .*-m[0-9]+ 188 | 189 | 190 | 191 | 192 | .*-(alpha|beta|rc)-?[0-9]+ 193 | 194 | 195 | 196 | 197 | 203 | ^(?!3\.2\.9\.).* 204 | 205 | 206 | 207 | 208 | .*-(alpha|beta|rc)-?[0-9]+ 209 | 210 | 211 | 212 | 213 | 214 | 3D_Objects_Counter-.* 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | scijava-mirror 5 | SciJava public repositories 6 | https://maven.scijava.org/service/local/repo_groups/public/content 7 | * 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/filter-build-log.py: -------------------------------------------------------------------------------- 1 | # 2 | # filter-build-log.py - Cuts out cruft to focus on build failure details. 3 | # 4 | 5 | # This script filters build logs down to only [WARNING] and [ERROR] lines, 6 | # and consolidates lengthy duplicate class listings down to packages only. 7 | 8 | import sys 9 | 10 | def print_filtered_log(log): 11 | dups = [] 12 | parsingdups = False 13 | atbeginning = True 14 | for line in log: 15 | line = line.rstrip('\n') 16 | if line.startswith('[INFO]'): 17 | # Filter out non-error build messages. 18 | continue 19 | if line.startswith('Download') or line.startswith('Progress'): 20 | # Filter out details of remote resource queries. 21 | continue 22 | if atbeginning and not line.strip(): 23 | # Filter out leading blank lines. 24 | continue 25 | atbeginning = False 26 | if parsingdups: 27 | if line.startswith(' '): 28 | if line.find('/') >= 0: 29 | # Strip to containing package only. 30 | line = line[:line.rindex('/')] 31 | dups.append(line) 32 | else: 33 | parsingdups = False 34 | for dup in sorted(set(dups)): 35 | print(dup) 36 | print('') 37 | dups = [] 38 | else: 39 | if line == ' Duplicate classes:': 40 | print(' Duplicate packages:') 41 | parsingdups = True 42 | else: 43 | print(line) 44 | 45 | for arg in sys.argv[1:]: 46 | with open(arg) as f: 47 | print_filtered_log(f) 48 | 49 | -------------------------------------------------------------------------------- /tests/generate-mega-melt.py: -------------------------------------------------------------------------------- 1 | # 2 | # generate-mega-melt.py - Make a POM depending on everything in pom-scijava. 3 | # 4 | 5 | import os, re, sys 6 | from xml.dom import minidom 7 | 8 | def child(node, tag): 9 | nodes = node.getElementsByTagName(tag) 10 | return None if len(nodes) == 0 else nodes[0] 11 | 12 | script_dir = os.path.dirname(os.path.realpath(__file__)) if __file__ else '.' 13 | out = minidom.parse(os.path.join(script_dir, 'mega-melt-template.xml')) 14 | out.getElementsByTagName('project')[0].appendChild(out.createElement('dependencies')) 15 | outDeps = out.getElementsByTagName('dependencies')[0] 16 | 17 | psj = minidom.parse(os.path.join(script_dir, '..', 'pom.xml')) 18 | depMgmt = psj.getElementsByTagName('dependencyManagement')[0] 19 | deps = depMgmt.getElementsByTagName('dependencies')[0] 20 | depList = deps.getElementsByTagName('dependency') 21 | 22 | # Artifacts to exclude from the mega melt. 23 | ignoredArtifacts = [ 24 | # TEMP: The SNT project needs a new release without the 25 | # obsolete scijava-plugins-io-table dependency. 26 | 'SNT', 27 | 28 | # TEMP: Exclude org.bytedeco:hdf5 until cisd:jhdf5 is gone. 29 | 'hdf5', 30 | # TEMP: The original ImageJ requires Java 9+ to compile, 31 | # because it has a module-info.java, so skip it until the 32 | # component collection is updated from Java 8 to Java 11. 33 | 'ij', 34 | # TEMP: The original ImageJ introduced changes in 35 | # 1.54m/1.54n/1.54p that breaks some downstream tests. 36 | # Disable them till we have time to address the issue. 37 | 'ij1-patcher', 'imagej-legacy', 38 | # NB: Skip artifacts requiring minimum Java version >8. 39 | 'algart-tiff', 40 | # NB: The following artifacts have messy dependency trees. 41 | # Too many problems to test as part of the mega-melt. 42 | # See WARNING block in pom-scijava's pom.xml for details. 43 | 'imagej-server', 44 | 'spark-core_2.11', 45 | # NB: Skip scijava forks of third-party projects. 46 | # These are very stable, with few/no dependencies, and 47 | # don't need to be retested as pom-scijava evolves. 48 | 'j3dcore', 49 | 'j3dutils', 50 | 'jep', 51 | 'junit-benchmarks', 52 | 'vecmath', 53 | # NB: Skip alternate flavors of other managed components. 54 | 'gluegen', # uberjar flavor of gluegen-rt 55 | 'jogl-all-noawt', # slimmed down flavor of jogl-all 56 | # NB: All the SWT platform JARs have the same classes. 57 | # The current platform will be brought in transitively. 58 | 'org.eclipse.swt.cocoa.macosx', 59 | 'org.eclipse.swt.cocoa.macosx.x86_64', 60 | 'org.eclipse.swt.gtk.aix.ppc', 61 | 'org.eclipse.swt.gtk.aix.ppc64', 62 | 'org.eclipse.swt.gtk.hpux.ia64', 63 | 'org.eclipse.swt.gtk.linux.ppc', 64 | 'org.eclipse.swt.gtk.linux.ppc64', 65 | 'org.eclipse.swt.gtk.linux.s390', 66 | 'org.eclipse.swt.gtk.linux.s390x', 67 | 'org.eclipse.swt.gtk.linux.x86', 68 | 'org.eclipse.swt.gtk.linux.x86_64', 69 | 'org.eclipse.swt.gtk.solaris.sparc', 70 | 'org.eclipse.swt.gtk.solaris.x86', 71 | 'org.eclipse.swt.win32.win32.x86', 72 | 'org.eclipse.swt.win32.win32.x86_64', 73 | # NB: All SLF4J bindings have the same classes. 74 | # We'll rely on logback-classic being present here. 75 | 'slf4j-jcl', 76 | 'slf4j-jdk14', 77 | 'slf4j-nop', 78 | 'slf4j-simple', 79 | # NB: Cannot include both commons-logging and jcl-over-slf4j; 80 | # see: http://www.slf4j.org/codes.html#jclDelegationLoop 81 | 'jcl-over-slf4j' 82 | ] 83 | 84 | for dep in depList: 85 | # Harvest relevant information (ignore exclusions and version). 86 | groupId = child(dep, 'groupId') 87 | artifactId = child(dep, 'artifactId') 88 | classifier = child(dep, 'classifier') 89 | scope = child(dep, 'scope') 90 | 91 | if artifactId.firstChild.data in ignoredArtifacts: 92 | continue 93 | 94 | outDep = out.createElement('dependency') 95 | outDep.appendChild(groupId) 96 | outDep.appendChild(artifactId) 97 | if classifier: 98 | outDep.appendChild(classifier) 99 | if scope: 100 | outDep.appendChild(scope) 101 | outDeps.appendChild(outDep) 102 | 103 | # Filter XML through a hacky substitution to avoid unwanted whitespace. 104 | xml = re.sub('\n[\n\r\t]*\n', '\n', out.toprettyxml()) 105 | 106 | outDir = sys.argv[1] if len(sys.argv) > 1 else 'mega-melt' 107 | try: 108 | os.mkdir(outDir) 109 | except: 110 | pass 111 | 112 | with open(os.path.join(outDir, 'pom.xml'), 'w') as outPOM: 113 | outPOM.write(xml) 114 | -------------------------------------------------------------------------------- /tests/mega-melt-template.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4.0.0 4 | 5 | org.scijava 6 | pom-scijava 7 | 999-mega-melt 8 | 9 | mega-melt 10 | 0-SNAPSHOT 11 | pom 12 | Mega Melt 13 | The whole BOM in one project 14 | https://scijava.org/ 15 | now 16 | 17 | SciJava 18 | https://scijava.org/ 19 | 20 | 21 | 22 | CC0 1.0 Universal License 23 | https://creativecommons.org/publicdomain/zero/1.0/ 24 | repo 25 | 26 | 27 | 28 | 29 | ctrueden 30 | Curtis Rueden 31 | 32 | 33 | 34 | 35 | None 36 | 37 | 38 | 39 | 40 | None 41 | 42 | 43 | 44 | scm:git:git://github.com/scijava/pom-scijava 45 | scm:git:git@github.com:scijava/pom-scijava 46 | HEAD 47 | https://github.com/scijava/pom-scijava 48 | 49 | 50 | None 51 | 52 | 53 | None 54 | 55 | 56 | N/A 57 | N/A 58 | 59 | 60 | 61 | scijava.public 62 | https://maven.scijava.org/content/groups/public 63 | 64 | 65 | 66 | -------------------------------------------------------------------------------- /tests/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # 4 | # run.sh - Tests correctness of the pom-scijava BOM. 5 | # 6 | 7 | die () { echo "$*" >&2; exit 1; } 8 | 9 | changed () { ! diff $@ >/dev/null; } 10 | 11 | sectionStart() { 12 | startTime=$(date +%s) 13 | echo 14 | printf "$1... " 15 | } 16 | 17 | sectionEnd() { 18 | endTime=$(date +%s) 19 | echo "Done! [$((endTime-startTime))s]" 20 | } 21 | 22 | sectionStart 'Generating mega-melt project' 23 | 24 | dir=$(cd "$(dirname "$0")" && pwd) 25 | pom="$dir/../pom.xml" 26 | test -f "$pom" || die 'Where is pom.xml?!' 27 | 28 | generateMegaMeltScript="$dir/generate-mega-melt.py" 29 | filterBuildLogScript="$dir/filter-build-log.py" 30 | 31 | megaMeltDir="$dir/../target/mega-melt" 32 | megaMeltDir=$(mkdir -p "$megaMeltDir" && cd "$megaMeltDir" && pwd) 33 | pomParent="$megaMeltDir/../pom.xml" 34 | versionSwapLog="$megaMeltDir/version-swap.log" 35 | dependencyTreeLog="$megaMeltDir/dependency-tree.log" 36 | validationLog="$megaMeltDir/validation.log" 37 | validationErrorsLog="$megaMeltDir/validation-errors.log" 38 | megaMeltPOM="$megaMeltDir/pom.xml" 39 | meltingPotLocal="$dir/../../scijava-scripts/melting-pot.sh" 40 | meltingPotURL=https://raw.githubusercontent.com/scijava/scijava-scripts/main/melting-pot.sh 41 | meltingPotScript="$megaMeltDir/melting-pot.sh" 42 | meltingPotLog="$megaMeltDir/melting-pot.log" 43 | meltingPotDir="$megaMeltDir/melting-pot" 44 | skipTestsFile="$meltingPotDir/skipTests.txt" 45 | meltScript="$meltingPotDir/melt.sh" 46 | 47 | # HACK: List of artifacts with known-duplicate short version properties. 48 | shortVersionClashes=\ 49 | 'net.sourceforge.findbugs.annotations'\ 50 | '|antlr.antlr'\ 51 | '|org.jogamp.jocl.jocl'\ 52 | '|net.sf.opencsv.opencsv'\ 53 | '|org.jetbrains.intellij.deps.trove4j' 54 | 55 | rm -rf "$megaMeltDir" && mkdir -p "$megaMeltDir" || die "Creation of $megaMeltDir failed!" 56 | cp "$pom" "$pomParent" && 57 | mvn -B -f "$pomParent" versions:set -DnewVersion=999-mega-melt > "$versionSwapLog" && 58 | mvn -B -f "$pomParent" install:install >> "$versionSwapLog" || 59 | die "pom-scijava version update failed:\n$(cat "$versionSwapLog")" 60 | python "$generateMegaMeltScript" "$megaMeltDir" || die 'Generation failed!' 61 | sectionEnd # Generating mega-melt project 62 | 63 | # Ensure the mega-melt dependency structure validates. 64 | # In particular, this runs our enforcer rules: the build 65 | # will fail if there are any snapshot dependencies, or 66 | # any duplicate classes across artifacts on the classpath. 67 | sectionStart 'Validating mega-melt project' 68 | mvn -B -f "$megaMeltPOM" dependency:tree > "$dependencyTreeLog" || 69 | die "Invalid dependency tree:\n$(cat "$dependencyTreeLog")" 70 | mvn -B -f "$megaMeltPOM" -U clean package > "$validationLog" || { 71 | python "$filterBuildLogScript" "$validationLog" > "$validationErrorsLog" 72 | die "Validation build failed!\n\nDependency tree:\n$(cat "$dependencyTreeLog")\n\nBuild log:\n$(cat "$validationErrorsLog")" 73 | } 74 | sectionEnd # Validating mega-melt project 75 | 76 | # Run mega-melt through the melting pot, with all SciJava-affiliated groupIds, 77 | # minus excluded artifacts (see ignoredArtifacts in generate-mega-melt.py). 78 | echo && 79 | echo 'Generating melting pot...' && 80 | if [ -e "$meltingPotLocal" ] 81 | then 82 | cp "$meltingPotLocal" "$meltingPotScript" 83 | else 84 | curl -fsL "$meltingPotURL" > "$meltingPotScript" 85 | fi || 86 | die "Failed to obtain melting pot script!" 87 | 88 | # Build the melting pot structure. 89 | chmod +x "$meltingPotScript" && 90 | "$meltingPotScript" "$megaMeltDir" \ 91 | -r scijava.public::::https://maven.scijava.org/content/groups/public \ 92 | -o "$meltingPotDir" \ 93 | -i 'ca.mcgill:*' \ 94 | -i 'io.scif:*' \ 95 | -i 'jitk:*' \ 96 | -i 'mpicbg:*' \ 97 | -i 'net.imagej:*' \ 98 | -i 'net.imglib2:*' \ 99 | -i 'net.preibisch:*' \ 100 | -i 'org.bonej:*' \ 101 | -i 'org.janelia.saalfeldlab:*' \ 102 | -i 'org.janelia:*' \ 103 | -i 'org.morphonets:*' \ 104 | -i 'org.scijava:*' \ 105 | -i 'sc.fiji:*' \ 106 | -e 'net.imagej:ij' \ 107 | -e 'net.imglib2:imglib2-mesh' \ 108 | -e 'org.scijava:j3dcore' \ 109 | -e 'org.scijava:j3dutils' \ 110 | -e 'org.scijava:jep' \ 111 | -e 'org.scijava:junit-benchmarks' \ 112 | -e 'org.scijava:vecmath' \ 113 | -f -v -s $@ 2>&1 | tee "$meltingPotLog" 114 | 115 | # NB: The pipe to tee eats the melting-pot error code. 116 | # Even with the POSIX-unfriendly pipefail flag set. 117 | # So we resort to this hacky error check of the log. 118 | test "$(grep -F "[ERROR]" "$meltingPotLog" | grep -v "using default branch")" && 119 | die 'Melting pot generation failed!' 120 | 121 | buildScript="$meltingPotDir/build.sh" 122 | versionPins="$meltingPotDir/version-pins.xml" 123 | 124 | echo 125 | echo 'Hacking in any changed components...' 126 | 127 | # Mix in changed components. Syntax is: 128 | # 129 | # groupId|artifactId|path-to-remote|remote-ref 130 | # 131 | # Example: 132 | # 133 | # components=' 134 | # org.janelia.saalfeldlab|n5-imglib2|git@github.com:saalfeldlab/n5-imglib2|pull/54/head 135 | # sc.fiji|SPIM_Registration|git@github.com:fiji/SPIM_Registration|pull/142/head 136 | # sc.fiji|labkit-ui|git@github.com:juglab/labkit-ui|pull/115/head 137 | # sc.fiji|labkit-pixel-classification|git@github.com:juglab/labkit-pixel-classification|pull/12/head 138 | # sc.fiji|z_spacing|git@github.com:saalfeldlab/z-spacing|pull/28/head 139 | # net.imagej|imagej-common|git@github.com:imagej/imagej-common|pull/112/head 140 | # sc.fiji|TrackMate|git@github.com:trackmate-sc/TrackMate|pull/289/head 141 | # sc.fiji|TrackMate-Skeleton|git@github.com:trackmate-sc/TrackMate-Skeleton|pull/2/head 142 | # sc.fiji|bigwarp_fiji|git@github.com:saalfeldlab/bigwarp|pull/170/head 143 | # net.imagej|imagej-ops|git@github.com:imagej/imagej-ops|pull/654/head 144 | # ' 145 | # 146 | # One entry per line inside the components variable declaration. 147 | # No leading or trailing whitespace anywhere. 148 | # 149 | # Each component will: 150 | # 1. Be updated to that ref (cloning as needed); 151 | # 2. Have its version adjusted to 999 in its pom.xml and gav marker; 152 | # 3. Be `mvn install`ed to the local repo cache at that version; 153 | # 4. Have its version adjusted to 999 in melting pot's build.sh; 154 | # 5. Be added to the list of components to build in melt.sh (if not already present). 155 | components=' 156 | ' 157 | failFile="$meltingPotDir/fail" 158 | rm -f "$failFile" 159 | echo "$components" | while read component 160 | do 161 | test "$component" || continue 162 | 163 | g=${component%%|*}; r=${component#*|} 164 | a=${r%%|*}; r=${r#*|} 165 | remote=${r%%|*}; ref=${r#*|} 166 | test "$g" -a "$a" -a "$remote" -a "$ref" || { 167 | touch "$failFile" 168 | die "Invalid component line: $component" 169 | } 170 | d="$meltingPotDir/$g/$a" 171 | printf "[$g:$a] " 172 | 173 | # Update component working copy to desired ref (cloning as needed). 174 | mkdir -p "$d" && 175 | echo "Log of actions for custom version of $g:$a" > "$d/surgery.log" && 176 | echo >> "$d/surgery.log" && 177 | test -f "$d/.git" || git init "$d" >> "$d/surgery.log" || { 178 | touch "$failFile" 179 | die "Failed to access or initialize repository in directory $d" 180 | } 181 | printf . 182 | cd "$d" && 183 | git remote add mega-melt "$remote" >> surgery.log && 184 | printf . && 185 | git fetch mega-melt --depth 1 "$ref":mega-melt >> surgery.log 2>&1 && 186 | printf . && 187 | git switch mega-melt >> surgery.log 2>&1 || { 188 | touch "$failFile" 189 | die "$g:$a: failed to fetch ref '$ref' from remote $remote" 190 | } 191 | printf . 192 | 193 | # Adjust component version to 999. 194 | mvn versions:set -DnewVersion=999 >> surgery.log || { 195 | touch "$failFile" 196 | die "$g:$a: failed to adjust pom.xml version" 197 | } 198 | printf . 199 | if [ -f gav ] 200 | then 201 | mv gav gav.prehacks 202 | sed -E "s;:[^:]*$;:999;" gav.prehacks > gav && changed gav.prehacks gav || { 203 | touch "$failFile" 204 | die "$g:$a: failed to adjust gav version" 205 | } 206 | fi 207 | printf . 208 | 209 | # Install changed component into the local repo cache. 210 | mvn -Denforcer.skip -Dmaven.test.skip install >> surgery.log || { 211 | touch "$failFile" 212 | die "$g:$a: failed to build and install component" 213 | } 214 | printf . 215 | 216 | # Adjust component version to 999 in melting pot's version-pins.xml. 217 | cd "$meltingPotDir" 218 | test -f "$versionPins.prehacks" || cp "$versionPins" "$versionPins.prehacks" || { 219 | touch "$failFile" 220 | die "$g:$a: failed to back up $versionPins" 221 | } 222 | printf . 223 | echo "$a" | grep -q '^[0-9]' && aa="_$a" || aa="$a" 224 | mv -f "$versionPins" "$versionPins.tmp" && 225 | sed -E "s;<\($g\\.$a\|$aa\)\\.version>[^<]*;<\1.version>999;g" "$versionPins.tmp" > "$versionPins" && 226 | changed "$versionPins.tmp" "$versionPins" || 227 | { 228 | touch "$failFile" 229 | die "$g:$a: failed to adjust component version in $versionPins" 230 | } 231 | printf . 232 | 233 | # Add component to the build list in melt.sh (if not already present). 234 | grep -q "\b$g/$a\b" "$meltScript" || { 235 | test -f "$meltScript.prehacks" || cp "$meltScript" "$meltScript.prehacks" 236 | mv -f "$meltScript" "$meltScript.tmp" && 237 | perl -0777 -pe 's;\n+do\n;\n '"$g/$a"' \\$&;igs' "$meltScript.tmp" > "$meltScript" 238 | } || { 239 | touch "$failFile" 240 | die "$g:$a: failed to add component to the build list in $meltScript" 241 | } 242 | printf ".\n" 243 | done 244 | rm -f "$versionPins.tmp" "$meltScript.tmp" 245 | test ! -f "$failFile" || 246 | die "Failed to hack in changed components!" 247 | 248 | sectionStart 'Adjusting the melting pot: version-pins.xml configuration' 249 | 250 | cp "$versionPins" "$versionPins.original" && 251 | 252 | # HACK: Remove known-duplicate short version properties, keeping 253 | # the short version declaration only for the more common groupId. 254 | # E.g.: org.antlr:antlr is preferred over antlr:antlr, so we set 255 | # antlr.version to match org.antlr:antlr, not antlr:antlr. 256 | mv -f "$versionPins" "$versionPins.tmp" && 257 | sed -E 's;(<('"$shortVersionClashes"')\.version>[^ ]*) <[^ ]*;\1;' "$versionPins.tmp" > "$versionPins" && 258 | changed "$versionPins.tmp" "$versionPins" || 259 | die 'Error adjusting melting pot version pins! [1]' 260 | 261 | # HACK: Add non-standard version properties used prior to 262 | # pom-scijava 32.0.0-beta-1; see d0bf752070d96a2613c42e4e1ab86ebdd07c29ee. 263 | mv -f "$versionPins" "$versionPins.tmp" && 264 | sed -E 's; ([^<]*);& \1;' "$versionPins.tmp" > "$versionPins" && 265 | changed "$versionPins.tmp" "$versionPins" && 266 | mv -f "$versionPins" "$versionPins.tmp" && 267 | sed -E 's; ([^<]*);& \2;' "$versionPins.tmp" > "$versionPins" && 268 | changed "$versionPins.tmp" "$versionPins" || 269 | die 'Error adjusting melting pot version pins! [2]' 270 | 271 | # HACK: Add non-standard net.imagej:ij version property used prior to 272 | # pom-scijava 28.0.0; see 7d2cc442b107b3ac2dcb799d282f2c0b5822649d. 273 | mv -f "$versionPins" "$versionPins.tmp" && 274 | sed -E 's; ([^<]*);& \1;' "$versionPins.tmp" > "$versionPins" && 275 | changed "$versionPins.tmp" "$versionPins" || 276 | die 'Error adjusting melting pot version pins! [3]' 277 | 278 | rm "$versionPins.tmp" || 279 | die 'Error adjusting melting pot version pins! [4]' 280 | 281 | sectionEnd # Adjusting the melting pot: version-pins.xml configuration 282 | 283 | sectionStart 'Adjusting the melting pot: build.sh script' 284 | 285 | cp "$buildScript" "$buildScript.original" && 286 | 287 | # HACK: Add explicit kotlin.version to match our pom-scijava-base. 288 | # Otherwise, components built on older pom-scijava-base will have 289 | # mismatched kotlin component versions. The sed expression avoids 290 | # a bug in mvn's batch mode that results in [0m[0m still 291 | # appearing as a leading ANSI sequence when echoing the property. 292 | kotlinVersion=$( 293 | mvn -B -U -q -Denforcer.skip=true -Dexec.executable=echo \ 294 | -Dexec.args='${kotlin.version}' --non-recursive validate exec:exec 2>&1 | 295 | head -n1 | sed 's;\(.\[[0-9]m\)*;;') && 296 | # TEMP: Also fix the version of maven-enforcer-plugin, to prevent n5 from 297 | # overriding it with a too-old version. Even though we pass enforcer.skip, 298 | # so that the enforcer plugin does not actually do any checking, this version 299 | # mismatch still triggers a problem: 300 | # 301 | # [ERROR] Failed to execute goal 302 | # org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce 303 | # (enforce-rules) on project n5-blosc: Unable to parse configuration of 304 | # mojo org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M3:enforce 305 | # for parameter banDuplicateClasses: Cannot create instance of interface 306 | # org.apache.maven.enforcer.rule.api.EnforcerRule: 307 | # org.apache.maven.enforcer.rule.api.EnforcerRule.() -> [Help 1] 308 | # 309 | # Once n5 components stop doing that version pin, we can remove this here. 310 | enforcerVersion=$( 311 | mvn -B -U -q -Denforcer.skip=true -Dexec.executable=echo \ 312 | -Dexec.args='${maven-enforcer-plugin.version}' --non-recursive validate exec:exec 2>&1 | 313 | head -n1 | sed 's;\(.\[[0-9]m\)*;;') && 314 | mv -f "$buildScript" "$buildScript.tmp" && 315 | sed -E "s;mvn .*-Denforcer.skip;& -Dmaven-enforcer-plugin.version=$enforcerVersion -Dkotlin.version=$kotlinVersion;" "$buildScript.tmp" > "$buildScript" && 316 | changed "$buildScript.tmp" "$buildScript" && 317 | 318 | chmod +x "$buildScript" && 319 | rm "$buildScript.tmp" || 320 | die 'Error adjusting melting pot build script!' 321 | 322 | sectionEnd # Adjusting the melting pot: build.sh script 323 | 324 | sectionStart 'Adjusting the melting pot: component POMs' 325 | 326 | # HACK: Adjust component POMs to satisfy Maven HTTPS strictness. 327 | find "$meltingPotDir" -name pom.xml | 328 | while read pom 329 | do 330 | mv "$pom" "$pom.original" && 331 | sed -E -e 's_(https?://maven.imagej.net|http://maven.scijava.org)_https://maven.scijava.org_g' \ 332 | -e 's_http://maven.apache.org/xsd_https://maven.apache.org/xsd_g' "$pom.original" > "$pom" || 333 | die "Failed to adjust $pom" 334 | done 335 | 336 | # HACK: Make component POMs extend the same version of pom-scijava 337 | # being tested. This reduces dependency skew for transitively inherited 338 | # components that were not managed at the time of that component release. 339 | find "$meltingPotDir" -name pom.xml | while read pom 340 | do 341 | perl -0777 -i -pe 's/(\s*org.scijava<\/groupId>\s*pom-scijava<\/artifactId>\s*)[^\n]*/${1}999-mega-melt<\/version>/igs' "$pom" 342 | done 343 | 344 | sectionEnd # Adjusting the melting pot: component POMs 345 | 346 | sectionStart 'Adjusting the melting pot: melt.sh script' 347 | 348 | # HACK: Skip tests for projects with known problems. 349 | 350 | mv "$meltScript" "$meltScript.original" && 351 | sed 's_\s*"$dir/build.sh"_\ 352 | # HACK: If project is on the skipTests list, then skip the tests.\ 353 | buildFlags=-Djava.awt.headless=true\ 354 | grep -qxF "$f" $dir/skipTests.txt \&\& buildFlags=-DskipTests\ 355 | \ 356 | & $buildFlags_' "$meltScript.original" > "$meltScript" && 357 | chmod +x "$meltScript" || 358 | die "Failed to adjust $meltScript" 359 | 360 | sectionEnd # Adjusting the melting pot: melt.sh script 361 | 362 | sectionStart 'Adjusting the melting pot: unit test hacks' 363 | 364 | # Remove flaky tests. 365 | 366 | # CachedOpEnvironmentTest fails intermittently. Of course, it should be 367 | # somehow fixed in imagej-ops. But for now, let's not let it ruin the melt. 368 | rm -f "$meltingPotDir/net.imagej/imagej-ops/src/test/java/net/imagej/ops/cached/CachedOpEnvironmentTest.java" 369 | # Avoid notNull assertion error at 370 | # org.janelia.saalfeldlab.n5.universe.metadata.MetadataTests.testEmptyBase(MetadataTests.java:346) 371 | rm -f "$meltingPotDir/org.janelia.saalfeldlab/n5-universe/src/test/java/org/janelia/saalfeldlab/n5/universe/metadata/MetadataTests.java" 372 | 373 | # In org.janelia.saalfeldlab.n5.metadata.ome.ngff.v04.WriteAxesTests.testXYT: 374 | # java.util.NoSuchElementException: No value present 375 | rm -f "$meltingPotDir/org.janelia.saalfeldlab/n5-ij/src/test/java/org/janelia/saalfeldlab/n5/metadata/ome/ngff/v04/WriteAxesTests.java" 376 | 377 | # Skip testing of components with non-working tests. 378 | 379 | # Error while checking the CLIJ2 installation: null 380 | echo "sc.fiji/labkit-pixel-classification" >> "$skipTestsFile" || 381 | die "Failed to generate $skipTestsFile" 382 | 383 | sectionEnd # Adjusting the melting pot: unit test hacks 384 | 385 | # Run the melting pot now, unless -s flag was given. 386 | doMelt=t 387 | for arg in "$@" 388 | do 389 | if [ "$arg" = '-s' ] || [ "$arg" = '--skipBuild' ] 390 | then 391 | doMelt= 392 | fi 393 | done 394 | if [ "$doMelt" ] 395 | then 396 | echo 397 | cd "$meltingPotDir" 398 | sh melt.sh 399 | meltResult=$? 400 | 401 | # Dump logs for failing builds and/or tests. 402 | for d in */* 403 | do 404 | test -d "$d" || continue 405 | 406 | # Check for failing build log. 407 | buildLog="$d/build.log" 408 | if [ -f "$buildLog" ] 409 | then 410 | if grep -qF 'BUILD FAILURE' "$buildLog" 411 | then 412 | echo 413 | echo "[$buildLog]" 414 | cat "$buildLog" 415 | fi 416 | fi 417 | 418 | # Check for failing test logs. 419 | testLogsDir="$dir/target/surefire-reports" 420 | if [ -d "$testLogsDir" ] 421 | then 422 | find "$testLogsDir" -name '*.txt' | 423 | while read report 424 | do 425 | if grep -qF 'FAILURE!' "$report" 426 | then 427 | echo 428 | echo "[$report]" 429 | cat "$report" 430 | fi 431 | done 432 | fi 433 | done 434 | 435 | # Terminate the script with same exit code if the melt failed. 436 | test "$meltResult" -eq 0 || exit "$meltResult" 437 | else 438 | echo && 439 | echo 'Melting the pot... SKIPPED' 440 | fi 441 | 442 | # Complete! 443 | echo 444 | echo 'All checks succeeded! :-D' 445 | -------------------------------------------------------------------------------- /whatsnew.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | dir=$(cd "${0%/*}" && pwd) 3 | mvn -B -U -Dverbose=true -s settings.xml \ 4 | -Dmaven.version.rules="file://$dir/rules.xml" \ 5 | versions:display-dependency-updates 6 | --------------------------------------------------------------------------------