<!--
Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.  Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.

This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).

You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->

<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>org.openjdk.jcstress</groupId>
    <artifactId>jcstress-parent</artifactId>
    <version>0.14</version>
    <packaging>pom</packaging>

    <name>JCStress Parent</name>

    <description>
        The Java Concurrency Stress tests (JCStress) is an experimental harness and a suite of tests
        to aid the research in the correctness of concurrency support in the JVM, class libraries,
        and hardware.
    </description>

    <url>
        https://github.com/openjdk/jcstress/
    </url>

    <scm>
        <url>https://github.com/openjdk/jcstress.git</url>
        <connection>scm:git:https://github.com/openjdk/jcstress.git</connection>
    </scm>

    <licenses>
        <license>
            <name>GNU General Public License (GPL), version 2, with the Classpath exception</name>
            <url>http://openjdk.java.net/legal/gplv2+ce.html</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>shade</id>
            <name>Aleksey Shipilev</name>
            <email>shade@redhat.com</email>
        </developer>
    </developers>

    <prerequisites>
        <maven>3.2</maven>
    </prerequisites>

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

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.1</version>
                    <configuration>
                        <source>1.8</source>
                        <target>1.8</target>
                        <compilerArgs>
                            <arg>-Xlint:all,-deprecation,-options,-serial,-processing</arg>
                            <arg>-Werror</arg>
                        </compilerArgs>
                        <showWarnings>true</showWarnings>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>3.2.1</version>
                    <executions>
                        <execution>
                            <id>main</id>
                            <phase>package</phase>
                            <goals>
                                <goal>shade</goal>
                            </goals>
                            <configuration>
                                <finalName>jcstress</finalName>
                                <shadedArtifactAttached>true</shadedArtifactAttached>
                                <shadedClassifierName>full</shadedClassifierName>
                                <transformers>
                                    <transformer
                                            implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                        <mainClass>org.openjdk.jcstress.Main</mainClass>
                                    </transformer>
                                    <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
                                        <resource>META-INF/TestList</resource>
                                    </transformer>
                                </transformers>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>4.1</version>
                    <configuration>
                        <licenseSets>
                            <licenseSet>
                                <header>file:///${project.basedir}/../src/license/gpl_cpe/header.txt</header>
                                <excludes>
                                    <exclude>**/README</exclude>
                                    <exclude>src/test/resources/**</exclude>
                                    <exclude>src/main/resources/**</exclude>
                                </excludes>
                            </licenseSet>
                        </licenseSets>
                        <skipExistingHeaders>true</skipExistingHeaders>
                        <strictCheck>true</strictCheck>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>format</goal>
                            </goals>
                            <phase>process-sources</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>1.4</version>
                    <executions>
                        <execution>
                            <phase>generate-resources</phase>
                            <goals>
                                <goal>create</goal>
                            </goals>
                        </execution>
                    </executions>
                    <configuration>
                        <doCheck>false</doCheck>
                        <doUpdate>false</doUpdate>
                        <shortRevisionLength>16</shortRevisionLength>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.0.2</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                            <manifestEntries>
                                <Implementation-Build>${buildNumber}</Implementation-Build>
                                <Build-Time>${maven.build.timestamp}</Build-Time>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>3.0.0-M1</version>
                    <executions>
                        <execution>
                            <id>enforce-versions</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireMavenVersion>
                                        <version>3.2</version>
                                    </requireMavenVersion>
                                    <requireJavaVersion>
                                        <version>11</version>
                                    </requireJavaVersion>
                                </rules>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin> <!-- skip deploying artifacts by default -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.1</version>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>

                <!-- Create source jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Create Javadoc jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-javadoc</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <configuration>
                                <source>8</source>
                                <excludePackageNames>
                                    sun,
                                    jdk,
                                    org.openjdk.jcstress.infra,
                                    org.openjdk.jcstress.grading,
                                    org.openjdk.jcstress.processors,
                                    org.openjdk.jcstress.link,
                                    org.openjdk.jcstress.util,
                                    org.openjdk.jcstress.vm,
                                </excludePackageNames>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-archetype-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <escapeString>\</escapeString>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>1.8</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>exec-maven-plugin</artifactId>
                    <version>1.3.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>3.1.0</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.16</version>
                    <configuration>
                        <trimStackTrace>false</trimStackTrace>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin> <!-- deploy this artifact -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <inherited>false</inherited> <!-- nope, not for children modules -->
                <configuration>
                    <skip>false</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>net.sf.jopt-simple</groupId>
                <artifactId>jopt-simple</artifactId>
                <version>4.6</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>4.13.2</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna</artifactId>
                <version>5.8.0</version>
            </dependency>
            <dependency>
                <groupId>net.java.dev.jna</groupId>
                <artifactId>jna-platform</artifactId>
                <version>5.8.0</version>
            </dependency>
            <dependency>
                <groupId>com.google.jimfs</groupId>
                <artifactId>jimfs</artifactId>
                <version>1.2</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm</artifactId>
                <version>9.0</version>
            </dependency>
            <dependency>
                <groupId>org.ow2.asm</groupId>
                <artifactId>asm-util</artifactId>
                <version>9.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <modules>
        <module>jcstress-test-base</module>
        <module>jcstress-test-gen</module>
        <module>jcstress-result-gen</module>
        <module>jcstress-contended-autoinjector</module>
        <module>jcstress-core</module>
        <module>jcstress-samples</module>
        <module>jcstress-java-test-archetype</module>
        <module>jcstress-benchmarks</module>
        <module>tests-custom</module>
        <module>tests-chapter-0a</module>
        <module>tests-chapter-0b</module>
        <module>tests-chapter-0c</module>
        <module>tests-chapter-0d</module>
        <module>tests-chapter-0e</module>
        <module>tests-chapter-1a</module>
        <module>tests-chapter-1b</module>
        <module>tests-chapter-1c</module>
        <module>tests-chapter-1d</module>
        <module>tests-chapter-2a</module>
        <module>tests-chapter-2b</module>
        <module>tests-all</module>
  </modules>

</project>
