<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>net.shibboleth.idp.plugin.oidfed</groupId>
        <artifactId>idp-plugin-oidfed-op-parent</artifactId>
        <version>1.0.0-SNAPSHOT</version>
    </parent>
         
    <artifactId>idp-plugin-oidfed-op-dist</artifactId>
    <packaging>pom</packaging>
    <name>Shibboleth IdP :: Plugins :: OpenID Federation plugin for OpenID Provider Distribution</name>
    <description>IdP OIDFED plugin for OP packaging.</description>

    <properties>
        <checkstyle.configLocation>${project.basedir}/../resources/checkstyle/checkstyle.xml</checkstyle.configLocation>
        <dist.plugin.finalName>shibboleth-idp-plugin-oidfed-op-${project.version}</dist.plugin.finalName>
        <maven-dist-enforcer-data.version>2.0.1</maven-dist-enforcer-data.version>
    </properties>

    <build>
        <plugins>
            <!-- Assemble -->
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <appendAssemblyId>false</appendAssemblyId>
                            <descriptors>
                                <descriptor>src/main/assembly/assembly-tgz.xml</descriptor>
                            </descriptors>
                            <finalName>${dist.plugin.finalName}</finalName>
                            <overrideUid>1000</overrideUid>
                            <overrideGid>1000</overrideGid>
                            <tarLongFileMode>gnu</tarLongFileMode>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <dependencies>
                    <dependency>
                        <groupId>net.shibboleth.maven.enforcer.rules</groupId>
                        <artifactId>maven-dist-enforcer</artifactId>
                        <version>${maven-dist-enforcer.version}</version>
                    </dependency>
                </dependencies>
                <executions>
                    <execution>
                        <id>oidfed-op-enforce</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <jarEnforcer implementation="net.shibboleth.mvn.enforcer.impl.JarEnforcer">
                                    <dataGroupId>net.shibboleth.maven.enforcer.rules</dataGroupId>
                                    <dataArtifactId>maven-dist-enforcer-data</dataArtifactId>
                                    <dataVersion>${maven-dist-enforcer-data.version}</dataVersion>
                                    <dataKeyRing>${basedir}/src/main/enforcer/shibbolethKeys.gpg</dataKeyRing>
                                    <parentPomDir>${basedir}/..</parentPomDir>
                                    <tgzFiles>${project.build.directory}/${dist.plugin.finalName}.tar.gz</tgzFiles>
                                    <checkSignatures>true</checkSignatures>
                                    <checkDependencies>true</checkDependencies>
                                    <listJarSources>true</listJarSources>
                                    <checkM2>${net.shibboleth.maven.enforcer.rules.checkM2}</checkM2>
                                </jarEnforcer>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>

    </build>


</project>
