lockss-plugins-parent-pom
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency>
<groupId>org.lockss</groupId>
<artifactId>lockss-plugins-parent-pom</artifactId>
<version>1.6.2</version>
</dependency><?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2000-2023, Board of Trustees of Leland Stanford Jr. University
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-->
<!-- In order to build this parent pom, buildingParent must be defined -->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.lockss</groupId>
<artifactId>lockss-parent-pom</artifactId>
<version>1.17.2</version>
<relativePath/>
</parent>
<groupId>org.lockss</groupId>
<artifactId>lockss-plugins-parent-pom</artifactId>
<version>1.6.2</version>
<packaging>pom</packaging>
<name>lockss-plugins-parent-pom</name>
<description>Maven infrastructure to build LOCKSS plugins and tdbs</description>
<properties>
<keystore.file>none</keystore.file>
<keystore.alias>none</keystore.alias>
<keystore.password>none</keystore.password>
</properties>
<dependencies>
<dependency>
<groupId>org.lockss</groupId>
<artifactId>lockss-core-bundle</artifactId>
<version>${version.lockss.lockss-core-bundle}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.lockss</groupId>
<artifactId>lockss-core-tests-bundle</artifactId>
<version>${version.lockss.lockss-core-bundle}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>${version.dependency.json-path}</version>
</dependency>
<dependency>
<groupId>org.lockss.laaws</groupId>
<artifactId>lockss-plugin-compat</artifactId>
<version>${version.lockss.lockss-plugin-compat}</version>
</dependency>
<dependency>
<groupId>org.lockss</groupId>
<artifactId>lockss-junit4-bundle</artifactId>
<version>${version.lockss.lockss-junit4-bundle}</version>
<type>pom</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.lockss</groupId>
<artifactId>lockss-tdb-processor</artifactId>
<version>${version.lockss.lockss-tdb-processor}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- Set the attributes & config of all plugins we want to be
inherited by child poms. (Plugins referenced in a
<pluginManagement> section aren't part of the parent build's
lifecycle (alleviating the need for <skip> properties on the
tasks). But this just sets all the attributes, it's still
necessary to (effectively) include the plugins in the child
pom, which is done below.) -->
<pluginManagement>
<plugins>
<!-- Process tdb files in src/main/tdb and src/test/java -->
<plugin>
<groupId>org.lockss.laaws</groupId>
<artifactId>lockss-tdbxml-maven-plugin</artifactId>
<version>${version.lockss.lockss-tdbxml-maven-plugin}</version>
<executions>
<!-- src/main/tdb -->
<execution>
<id>processTdb</id>
<phase>compile</phase>
<goals>
<goal>tdbxml</goal>
</goals>
<configuration>
<srcDir>${basedir}/src/main/tdb</srcDir>
<dstDir>${project.build.directory}/tdbxml</dstDir>
<recurse>true</recurse>
</configuration>
</execution>
<execution>
<id>processTestTdb</id>
<phase>process-test-resources</phase>
<goals>
<goal>tdbxml</goal>
</goals>
<configuration>
<srcDir>${project.build.testSourceDirectory}</srcDir>
<dstDir>${project.build.testOutputDirectory}</dstDir>
<recurse>true</recurse>
</configuration>
</execution>
</executions>
</plugin>
<!-- Read signing keystore password if necessary -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${version.plugin.maven-antrun-plugin}</version>
<dependencies>
<dependency>
<groupId>ant-contrib</groupId>
<artifactId>ant-contrib</artifactId>
<version>${version.dependency.ant-contrib}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>read-password</id>
<goals>
<goal>run</goal>
</goals>
<phase>prepare-package</phase>
<configuration>
<skip>${skipSignPlugin}</skip>
<target>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
<if>
<and>
<isset property="keystore.file" />
<isset property="keystore.alias" />
</and>
<then>
<input message="Keystore password: "
addproperty="keystore.password">
<handler type="secure"/>
</input>
</then>
<else>
<echo message="keystore.file and keystore.alias must be defined" />
<fail message="keystore.file and keystore.alias must be defined" />
</else>
</if>
</target>
<exportAntProperties>true</exportAntProperties>
</configuration>
</execution>
</executions>
</plugin>
<!-- Validate then package plugins -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${version.plugin.exec-maven-plugin}</version>
<executions>
<!-- Run PluginWellformednessTests on all plugins -->
<execution>
<id>validate-plugins</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${skipWellFormednessTests}</skip>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>-Dorg.lockss.defaultLogLevel=${loglevel}</argument>
<argument>org.lockss.test.PluginWellformednessTests</argument>
<argument>-pd</argument>
<argument>${basedir}/target/classes</argument>
</arguments>
</configuration>
</execution>
<!-- Run PluginPackager on all plugins -->
<execution>
<id>package-plugins</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>java</executable>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>-Dorg.lockss.defaultLogLevel=${loglevel}</argument>
<argument>org.lockss.util.PluginPackager</argument>
<argument>-pd</argument>
<argument>${basedir}/target/classes</argument>
<argument>-od</argument>
<argument>${basedir}/target/pluginjars</argument>
<argument>-keystore</argument>
<argument>${keystore.file}</argument>
<argument>-alias</argument>
<argument>${keystore.alias}</argument>
<argument>-storepass</argument>
<argument>${keystore.password}</argument>
<argument>-keypass</argument>
<argument>${keystore.password}</argument>
<argument>-explodelib</argument>
</arguments>
</configuration>
</execution>
<!-- Run PluginWellformednessTests again, on packaged
plugin jars -->
<execution>
<id>validate-plugin-jars</id>
<phase>verify</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${skipWellFormednessTests}</skip>
<executable>java</executable>
<classpathScope>runtime</classpathScope>
<arguments>
<argument>-classpath</argument>
<classpath/>
<argument>-Dorg.lockss.defaultLogLevel=${loglevel}</argument>
<argument>org.lockss.test.PluginWellformednessTests</argument>
<argument>-pjd</argument>
<argument>${basedir}/target/pluginjars</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<!-- These declarations cause the children to get the plugins in
their lifecycle, but each execution specified above is
suppressed when building the parent. -->
<plugins>
<plugin>
<groupId>org.lockss.laaws</groupId>
<artifactId>lockss-tdbxml-maven-plugin</artifactId>
<version>${version.lockss.lockss-tdbxml-maven-plugin}</version>
<executions>
<execution>
<id>processTdb</id>
<inherited>false</inherited>
<phase>none</phase>
</execution>
<execution>
<id>processTestTdb</id>
<inherited>false</inherited>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${version.plugin.maven-antrun-plugin}</version>
<executions>
<execution>
<id>read-password</id>
<inherited>false</inherited>
<phase>none</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${version.plugin.exec-maven-plugin}</version>
<executions>
<execution>
<id>validate-plugins</id>
<inherited>false</inherited>
<phase>none</phase>
</execution>
<execution>
<id>package-plugins</id>
<inherited>false</inherited>
<phase>none</phase>
</execution>
<execution>
<id>validate-plugin-jars</id>
<inherited>false</inherited>
<phase>none</phase>
</execution>
</executions>
</plugin>
</plugins>
<!-- Copy support files needed by plugins and tests into target -->
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
<include>**/*.dat</include>
<include>**/*.dat.gz</include>
<include>**/*.dtd</include>
<include>**/*.props</include>
<include>**/*.keystore</include>
<include>**/lib/*.jar</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
<exclude>**/*.tdb</exclude>
</excludes>
</testResource>
</testResources>
</build>
<profiles>
<profile>
<!-- testing profile uses non-secret signing keystore in lockss-core
test jar -->
<id>testing</id>
<activation>
<property>
<name>testing</name>
</property>
</activation>
<properties>
<keystore.file>resource:org/lockss/plugin/develop.keystore</keystore.file>
<keystore.alias>develop</keystore.alias>
<keystore.password>devpass</keystore.password>
</properties>
</profile>
<profile>
<!-- jdk8 builds plugins compatible with lockss-daemon running
in Java 1.8 -->
<id>jdk8</id>
<activation>
<property>
<name>jdk8</name>
</property>
</activation>
<properties>
<build.java.version>8</build.java.version>
</properties>
</profile>
</profiles>
</project>