From fde688f07019fec3f219889346509f3162858ad5 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 1 Jul 2021 15:45:53 -0500 Subject: [PATCH 01/12] Switch from Travis CI to GitHub Actions --- {.travis => .github}/build.sh | 4 +-- .github/setup.sh | 3 +++ .github/workflows/build-main.yml | 42 ++++++++++++++++++++++++++++++++ .github/workflows/build-pr.yml | 35 ++++++++++++++++++++++++++ .travis.yml | 12 --------- README.md | 2 +- pom.xml | 6 ++--- 7 files changed, 86 insertions(+), 18 deletions(-) rename {.travis => .github}/build.sh (61%) create mode 100755 .github/setup.sh create mode 100644 .github/workflows/build-main.yml create mode 100644 .github/workflows/build-pr.yml delete mode 100644 .travis.yml diff --git a/.travis/build.sh b/.github/build.sh similarity index 61% rename from .travis/build.sh rename to .github/build.sh index e939b6c..7da4262 100755 --- a/.travis/build.sh +++ b/.github/build.sh @@ -1,3 +1,3 @@ #!/bin/sh -curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/travis-build.sh -sh travis-build.sh +curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-build.sh +sh ci-build.sh diff --git a/.github/setup.sh b/.github/setup.sh new file mode 100755 index 0000000..f359bbe --- /dev/null +++ b/.github/setup.sh @@ -0,0 +1,3 @@ +#!/bin/sh +curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-setup-github-actions.sh +sh ci-setup-github-actions.sh diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml new file mode 100644 index 0000000..45b6b5e --- /dev/null +++ b/.github/workflows/build-main.yml @@ -0,0 +1,42 @@ +name: build + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache m2 folder + uses: actions/cache@v2 + env: + cache-name: cache-m2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'zulu' + - name: Set up CI environment + run: .github/setup.sh + - name: Execute the build + run: .github/build.sh + env: + GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + MAVEN_USER: ${{ secrets.MAVEN_USER }} + MAVEN_PASS: ${{ secrets.MAVEN_PASS }} + OSSRH_PASS: ${{ secrets.OSSRH_PASS }} + SIGNING_ASC: ${{ secrets.SIGNING_ASC }} diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml new file mode 100644 index 0000000..92a0192 --- /dev/null +++ b/.github/workflows/build-pr.yml @@ -0,0 +1,35 @@ +name: build PR + +on: + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache m2 folder + uses: actions/cache@v2 + env: + cache-name: cache-m2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Set up JDK 8 + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'zulu' + - name: Set up CI environment + run: .github/setup.sh + - name: Execute the build + run: .github/build.sh diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8c3e3dd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: java -jdk: openjdk8 -branches: - only: - - master - - "/.*-[0-9]+\\..*/" -install: true -script: ".travis/build.sh" -env: - global: - - secure: mx1gt8i3B+jBlKcmOp4kDdWQID9ypKY2h7p0nwLcMbUh8BliMyyHqhT8i1O9UJ7KOWTDi56njVe/OpL/Yq4n8iI5Qc6U8JsUMko7IVEKl6s2DUBjZ0RlVuKcVBJCUZV/nd++brRt6KAOq+rIKo2JBGcih2t4xQ8pSk2Z567uuN8= - - secure: OvoesZlbqzxVHsPKkgjgbl9oaW7LLcdSkPjkjoCPi5NYn1Cm4dilAOOPV4qmwRInpsJY5YKecx8s++y36G09HW5M44MmIKFkGbyi7ug/lEYY2bfUWWow/Avgl8/EL4GN0nu4vLo0jwlFilYF/tFZxisTbRmMiVCIi2J7JY5v/Lw= diff --git a/README.md b/README.md index e66ba40..09650b7 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![](https://travis-ci.org/scijava/scripting-java.svg?branch=master)](https://travis-ci.org/scijava/scripting-java) +[![](https://github.com/scijava/scripting-java/actions/workflows/build-main.yml/badge.svg)](https://github.com/scijava/scripting-java/actions/workflows/build-main.yml) # Java Scripting diff --git a/pom.xml b/pom.xml index 5df6352..fa66a58 100644 --- a/pom.xml +++ b/pom.xml @@ -86,8 +86,8 @@ https://github.com/scijava/scripting-java/issues - Travis CI - https://travis-ci.org/scijava/scripting-java + GitHub Actions + https://github.com/scijava/scripting-java/actions @@ -98,7 +98,7 @@ Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck Institute of Molecular Cell Biology and Genetics. - deploy-to-scijava + sign,deploy-to-scijava From 9aa1f2b0419337475f62ae785f560876f6fc797f Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Fri, 2 Jul 2021 09:49:47 -0500 Subject: [PATCH 02/12] CI: build release tags --- .github/workflows/build-main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 45b6b5e..3fb5622 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -4,6 +4,8 @@ on: push: branches: - master + tags: + - "*-[0-9]+.*" jobs: build: From 67489be2ffc7d7803bc0559ab573ccaac14fa739 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Mon, 8 Nov 2021 15:42:36 -0600 Subject: [PATCH 03/12] POM: Stop using git:// protocol with github.com The GitHub platform is discontinuing support for it. See: https://github.blog/2021-09-01-improving-git-protocol-security-github/#whats-changing --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fa66a58..44cf8af 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,7 @@ - scm:git:git://github.com/scijava/scripting-java + scm:git:https://github.com/scijava/scripting-java scm:git:git@github.com:scijava/scripting-java HEAD https://github.com/scijava/scripting-java From e9b4179bcb8ca3b585dc6d5de99fe1e7b6e33462 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Tue, 14 Jun 2022 15:54:27 -0500 Subject: [PATCH 04/12] CI: cache ~/.m2/repository correctly --- .github/workflows/build-main.yml | 18 +++--------------- .github/workflows/build-pr.yml | 18 +++--------------- 2 files changed, 6 insertions(+), 30 deletions(-) diff --git a/.github/workflows/build-main.yml b/.github/workflows/build-main.yml index 3fb5622..5ef5692 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build-main.yml @@ -13,24 +13,12 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: Cache m2 folder - uses: actions/cache@v2 - env: - cache-name: cache-m2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-build-${{ env.cache-name }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set up JDK 8 - uses: actions/setup-java@v2 + - name: Set up Java + uses: actions/setup-java@v3 with: java-version: '8' distribution: 'zulu' + cache: 'maven' - name: Set up CI environment run: .github/setup.sh - name: Execute the build diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml index 92a0192..925b576 100644 --- a/.github/workflows/build-pr.yml +++ b/.github/workflows/build-pr.yml @@ -11,24 +11,12 @@ jobs: steps: - uses: actions/checkout@v2 - - - name: Cache m2 folder - uses: actions/cache@v2 - env: - cache-name: cache-m2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-build-${{ env.cache-name }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- - - - name: Set up JDK 8 - uses: actions/setup-java@v2 + - name: Set up Java + uses: actions/setup-java@v3 with: java-version: '8' distribution: 'zulu' + cache: 'maven' - name: Set up CI environment run: .github/setup.sh - name: Execute the build From 714c51401ddfef8cc389efc7e0ea48bd7e2d810d Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 14 Aug 2025 15:31:52 +0200 Subject: [PATCH 05/12] Switched using classloader to using classgraph library. --- pom.xml | 6 +- .../plugins/scripting/java/JavaEngine.java | 133 +++++------------- 2 files changed, 40 insertions(+), 99 deletions(-) diff --git a/pom.xml b/pom.xml index 44cf8af..1035e79 100644 --- a/pom.xml +++ b/pom.xml @@ -111,7 +111,11 @@ Institute of Molecular Cell Biology and Genetics. org.scijava scijava-common - + + io.github.classgraph + classgraph + 4.8.172 + junit diff --git a/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java b/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java index 2225447..6d61f5d 100644 --- a/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java +++ b/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java @@ -31,6 +31,33 @@ package org.scijava.plugins.scripting.java; +import io.github.classgraph.ClassGraph; +import org.scijava.command.CommandService; +import org.scijava.minimaven.BuildEnvironment; +import org.scijava.minimaven.Coordinate; +import org.scijava.minimaven.MavenProject; +import org.scijava.plugin.Parameter; +import org.scijava.plugin.PluginService; +import org.scijava.run.RunService; +import org.scijava.script.AbstractScriptEngine; +import org.scijava.util.FileUtils; +import org.scijava.util.LineOutputStream; +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.xml.sax.SAXException; + +import javax.script.ScriptEngine; +import javax.script.ScriptException; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerConfigurationException; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.TransformerFactoryConfigurationError; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -43,44 +70,13 @@ import java.io.Reader; import java.io.StringReader; import java.io.Writer; -import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; import java.util.ArrayList; import java.util.List; -import java.util.jar.Attributes.Name; -import java.util.jar.JarFile; -import java.util.jar.Manifest; import java.util.regex.Matcher; import java.util.regex.Pattern; -import javax.script.ScriptEngine; -import javax.script.ScriptException; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.TransformerFactoryConfigurationError; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.scijava.command.CommandService; -import org.scijava.minimaven.BuildEnvironment; -import org.scijava.minimaven.Coordinate; -import org.scijava.minimaven.MavenProject; -import org.scijava.plugin.Parameter; -import org.scijava.plugin.PluginService; -import org.scijava.run.RunService; -import org.scijava.script.AbstractScriptEngine; -import org.scijava.util.FileUtils; -import org.scijava.util.LineOutputStream; -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.xml.sax.SAXException; - /** * A pseudo-{@link ScriptEngine} compiling and executing Java classes. *

@@ -787,23 +783,14 @@ private static Element append(final Document document, final Element parent, getAllDependencies(final BuildEnvironment env) { final List result = new ArrayList(); - for (ClassLoader loader = Thread.currentThread().getContextClassLoader(); loader != null; loader = - loader.getParent()) - { - if (loader instanceof URLClassLoader) { - for (final URL url : ((URLClassLoader) loader).getURLs()) { - if (url.getProtocol().equals("file")) { - final File file = new File(url.getPath()); - if (url.toString().matches( - ".*/target/surefire/surefirebooter[0-9]*\\.jar")) - { - getSurefireBooterURLs(file, url, env, result); - continue; - } - result.add(fakeDependency(env, file)); - } - } - } + ClassGraph cg = new ClassGraph(); + String cp = cg.getClasspath(); + String[] candidates = cp.split(File.pathSeparator); + + for( String candidate : candidates ){ + File file = new File(candidate); + Coordinate c = fakeDependency(env, file); + result.add(c); } return result; } @@ -830,56 +817,6 @@ private static Coordinate fakeDependency(final BuildEnvironment env, return dependency; } - /** - * Figures out the class path given a {@code .jar} file generated by the - * {@code maven-surefire-plugin}. - *

- * A little-known feature of JAR files is that their manifest can specify - * additional class path elements in a {@code Class-Path} entry. The - * {@code maven-surefire-plugin} makes extensive use of that: the URLs of the - * of the active {@link URLClassLoader} will consist of only a single - * {@code .jar} file that is empty except for a manifest whose sole purpose is - * to specify the dependencies. - *

- *

- * This method can be used to discover those additional class path elements. - *

- * - * @param file the {@code .jar} file generated by the - * {@code maven-surefire-plugin} - * @param baseURL the {@link URL} of the {@code .jar} file, needed for class - * path elements specified as relative paths - * @param env the {@link BuildEnvironment}, to store the Maven POMs faked for - * the class path elements - * @param result the list of dependencies to which the discovered dependencies - * are added - */ - private static void getSurefireBooterURLs(final File file, final URL baseURL, - final BuildEnvironment env, final List result) - { - try { - final JarFile jar = new JarFile(file); - Manifest manifest = jar.getManifest(); - if (manifest != null) { - final String classPath = - manifest.getMainAttributes().getValue(Name.CLASS_PATH); - if (classPath != null) { - for (final String element : classPath.split(" +")) - try { - final File dependency = - new File(new URL(baseURL, element).getPath()); - result.add(fakeDependency(env, dependency)); - } - catch (MalformedURLException e) { - e.printStackTrace(); - } - } - } - } - catch (final IOException e) { - e.printStackTrace(); - } - } /** * Read complete contents of a Reader and return as String. From b72274b82acbfb1dd156f88856ce1c29c5993edf Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 14 Aug 2025 13:21:29 -0500 Subject: [PATCH 06/12] POM: update parent to pom-scijava 42.0.0 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 1035e79..fd8fc39 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.scijava pom-scijava - 26.0.0 + 42.0.0 From c3fecc77595cc7e359b115da1690709e952d009d Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 14 Aug 2025 13:22:07 -0500 Subject: [PATCH 07/12] Update copyright blurbs for 2025 --- LICENSE.txt | 2 +- .../java/org/scijava/plugins/scripting/java/JavaEngine.java | 2 +- .../org/scijava/plugins/scripting/java/JavaEngineBindings.java | 2 +- .../org/scijava/plugins/scripting/java/JavaScriptLanguage.java | 2 +- .../java/org/scijava/plugins/scripting/java/JavaEngineTest.java | 2 +- .../java/org/scijava/plugins/scripting/java/MakeJarTest.java | 2 +- src/test/resources/Dummy.java | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 28fb714..3ee5b32 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright (c) 2008 - 2017, Board of Regents of the University of +Copyright (c) 2008 - 2025, Board of Regents of the University of Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck Institute of Molecular Cell Biology and Genetics. All rights reserved. diff --git a/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java b/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java index 6d61f5d..88d7e51 100644 --- a/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java +++ b/src/main/java/org/scijava/plugins/scripting/java/JavaEngine.java @@ -2,7 +2,7 @@ * #%L * JSR-223-compliant Java scripting language plugin. * %% - * Copyright (C) 2008 - 2017 Board of Regents of the University of + * Copyright (C) 2008 - 2025 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% diff --git a/src/main/java/org/scijava/plugins/scripting/java/JavaEngineBindings.java b/src/main/java/org/scijava/plugins/scripting/java/JavaEngineBindings.java index 0cf76eb..ea82a3d 100644 --- a/src/main/java/org/scijava/plugins/scripting/java/JavaEngineBindings.java +++ b/src/main/java/org/scijava/plugins/scripting/java/JavaEngineBindings.java @@ -2,7 +2,7 @@ * #%L * JSR-223-compliant Java scripting language plugin. * %% - * Copyright (C) 2008 - 2017 Board of Regents of the University of + * Copyright (C) 2008 - 2025 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% diff --git a/src/main/java/org/scijava/plugins/scripting/java/JavaScriptLanguage.java b/src/main/java/org/scijava/plugins/scripting/java/JavaScriptLanguage.java index 00be7fe..6ecad22 100644 --- a/src/main/java/org/scijava/plugins/scripting/java/JavaScriptLanguage.java +++ b/src/main/java/org/scijava/plugins/scripting/java/JavaScriptLanguage.java @@ -2,7 +2,7 @@ * #%L * JSR-223-compliant Java scripting language plugin. * %% - * Copyright (C) 2008 - 2017 Board of Regents of the University of + * Copyright (C) 2008 - 2025 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% diff --git a/src/test/java/org/scijava/plugins/scripting/java/JavaEngineTest.java b/src/test/java/org/scijava/plugins/scripting/java/JavaEngineTest.java index d2128ab..7c413d8 100644 --- a/src/test/java/org/scijava/plugins/scripting/java/JavaEngineTest.java +++ b/src/test/java/org/scijava/plugins/scripting/java/JavaEngineTest.java @@ -2,7 +2,7 @@ * #%L * JSR-223-compliant Java scripting language plugin. * %% - * Copyright (C) 2008 - 2017 Board of Regents of the University of + * Copyright (C) 2008 - 2025 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% diff --git a/src/test/java/org/scijava/plugins/scripting/java/MakeJarTest.java b/src/test/java/org/scijava/plugins/scripting/java/MakeJarTest.java index 60794b7..ae0b60f 100644 --- a/src/test/java/org/scijava/plugins/scripting/java/MakeJarTest.java +++ b/src/test/java/org/scijava/plugins/scripting/java/MakeJarTest.java @@ -2,7 +2,7 @@ * #%L * JSR-223-compliant Java scripting language plugin. * %% - * Copyright (C) 2008 - 2017 Board of Regents of the University of + * Copyright (C) 2008 - 2025 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% diff --git a/src/test/resources/Dummy.java b/src/test/resources/Dummy.java index 5e788c4..3b86531 100644 --- a/src/test/resources/Dummy.java +++ b/src/test/resources/Dummy.java @@ -2,7 +2,7 @@ * #%L * JSR-223-compliant Java scripting language plugin. * %% - * Copyright (C) 2008 - 2017 Board of Regents of the University of + * Copyright (C) 2008 - 2025 Board of Regents of the University of * Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck * Institute of Molecular Cell Biology and Genetics. * %% From 40cb95da3abcc76611e0625c8acc277d34629d85 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 14 Aug 2025 13:22:54 -0500 Subject: [PATCH 08/12] POM: declare classgraph version as a property --- pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index fd8fc39..5f354c6 100644 --- a/pom.xml +++ b/pom.xml @@ -99,6 +99,8 @@ Institute of Molecular Cell Biology and Genetics. sign,deploy-to-scijava + + 4.8.172 @@ -111,11 +113,14 @@ Institute of Molecular Cell Biology and Genetics. org.scijava scijava-common
+ + io.github.classgraph classgraph - 4.8.172 + ${classgraph.version} + junit From d6918c0570c430832946b593f7cf456c5fca95f8 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 14 Aug 2025 13:25:36 -0500 Subject: [PATCH 09/12] Update CI to current standards; rename main branch --- .github/build.sh | 2 +- .github/setup.sh | 2 +- .github/workflows/build-pr.yml | 23 ------------------- .../workflows/{build-main.yml => build.yml} | 8 +++++-- README.md | 2 +- 5 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/build-pr.yml rename .github/workflows/{build-main.yml => build.yml} (81%) diff --git a/.github/build.sh b/.github/build.sh index 7da4262..523abeb 100755 --- a/.github/build.sh +++ b/.github/build.sh @@ -1,3 +1,3 @@ #!/bin/sh -curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-build.sh +curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-build.sh sh ci-build.sh diff --git a/.github/setup.sh b/.github/setup.sh index f359bbe..a03464b 100755 --- a/.github/setup.sh +++ b/.github/setup.sh @@ -1,3 +1,3 @@ #!/bin/sh -curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/master/ci-setup-github-actions.sh +curl -fsLO https://raw.githubusercontent.com/scijava/scijava-scripts/main/ci-setup-github-actions.sh sh ci-setup-github-actions.sh diff --git a/.github/workflows/build-pr.yml b/.github/workflows/build-pr.yml deleted file mode 100644 index 925b576..0000000 --- a/.github/workflows/build-pr.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: build PR - -on: - pull_request: - branches: - - master - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Java - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'zulu' - cache: 'maven' - - name: Set up CI environment - run: .github/setup.sh - - name: Execute the build - run: .github/build.sh diff --git a/.github/workflows/build-main.yml b/.github/workflows/build.yml similarity index 81% rename from .github/workflows/build-main.yml rename to .github/workflows/build.yml index 5ef5692..b0a181e 100644 --- a/.github/workflows/build-main.yml +++ b/.github/workflows/build.yml @@ -3,9 +3,12 @@ name: build on: push: branches: - - master + - main tags: - "*-[0-9]+.*" + pull_request: + branches: + - main jobs: build: @@ -28,5 +31,6 @@ jobs: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} MAVEN_USER: ${{ secrets.MAVEN_USER }} MAVEN_PASS: ${{ secrets.MAVEN_PASS }} - OSSRH_PASS: ${{ secrets.OSSRH_PASS }} + CENTRAL_USER: ${{ secrets.CENTRAL_USER }} + CENTRAL_PASS: ${{ secrets.CENTRAL_PASS }} SIGNING_ASC: ${{ secrets.SIGNING_ASC }} diff --git a/README.md b/README.md index 09650b7..a16ffca 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![](https://github.com/scijava/scripting-java/actions/workflows/build-main.yml/badge.svg)](https://github.com/scijava/scripting-java/actions/workflows/build-main.yml) +[![](https://github.com/scijava/scripting-java/actions/workflows/build.yml/badge.svg)](https://github.com/scijava/scripting-java/actions/workflows/build.yml) # Java Scripting From 31fd9c6ca0983caba169d5e259e6b7987e8304dd Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 14 Aug 2025 13:29:18 -0500 Subject: [PATCH 10/12] POM: bump version to 1.0.0-SNAPSHOT It's past time to start deploying SciJava components like this one to Maven Central! --- pom.xml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 5f354c6..73afaf8 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ scripting-java - 0.4.2-SNAPSHOT + 1.0.0-SNAPSHOT SciJava Scripting: Java JSR-223-compliant Java scripting language plugin. @@ -97,9 +97,6 @@ Wisconsin-Madison, Broad Institute of MIT and Harvard, and Max Planck Institute of Molecular Cell Biology and Genetics. - - sign,deploy-to-scijava - 4.8.172 From e8af7611ac12e369706f0414e263ac8854234da2 Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 14 Aug 2025 13:30:49 -0500 Subject: [PATCH 11/12] POM: use HTTPS for schema location URL Maven no longer supports plain HTTP for the schema location. And using HTTP now generates errors in Eclipse (and probably other IDEs). --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 73afaf8..808b03d 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ - + 4.0.0 From 4b1c9dd6f7311796a490923125415f46fc9a970e Mon Sep 17 00:00:00 2001 From: Curtis Rueden Date: Thu, 14 Aug 2025 13:31:01 -0500 Subject: [PATCH 12/12] Bump to next development cycle Signed-off-by: Curtis Rueden --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 808b03d..cd79974 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ scripting-java - 1.0.0-SNAPSHOT + 1.0.1-SNAPSHOT SciJava Scripting: Java JSR-223-compliant Java scripting language plugin.