Skip to content
Snippets Groups Projects
Commit 87fd44a7 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 ab9cc6e9
Branches
No related tags found
No related merge requests found
Pipeline #11054 failed
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</fr:x_form> </fr:x_form>
</pl:initParameters> </pl:initParameters>
<pl:description>SLUB Storage Plugin</pl:description> <pl:description>SLUB Storage Plugin</pl:description>
<pl:version>2.99</pl:version> <pl:version>@version@</pl:version>
<pl:materialType>DIGITAL</pl:materialType> <pl:materialType>DIGITAL</pl:materialType>
<pl:module>Repository</pl:module> <pl:module>Repository</pl:module>
<pl:generalType>TASK</pl:generalType> <pl:generalType>TASK</pl:generalType>
......
...@@ -4,6 +4,12 @@ ...@@ -4,6 +4,12 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>org.slub.rosetta.dps.repository.plugin</groupId> <groupId>org.slub.rosetta.dps.repository.plugin</groupId>
<artifactId>SLUBStoragePlugin</artifactId> <artifactId>SLUBStoragePlugin</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>2.99</version> <version>2.99</version>
<description>Plugin to organize permanent storage structure in a format like "/yyyy/mm/dd/IEPID/", <description>Plugin to organize permanent storage structure in a format like "/yyyy/mm/dd/IEPID/",
used for ExlibrisGroup`s Rosetta archival information system</description> used for ExlibrisGroup`s Rosetta archival information system</description>
...@@ -17,9 +23,43 @@ ...@@ -17,9 +23,43 @@
<testSourceDirectory>src/test/java/</testSourceDirectory> <testSourceDirectory>src/test/java/</testSourceDirectory>
<plugins> <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> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId> <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> <configuration>
<outputDirectory>${project.build.outputDirectory}/PLUGIN-INF/</outputDirectory> <outputDirectory>${project.build.outputDirectory}/PLUGIN-INF/</outputDirectory>
<resources> <resources>
...@@ -83,10 +123,6 @@ ...@@ -83,10 +123,6 @@
</plugins> </plugins>
</build> </build>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
<dependencies> <dependencies>
<dependency> <dependency>
...@@ -98,10 +134,19 @@ ...@@ -98,10 +134,19 @@
<dependency> <dependency>
<groupId>com.exlibris</groupId> <groupId>com.exlibris</groupId>
<artifactId>core</artifactId> <artifactId>core</artifactId>
<version>8.2.0</version> <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> <scope>system</scope>
<systemPath>${ROSETTASDK}/lib/dps-sdk-8.2.0.jar</systemPath> <systemPath>${rosetta-sdk-base-jar}</systemPath>
</dependency> </dependency>
-->
<!-- test --> <!-- test -->
<dependency> <dependency>
<groupId>org.apache.commons</groupId> <groupId>org.apache.commons</groupId>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment