diff --git a/Makefile b/Makefile deleted file mode 100644 index 4d690e61b0ec1912dfaf2ca5d1521e9802a5336e..0000000000000000000000000000000000000000 --- a/Makefile +++ /dev/null @@ -1,71 +0,0 @@ -# Andreas Romeyke, SLUB Dresden -# Plugin, welches TIFFs via checkit_tiff validiert - -# Pfad zu Java -JAVAPATH:=$(wildcard /usr/lib/jvm/java-1.17.0-openjdk-*/bin/) -JAVARELEASE:=17 - -# Verwendete Rosetta-Version -ROSETTAVERSION:=8.0.0 - -# Pfad zum Rosetta-SDK -ROSETTASDK:=/exlibris/dps/d4_1/system.dir/dps-sdk-${ROSETTAVERSION}/dps-sdk-projects/dps-sdk-deposit/lib/ - -# classpath -JUNITCLASSPATH:=/usr/share/java/junit4.jar -CLASSPATH:=$(shell find ${ROSETTASDK} -name "*.jar" -print | xargs echo | sed -e "s/ /:/g") - -# sources -PLUGINCLASS:=SLUBRetroMonographieTIFFFormatValidationPlugin -SOURCES:=java/org/slub/rosetta/dps/repository/plugin/${PLUGINCLASS}.java -OBJS:=$(SOURCES:.java=.class) -JAR:=${PLUGINCLASS}.jar -BUILD:=build/ - -all: $(BUILD) $(JAR) - -help: - @echo "erzeugt Plugin für Rosetta von Exlibris" - @echo "" - @echo "Das Argument 'clean' löscht temporäre Dateien, 'help' gibt diese Hilfe aus und" - @echo "'all' erzeugt ein JAR-File und ein Bash-Script welches das Java-Programm" - @echo "aufruft." - -jarclean: - @rm -Rf $(BUILD) - -test: $(OBJS) - java -cp ${CLASSPATH}:$(JUNITCLASSPATH) org.junit.runner.JUnitCore - -clean: jarclean - @rm -Rf doc/ - find ./java/org/ -name "*.class" -exec rm -f \{\} \; - @rm -Rf $(JAR) - -distclean: clean - find ./ -name "*~" -exec rm -f \{\} \; - @rm -Rf null - -$(BUILD): - @mkdir $@; - @mkdir $@/lib - -$(JAR): $(OBJS) - @cp -r PLUGIN-INF/ $(BUILD) - @cp -r META-INF/ $(BUILD) - @cd java; find ./ -name "*.class" -print -exec cp --parents -r \{\} $(PWD)/$(BUILD) \; ; cd .. - @cd $(BUILD); ${JAVAPATH}/jar cfvM ../$@ ./* ; cd .. - -%.class: %.java - ${JAVAPATH}/javac --release ${JAVARELEASE} -g -classpath ${CLASSPATH}:${JUNITCLASSPATH} -Xlint:all $< - -doc: $(SOURCES) - javadoc -d doc/ $^ - -check_prerequisites: - @echo -n "### Checking java path: $(JAVAPATH) ...." - @if [ -e $(JAVAPATH) ]; then echo "fine :)"; else echo " not found! :("; fi - @echo -n "### Checking Exlibris Rosetta SDK path: $(ROSETTASDK) ...." - @if [ -e $(ROSETTASDK) ]; then echo "fine :)"; else echo " not found! :("; fi - -.PHONY: help clean distclean jarclean test diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..92ead3afb1c804081c127799da224664a0de7d8e --- /dev/null +++ b/pom.xml @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> +<modelVersion>4.0.0</modelVersion> +<groupId>org.slub.rosetta.dps.repository.plugin</groupId> +<artifactId>SLUBRetroMonographieTIFFFormatValidationPlugin</artifactId> +<version>2.30</version> +<description>PDF plugin to evaluate baseline TIFF files using checkit_tiff, + used for ExlibrisGroup`s Rosetta archival information system</description> +<build> + <testResources> + <testResource> + <directory>${project.basedir}/resources/</directory> + </testResource> + </testResources> + <sourceDirectory>src/main/java/</sourceDirectory> + <testSourceDirectory>src/test/java/</testSourceDirectory> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <configuration> + <outputDirectory>${project.build.outputDirectory}/PLUGIN-INF/</outputDirectory> + <resources> + <resource> + <directory>${project.basedir}/PLUGIN-INF/</directory> + </resource> + </resources> + </configuration> + </plugin> + + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <phase>prepare-package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>${project.build.outputDirectory}/lib</outputDirectory> + <includeGroupIds>org.verapdf,org.mozilla</includeGroupIds> + <excludeGroupId>com.exlibris</excludeGroupId> + <excludeGroupId>org.apache.commons</excludeGroupId> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs-maven-plugin</artifactId> + <version>4.9.3.0</version> + <dependencies> + <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs --> + <dependency> + <groupId>com.github.spotbugs</groupId> + <artifactId>spotbugs</artifactId> + <version>4.9.3</version> + </dependency> + </dependencies> + <configuration> + <includeFilterFile>spotbugs-include.xml</includeFilterFile> + <excludeFilterFile>spotbugs-exclude.xml</excludeFilterFile> + </configuration> + </plugin> +<!-- + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <configuration> + <archive> + <manifest> + <addClasspath>true</addClasspath> + <classpathPrefix>lib/</classpathPrefix> + <mainClass>org.slub.rosetta.dps.repository.plugin.SLUBPDFAFormatValdiationPlugin</mainClass> + </manifest> + </archive> + </configuration> + </plugin> + --> + + </plugins> +</build> +<properties> + <maven.compiler.source>17</maven.compiler.source> + <maven.compiler.target>17</maven.compiler.target> +</properties> + +<dependencies> + <!-- + <dependency> + <artifactId>core</artifactId> + <groupId>org.verapdf</groupId> + <version>1.26.5</version> + <scope>provided</scope> + </dependency> + <dependency> + <artifactId>pdf-model</artifactId> + <groupId>org.verapdf</groupId> + <version>1.26.1</version> + <scope>provided</scope> + </dependency> + <dependency> + <artifactId>validation-model</artifactId> + <groupId>org.verapdf</groupId> + <version>1.26.5</version> + <scope>provided</scope> + </dependency> + --> + <dependency> + <groupId>org.apache.logging.log4j</groupId> + <artifactId>log4j-core</artifactId> + <version>2.24.3</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.exlibris</groupId> + <artifactId>core</artifactId> + <version>8.2.0</version> + <scope>system</scope> + <systemPath>${ROSETTASDK}/lib/dps-sdk-8.2.0.jar</systemPath> + </dependency> + <dependency> + <groupId>com.exlibris</groupId> + <artifactId>dps</artifactId> + <version>8.2.0</version> + <scope>system</scope> + <systemPath>${ROSETTASDK}/lib/dps-sdk-8.2.0.jar</systemPath> + </dependency> + + <!-- test --> + <dependency> + <groupId>org.apache.commons</groupId> + <artifactId>commons-lang</artifactId> + <version>2.6</version> + <scope>system</scope> + <systemPath>${ROSETTASDK}/dps-sdk-projects/dps-sdk-deposit/lib/commons-lang-2.6.jar</systemPath> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.9</version> + <scope>test</scope> + <type>jar</type> + </dependency> + + +</dependencies> +</project> diff --git a/java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java b/src/main/java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java similarity index 100% rename from java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java rename to src/main/java/org/slub/rosetta/dps/repository/plugin/SLUBRetroMonographieTIFFFormatValidationPlugin.java