Skip to content
Snippets Groups Projects
Commit 90f9de0d authored by Andreas Romeyke's avatar Andreas Romeyke
Browse files

- fixed to use project properties to avoid multiple adaption-points if version changed

- set properties on top, added common project specific properties, such rosetta SDK version
- added replacer plugin to set version in PLUGIN-INF/..
- prepared to replace by version using pom.xml
parent 2f47ff93
No related branches found
No related tags found
No related merge requests found
Pipeline #11053 passed
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</fr:x_form> </fr:x_form>
</pl:initParameters> </pl:initParameters>
<pl:description>SLUB Format Validation Plugin for XML</pl:description> <pl:description>SLUB Format Validation Plugin for XML</pl:description>
<pl:version>0.04</pl:version> <pl:version>@version@</pl:version>
<pl:materialType>DIGITAL</pl:materialType> <pl:materialType>DIGITAL</pl:materialType>
<pl:module>Preservation</pl:module> <pl:module>Preservation</pl:module>
<pl:generalType>TASK</pl:generalType> <pl:generalType>TASK</pl:generalType>
......
pom.xml 0 → 100644
<?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>XmlFormatValidationPlugin</artifactId>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<rosetta-sdk-version>8.3.0</rosetta-sdk-version>
<rosetta-sdk-base-jar>${ROSETTASDK}/lib/dps-sdk-${rosetta-sdk-version}.jar</rosetta-sdk-base-jar>
</properties>
<version>0.04</version>
<description>Plugin to validate XML files using local schema files (SLUB internal) to validate schema/schematron/relaxng related XML files,
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>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<version>1.5.3</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>replace</goal>
</goals>
</execution>
</executions>
<configuration>
<file>${project.build.outputDirectory}/PLUGIN-INF/metadata_${artifactId}.xml</file>
<replacements>
<replacement>
<xpath>/*[local-name() = 'metadata-config']/*[local-name() = 'version']/text()</xpath>
<token>@version@</token>
<value>${project.version}</value>
</replacement>
</replacements>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
</execution>
</executions>
<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>
<dependencies>
<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>${rosetta-sdk-version}</version>
<scope>system</scope>
<systemPath>${rosetta-sdk-base-jar}</systemPath>
</dependency>
<dependency>
<groupId>com.exlibris</groupId>
<artifactId>dps</artifactId>
<version>${rosetta-sdk-version}</version>
<scope>system</scope>
<systemPath>${rosetta-sdk-base-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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment