Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made signature version numbers 'properties', not project version numbers - dependency version nos now match project ones #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
PRONOM
======

At present this repository only holds Maven build configuration for creating Maven artifacts for both the PRONOM Signature File and Conatiner Signature File.
This repository only holds Maven build configuration for creating Maven
artifacts for both the PRONOM Signature File and Container Signature File. The
signature file versions need to be specified in the respective pom files; the
files are automatically downloaded for the National Archives web site, license
information inserted, and then assembled in a zip file.

These artifacts are published to Maven Central - http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22uk.gov.nationalarchives.pronom%22
These artifacts are published to Maven Central - http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22uk.gov.nationalarchives.pronom%22
12 changes: 9 additions & 3 deletions pronom-container-signature-file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<packaging>jar</packaging>

<!-- change this to reflect the version of the container signature file from PRONOM -->
<version>20131112-SNAPSHOT</version>
<properties><signature.version>20150218</signature.version></properties>


<name>${project.artifactId}</name>
Expand All @@ -38,7 +38,7 @@
<goal>download-single</goal>
</goals>
<configuration>
<url>http://www.nationalarchives.gov.uk/pronom</url>
<url>http://apps.nationalarchives.gov.uk/pronom</url>
<fromFile>container-signature.xml</fromFile>
<toFile>${project.build.directory}/generated-resources/wagon/container-signature-file.xml</toFile>
</configuration>
Expand All @@ -61,6 +61,12 @@
<transformationSet>
<dir>${project.build.directory}/generated-resources/wagon</dir>
<stylesheet>${project.basedir}/../pronom-parent/add-licence.xslt</stylesheet>
<parameters>
<parameter>
<name>version</name>
<value>${signature.version}</value>
</parameter>
</parameters>
</transformationSet>
</transformationSets>
</configuration>
Expand All @@ -79,4 +85,4 @@
</resource>
</resources>
</build>
</project>
</project>
11 changes: 8 additions & 3 deletions pronom-parent/add-licence.xslt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
version="2.0">

<xsl:output indent="yes" encoding="UTF-8" omit-xml-declaration="no"/>

<xsl:param name="version" /> <!-- defined in pom file -->

<xsl:template match="sf:FFSignatureFile | ContainerSignatureMapping">
<xsl:comment><xsl:value-of select="unparsed-text('../LICENSE')"/></xsl:comment>

<xsl:comment><xsl:value-of select="unparsed-text('../LICENSE')"/>
<xsl:if test="$version != ''">
<xsl:text>Signature file version: </xsl:text><xsl:value-of select="$version"/>
</xsl:if>
</xsl:comment>

<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
Expand Down
4 changes: 2 additions & 2 deletions pronom-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@

<build>
<pluginManagement>
<plugins>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>1.3.1</version>
</plugin>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
Expand Down
5 changes: 2 additions & 3 deletions pronom-signature-file/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
<packaging>jar</packaging>

<!-- change this to get a newer signature file from PRONOM -->
<!-- set to '-SNAPSHOT' before release, but will only build without -->
<version>72-SNAPSHOT</version>
<properties><signature.version>81</signature.version></properties>


<name>${project.artifactId}</name>
Expand All @@ -40,7 +39,7 @@
</goals>
<configuration>
<url>http://nationalarchives.gov.uk/documents</url>
<fromFile>DROID_SignatureFile_V${project.version}.xml</fromFile>
<fromFile>DROID_SignatureFile_V${signature.version}.xml</fromFile>
<toFile>${project.build.directory}/generated-resources/wagon/signature-file.xml</toFile>
</configuration>
</execution>
Expand Down
10 changes: 4 additions & 6 deletions pronom-signature-files/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,23 @@
<packaging>jar</packaging>

<name>pronom-signature-files</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<!-- run with `mvn versions:use-latest-versions` to substitute current dependency versions -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pronom-signature-file</artifactId>
<version>0</version>
<scope>runtime</scope>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pronom-container-signature-file</artifactId>
<version>0</version>
<scope>runtime</scope>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>

Expand Down
3 changes: 2 additions & 1 deletion pronom-signature-files/src/main/assembly/zipped-output.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
<formats>
<format>zip</format>
</formats>

<includeBaseDirectory>false</includeBaseDirectory>

<dependencySets>
<dependencySet>
<outputDirectory>/</outputDirectory>
<useProjectArtifact>true</useProjectArtifact>
<useProjectArtifact>false</useProjectArtifact>
<unpack>true</unpack>
<scope>runtime</scope>
</dependencySet>
Expand Down