diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml
index c0227994..ac37c251 100644
--- a/.github/workflows/build-main.yml
+++ b/.github/workflows/build-main.yml
@@ -16,8 +16,8 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v4
with:
- java-version: '8'
- distribution: 'zulu'
+ java-version: '21'
+ distribution: 'temurin'
- name: Cache Maven packages
uses: actions/cache@v3
diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml
index 968ab7b0..9aec9ea3 100644
--- a/.github/workflows/build-pr.yml
+++ b/.github/workflows/build-pr.yml
@@ -14,8 +14,8 @@ jobs:
- name: Set up Java
uses: actions/setup-java@v4
with:
- java-version: '8'
- distribution: 'zulu'
+ java-version: '21'
+ distribution: 'temurin'
# Needed if the cache is out of whack and needs to be totally refreshed
# - name: Clear Maven cache
@@ -25,6 +25,7 @@ jobs:
rm -rf ~/.m2/repository/com/github/*
rm -rf ~/.m2/repository/io/github/*
rm -rf ~/.m2/repository/org/bonej/*
+ rm -rf ~/.m2/repository/ch/beancounter/*
- name: Cache Maven packages
uses: actions/cache@v3
@@ -37,7 +38,7 @@ jobs:
- name: Set up Maven settings
uses: s4u/maven-settings-action@v2
with:
- servers: '[{"id": "github", "username": "${{ github.actor }}", "password": "${{ secrets.BONEJ_PLUS_REPO }}"}]'
+ servers: '[{"id": "github-bonej-plus", "username": "${{ github.actor }}", "password": "${{ secrets.BONEJ_PLUS_REPO }}"},{"id": "github-beancounter", "username": "${{ github.actor }}", "password": "${{ secrets.BONEJ_PLUS_REPO }}"}]'
githubServer: false
- name: Set up CI environment
diff --git a/Legacy/util/pom.xml b/Legacy/util/pom.xml
index b877fc0f..f7cccd3e 100644
--- a/Legacy/util/pom.xml
+++ b/Legacy/util/pom.xml
@@ -120,6 +120,8 @@
org.mockito
mockito-core
+
+ 5.20.0
test
diff --git a/Modern/utilities/pom.xml b/Modern/utilities/pom.xml
index a389b488..ded7c537 100644
--- a/Modern/utilities/pom.xml
+++ b/Modern/utilities/pom.xml
@@ -172,6 +172,8 @@
org.mockito
mockito-core
+
+ 5.20.0
test
diff --git a/Modern/wrapperPlugins/pom.xml b/Modern/wrapperPlugins/pom.xml
index 762b6a77..98a8f722 100644
--- a/Modern/wrapperPlugins/pom.xml
+++ b/Modern/wrapperPlugins/pom.xml
@@ -124,12 +124,7 @@
org.bonej
bonej-ops
-
- org.bonej
- bonej-plus
- 0.0.11
-
-
+
net.imagej
@@ -245,6 +240,8 @@
org.mockito
mockito-core
+
+ 5.20.0
test
diff --git a/Modern/wrapperPlugins/src/main/java/org/bonej/wrapperPlugins/GPUCheckerWrapper.java b/Modern/wrapperPlugins/src/main/java/org/bonej/wrapperPlugins/GPUCheckerWrapper.java
deleted file mode 100644
index 9ab4464b..00000000
--- a/Modern/wrapperPlugins/src/main/java/org/bonej/wrapperPlugins/GPUCheckerWrapper.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * #%L
- * High-level BoneJ2 commands.
- * %%
- * Copyright (C) 2015 - 2025 Michael Doube, BoneJ developers
- * %%
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- * #L%
- */
-package org.bonej.wrapperPlugins;
-
-import java.awt.Checkbox;
-import java.util.List;
-
-import org.bonej.plus.BeanCounter;
-import org.bonej.plus.BeanCounterPlugin;
-import org.bonej.plus.DeviceCheck;
-import org.bonej.plus.Regulator;
-import org.bonej.plus.Utilities;
-import org.jocl.cl_device_id;
-import org.scijava.command.Command;
-import org.scijava.plugin.Plugin;
-
-import ij.IJ;
-import ij.Prefs;
-import ij.gui.GenericDialog;
-
-@Plugin(type = Command.class, menuPath = "Plugins>BoneJ>Plus>Check GPUs")
-public class GPUCheckerWrapper extends BoneJCommand {
-
- final static String PREF_BASE = "BoneJ.";
-
- @Override
- public void run() {
- if (Regulator.getInstance().isLocked()) {
- IJ.showMessage("BoneJ+", "A plugin is already running.");
- return;
- }
-
- //check balance, if empty then give the opportunity to top up
- if (BeanCounter.getInstance().getBalance() <= 0) {
-
- (new BeanCounterPlugin()).run();
-
- //balance not topped up, quit.
- if (BeanCounter.getInstance().getBalance() <= 0)
- return;
- }
-
- String[] platformNames = DeviceCheck.getPlatformNames(DeviceCheck.getPlatformIds());
- for (int p = 0; p < platformNames.length; p++)
- System.out.println("Found platform: "+platformNames[p]);
- cl_device_id[][] devices = DeviceCheck.getAllDeviceIds();
- String[][] deviceNames = DeviceCheck.getDeviceNames(devices);
- boolean[][] isCompliant = DeviceCheck.getCompliance(devices);
-
- //clear Prefs of old deviceName and useDevice entries
- //around 10 platforms in existence I think, but may need to be updated
- //to handle severely Frankensteinish hardware configurations
- for (int pl = 0; pl < 20; pl++) {
- int d = 0;
- int noDeviceFoundCount = 0;
- while (noDeviceFoundCount < 10) {
- //if either deviceName or useDevice entry is present, this device was recorded in prefs
- if (Prefs.get(PREF_BASE+"deviceName["+pl+":"+d+"]", null) != null ||
- Prefs.get(PREF_BASE+"useDevice["+pl+":"+d+"]", null) != null) {
-
- System.out.println("Found a device listed in the prefs at "+pl+":"+d);
-
- //setting to null removes the key and the value
- Prefs.set(PREF_BASE+"deviceName["+pl+":"+d+"]", null);
- Prefs.set(PREF_BASE+"useDevice["+pl+":"+d+"]", null);
- //reset the counter - loop will keep going for 10 empty devices after the last hit
- noDeviceFoundCount = 0;
- } else {
-// System.out.println("No device listed in the prefs at "+pl+":"+d);
- noDeviceFoundCount++;
- }
- d++;
- }
- }
-
-
- GenericDialog gd = new GenericDialog("Select GPUs");
- for (int p = 0; p < platformNames.length; p++) {
- gd.addMessage("Platform "+p+": "+platformNames[p]);
- if (devices[p].length == 0) {
- gd.addMessage("No devices on this platform");
- continue;
- }
- for (int d = 0; d < devices[p].length; d++) {
- //log in Prefs the name of each device
- Prefs.set(PREF_BASE+"deviceName["+p+":"+d+"]", deviceNames[p][d]);
- //default to use all compliant devices
- gd.addCheckbox("Device_"+p+"-"+d+": "+ deviceNames[p][d], isCompliant[p][d]);
- }
- }
-
- List> checkboxes = gd.getCheckboxes();
- int i = 0;
- for (int p = 0; p < platformNames.length; p++) {
- for (int d = 0; d < devices[p].length; d++) {
- Checkbox checkbox = (Checkbox) checkboxes.get(i);
- checkbox.setEnabled(isCompliant[p][d]);
- if (!isCompliant[p][d])
- checkbox.setState(false);
- i++;
- }
- }
-
- gd.showDialog();
-
- for (int p = 0; p < platformNames.length; p++) {
- for (int d = 0; d < devices[p].length; d++) {
- Prefs.set(PREF_BASE+"useDevice["+p+":"+d+"]", gd.getNextBoolean());
- }
- }
-
- //reset and clear any singleton classes that might be floating about
- //note that multiple calls may lead to VRAM leak on NVIDIA cards, which don't let go of resources well
- Utilities.purgeAll();
- }
-}
diff --git a/pom.xml b/pom.xml
index 25f5176e..4b6bc46c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -119,7 +119,24 @@
Michael Doube, BoneJ developers
sign,deploy-to-scijava
bonej-@{project.version}
+ 8
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.14.0
+
+ ${maven.compiler.release}
+
+
+
+
+
+
@@ -129,10 +146,17 @@
false
- github
+ github-bonej-plus
https://maven.pkg.github.com/bonej-org/bonej-plus
false
true
+
+ github-beancounter
+ https://maven.pkg.github.com/bonej-org/beancounter
+ false
+ true
+
+