<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>
    <groupId>com.okworx.ilcd.validation.profiles</groupId>
    <artifactId>validation-profiles</artifactId>
    <version>1.0.5</version>
    <packaging>pom</packaging>

    <name>ILCD validation profiles</name>
    <description>validation profiles to be used together with com.okworx.ilcd.validation.ilcd-validation</description>
    <url>https://bitbucket.org/okusche/ilcdvalidation-profiles</url>

    <licenses>
        <license>
            <name>GNU Lesser General Public License</name>
            <url>https://www.gnu.org/licenses/lgpl-3.0.txt</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Oliver Kusche</name>
            <email>developer@okworx.com</email>
            <organization>ok*worx</organization>
            <organizationUrl>https://bitbucket.org/okusche/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://bitbucket.org/okusche/ilcdvalidation-profiles.git</connection>
        <developerConnection>scm:git:https://okusche@bitbucket.org/okusche/ilcdvalidation-profiles.git</developerConnection>
        <url>https://bitbucket.org/okusche/ilcdvalidation-profiles.git</url>
        <tag>validation-profiles-1.0.5</tag>
    </scm>

    <properties>
	    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <staging.timeout.minutes>10</staging.timeout.minutes>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.sonatype.central</groupId>
                <artifactId>central-publishing-maven-plugin</artifactId>
                <version>0.8.0</version>
                <extensions>true</extensions>
                <configuration>
                    <publishingServerId>central</publishingServerId>
                    <autoPublish>true</autoPublish>
                    <waitUntil>published</waitUntil>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <releaseProfiles>release</releaseProfiles>
                </configuration>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin><!-- copy resources to target/jar-content -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.3.0</version>
                    <executions>
                        <execution>
                            <id>copy-resource-one</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>copy-resources</goal>
                            </goals>
                            <configuration>
                                <outputDirectory>${project.basedir}/target/jar-content/</outputDirectory>
                                <resources>
                                    <resource>
                                        <directory>${project.basedir}/src/main/resources</directory>
                                        <excludes>
                                            <exclude>**/*.ser.z</exclude>
                                        </excludes>
                                        <filtering>true</filtering>
                                    </resource>
                                    <resource>
                                        <directory>${project.basedir}/src/main/resources</directory>
                                        <includes>
                                            <include>**/*.ser.z</include>
                                        </includes>
                                        <filtering>false</filtering>
                                    </resource>
                                </resources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin><!-- set target/jar-content as source directory for jar -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.3.0</version>
                        <configuration>
                        <classesDirectory>${project.basedir}/target/jar-content/</classesDirectory>
                        <includes>**/*</includes>
                    </configuration>
                </plugin>
                <plugin><!-- replace auto generated manifest in jar -->
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>truezip-maven-plugin</artifactId>
                    <version>1.2</version>
                    <executions>
                        <execution>
                            <id>replace-broken-manifest</id>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <phase>package</phase>
                            <configuration>
                                <files>
                                    <file>
                                        <source>${project.build.directory}/jar-content/META-INF/MANIFEST.MF</source>
                                        <outputDirectory>
                                            ${project.build.directory}/${project.build.finalName}.${project.packaging}/META-INF
                                        </outputDirectory>
                                        <filtered>true</filtered>
                                    </file>
                                </files>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.10.1</version>
                    <configuration>
                        <source>11</source>
                        <target>11</target>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
            </dependency>
            <dependency>
                <groupId>com.okworx.ilcd.validation</groupId>
                <artifactId>ilcd-validation</artifactId>
                <version>2.6.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>2.22.1</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>2.22.1</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>3.2.0</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>release-parent-only</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-release-plugin</artifactId>
                        <version>3.1.1</version>
                        <configuration>
                            <goals>deploy -N</goals>
                            <arguments>-N</arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <modules>
        <module>ef</module>
        <module>epd</module>
        <module>ilcd</module>
        <module>test</module>
    </modules>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>