From 58a19b1f54719d302c345c2db26d52e59739f458 Mon Sep 17 00:00:00 2001 From: Sam Alloing Date: Fri, 16 Feb 2024 09:14:43 +0100 Subject: [PATCH 1/3] Change in GUI MIX field name from mimetype to format name The GUI shows Mimetype for MIX image data, according to the specifications this should be Format Name. The export in txt and XML show the correct field, but the GUI of jHove showed the wrong field name. This pull request fixes https://github.com/openpreserve/jhove/issues/896 --- .../main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java index 280798df0..d5be94124 100644 --- a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java +++ b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java @@ -889,7 +889,7 @@ private DefaultMutableTreeNode nisoToNode(NisoImageMetadata niso) { "NisoImageMetadata", true); String s = niso.getMimeType(); if (s != null) { - val.add(new DefaultMutableTreeNode("MIMEType: " + s, false)); + val.add(new DefaultMutableTreeNode("FormatName: " + s, false)); } s = niso.getByteOrder(); if (s != null) { From 4021afde4b571d8805c2a944813ba61e2382842a Mon Sep 17 00:00:00 2001 From: Sam Alloing Date: Fri, 16 Feb 2024 15:02:17 +0100 Subject: [PATCH 2/3] add BitPerSampleUnit to the GUI The BitsPerSampleUnit is missing in the GUI. It is hard-coded as Integer, because this is how it is also done in the other handlers. According to the specification of MIX, it can also be float. but this is not supported by jhove --- .../java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java index 280798df0..3fa3d8af6 100644 --- a/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java +++ b/jhove-apps/src/main/java/edu/harvard/hul/ois/jhove/viewer/RepTreeRoot.java @@ -1274,6 +1274,10 @@ private DefaultMutableTreeNode nisoToNode(NisoImageMetadata niso) { for (int i = 0; i < iarray.length; i++) { nod.add(new DefaultMutableTreeNode(Integer.toString(iarray[i]), false)); + //BitsPerSampleUnit Integer is assumed, because of BitsPerSample + // According to the specification, it can also be float. + // This is currently not supported by jHove + nod.add(new DefaultMutableTreeNode("Integer")); } } if ((n = niso.getSamplesPerPixel()) != NisoImageMetadata.NULL) { From 39630bac8a001f4006021f5091438be9ba623c1b Mon Sep 17 00:00:00 2001 From: Carl Wilson Date: Mon, 4 Mar 2024 10:57:48 +0000 Subject: [PATCH 3/3] MAINT: Upgrade Maven build - removed some redundant plugin declarations; and - bumped versions of various dependencies: - Izpack -> 5.2; - maven-clean-plugin -> 3.3.2; - maven-compiler-plugin -> 3.12.1; - maven-dependency-plugin -> 3.6.1; - maven-site-plugin -> 4.0.0-M13; - maven-javadoc-plugin -> 3.6.3; - maven-surefire-plugin -> 3.2.5; - maven-jacoco-plugin -> 0.8.11; - jaxb -> 1.4; - junit -> 5.10.2 via vintage engine. --- jhove-apps/pom.xml | 5 ---- jhove-bbt/scripts/bbt-jhove.sh | 2 +- jhove-core/pom.xml | 10 +++++-- jhove-ext-modules/pom.xml | 4 +-- jhove-installer/pom.xml | 2 +- jhove-modules/pom.xml | 4 +-- pom.xml | 50 ++++++++++++++++++---------------- 7 files changed, 39 insertions(+), 38 deletions(-) diff --git a/jhove-apps/pom.xml b/jhove-apps/pom.xml index f473d897e..1ef75da71 100644 --- a/jhove-apps/pom.xml +++ b/jhove-apps/pom.xml @@ -60,11 +60,6 @@ jhove-core ${project.version} - - - junit - junit - diff --git a/jhove-bbt/scripts/bbt-jhove.sh b/jhove-bbt/scripts/bbt-jhove.sh index e90847ae8..83b9d9b12 100755 --- a/jhove-bbt/scripts/bbt-jhove.sh +++ b/jhove-bbt/scripts/bbt-jhove.sh @@ -127,7 +127,7 @@ showHelp() { checkParams "$@" candidate="${paramOutputLoc:?}/${MAJOR_MINOR_VER}" tempInstallLoc="/tmp/to-test" -sed -i 's/^java.*/java -javaagent:${HOME}\/\.m2\/repository\/org\/jacoco\/org\.jacoco\.agent\/0.8.10\/org\.jacoco.agent-0\.8\.10-runtime\.jar=destfile=jhove-apps\/target\/jacoco\.exec -Xss2048k -classpath "$CP" edu.harvard.hul.ois.jhove.Jhove -c "${CONFIG}" "${@}"/g' "${tempInstallLoc}/jhove" +sed -i 's/^java.*/java -javaagent:${HOME}\/\.m2\/repository\/org\/jacoco\/org\.jacoco\.agent\/0.8.11\/org\.jacoco.agent-0\.8\.11-runtime\.jar=destfile=jhove-apps\/target\/jacoco\.exec -Xss2048k -classpath "$CP" edu.harvard.hul.ois.jhove.Jhove -c "${CONFIG}" "${@}"/g' "${tempInstallLoc}/jhove" bash "$SCRIPT_DIR/baseline-jhove.sh" -j "${tempInstallLoc}" -c "${paramCorpusLoc}" -o "${candidate}" if [[ -f "${SCRIPT_DIR}/create-${MAJOR_MINOR_VER}-target.sh" ]] diff --git a/jhove-core/pom.xml b/jhove-core/pom.xml index 7d804ace5..a47b55767 100644 --- a/jhove-core/pom.xml +++ b/jhove-core/pom.xml @@ -35,13 +35,17 @@ 1.1.3 - junit - junit + org.junit.jupiter + junit-jupiter-engine + + + org.junit.vintage + junit-vintage-engine nl.jqno.equalsverifier equalsverifier - 3.14 + 3.15.8 test diff --git a/jhove-ext-modules/pom.xml b/jhove-ext-modules/pom.xml index ad1923f8c..af3c83052 100644 --- a/jhove-ext-modules/pom.xml +++ b/jhove-ext-modules/pom.xml @@ -58,8 +58,8 @@ ${project.version} - junit - junit + org.junit.vintage + junit-vintage-engine diff --git a/jhove-installer/pom.xml b/jhove-installer/pom.xml index 19129ffe7..96ce9bf64 100644 --- a/jhove-installer/pom.xml +++ b/jhove-installer/pom.xml @@ -14,7 +14,7 @@ jhove-xplt-installer-${project.version}.jar - 5.1.3 + 5.2.0 ${project.build.directory}/staging ${project.build.directory} ${project.build.scriptSourceDirectory} diff --git a/jhove-modules/pom.xml b/jhove-modules/pom.xml index 17b65bb02..f941986b6 100644 --- a/jhove-modules/pom.xml +++ b/jhove-modules/pom.xml @@ -21,8 +21,8 @@ 1.29.0-SNAPSHOT - junit - junit + org.junit.vintage + junit-vintage-engine javax.xml.bind diff --git a/pom.xml b/pom.xml index f18aa3994..87c508146 100644 --- a/pom.xml +++ b/pom.xml @@ -68,28 +68,27 @@ UTF-8 UTF-8 - 3.1.0 3.6.0 - 3.2.0 - 3.11.0 - 3.6.0 + 3.3.2 + 3.12.1 + 3.6.1 3.1.1 3.1.1 3.3.1 - 4.0.0-M8 + 4.0.0-M13 3.1.0 3.3.0 - 3.5.0 + 3.6.3 3.3.0 - 3.1.2 + 3.2.5 3.0.1 - 0.8.10 + 0.8.11 1.8 1.8 2.4.0-b180830.0359 - 4.0.3 - 4.0.3 - 4.13.2 + 4.0.4 + 4.0.4 + 5.10.2 8 ${maven.build.timestamp} yyyy-MM-dd HH:mm:ss @@ -98,11 +97,6 @@ - - org.apache.maven.plugins - maven-antrun-plugin - ${mvn.antrun.version} - org.apache.maven.plugins maven-assembly-plugin @@ -224,9 +218,16 @@ + + + org.junit.jupiter + junit-jupiter-engine + ${junit.version} + test + - junit - junit + org.junit.vintage + junit-vintage-engine ${junit.version} test @@ -302,12 +303,13 @@ - - org.codehaus.sonar-plugins.java - sonar-jacoco-listeners - 1.2 - test - + + + org.sonarsource.java + sonar-jacoco-listeners + 5.14.0.18788 + test +