-
Notifications
You must be signed in to change notification settings - Fork 0
dependency
Christian Lück edited this page Feb 7, 2025
·
1 revision
The SEED TEI Transformations are packetized for using them as a dependency in downstream XSLT projects and digitals editions. To download the package, Maven can be used for that and we recommend using the Tooling project for setting up a reproducible tooling environment for your project.
In your project's pom.xml, use the maven-dependency-plugin to
download and unpack the package. First tell maven to use github's
maven package registry.
<repositories>
<repository>
<id>github-scdh-seed-tei-transformations</id>
<url>https://maven.pkg.github.com/SCDH/seed-tei-transformations</url>
</repository>
<!-- ... -->
</repositories>
Then, in the plugins section, configure the maven-dependency-plugin
to download and unpack the package:
<plugin>
<!-- where to place the tools -->
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-seed-tei-transformations</id>
<phase>generate-sources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
<includeArtifactIds>seed-tei-transformations</includeArtifactIds>
<artifactItems>
<artifactItem>
<groupId>de.wwu.scdh.tei</groupId>
<artifactId>seed-tei-transformations</artifactId>
<version>0.14.8</version>
<classifier>package</classifier>
<type>zip</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
You have to authenticate, in order to use github's maven package
registry. Therefore you need an API access
token
(classic) and provide it to your maven configuration, which is located
in ~/.m2/settings.xml.
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd">
<profiles>
<profile>
<properties>
<github.password>YOUR_API_KEY</github.password>
</properties>
<repositories>
<repository>
<id>github-scdh-seed-tei-transformations</id>
<url>https://maven.pkg.github.com/SCDH/seed-tei-transformations</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<!-- other repositories -->
</repositories>
</profile>
</profiles>
<servers>
<server>
<id>github-scdh-seed-tei-transformations</id>
<username>YOUR_GITHUB_USERNAME</username>
<password>${github.password}</password>
</server>
<!-- other servers and projects -->
</servers>
</settings>