<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  hermetic-maven-plugin
  %%
  Copyright (C) 2018 - 2021 Andreas Veithen
  %%
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  #L%
  -->
<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>com.github.veithen</groupId>
        <artifactId>parent</artifactId>
        <version>36</version>
    </parent>

    <groupId>com.github.veithen.maven</groupId>
    <artifactId>hermetic-maven-plugin</artifactId>
    <version>0.6.2</version>
    <packaging>maven-plugin</packaging>

    <url>https://github.com/veithen/hermetic-maven-plugin</url>
    <inceptionYear>2018</inceptionYear>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <scm>
        <url>https://github.com/veithen/hermetic-maven-plugin/tree/master</url>
        <connection>scm:git:http://github.com/veithen/hermetic-maven-plugin.git</connection>
        <developerConnection>scm:git:https://github.com/veithen/hermetic-maven-plugin.git</developerConnection>
        <tag>0.6.2</tag>
    </scm>

    <properties>
        <github.repository>hermetic-maven-plugin</github.repository>
        <javaVersion>1.8</javaVersion>
        <maven.version>3.8.4</maven.version>
        <auto-value.version>1.9</auto-value.version>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.github.veithen</groupId>
                <artifactId>hermetic-security-manager</artifactId>
                <version>1.2.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${maven.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-artifact-transfer</artifactId>
            <version>0.13.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-text</artifactId>
            <version>1.9</version>
        </dependency>
        <dependency>
            <groupId>com.google.auto.value</groupId>
            <artifactId>auto-value-annotations</artifactId>
            <version>${auto-value.version}</version>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <version>1.3.2</version>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>5.8.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.truth</groupId>
            <artifactId>truth</artifactId>
            <version>1.1.3</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>junit</groupId>
                    <artifactId>junit</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.google.jimfs</groupId>
            <artifactId>jimfs</artifactId>
            <version>1.2</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <repositories>
        <repository>
            <id>sonatype-snapshots</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <annotationProcessorPaths>
                        <annotationProcessorPath>
                            <groupId>com.google.auto.value</groupId>
                            <artifactId>auto-value</artifactId>
                            <version>${auto-value.version}</version>
                        </annotationProcessorPath>
                    </annotationProcessorPaths>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.veithen.alta</groupId>
                <artifactId>alta-maven-plugin</artifactId>
                <version>0.7.1</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-resources</goal>
                        </goals>
                        <configuration>
                            <name>com/github/veithen/maven/hermetic/%artifactId%.version</name>
                            <value>%baseVersion%</value>
                            <artifactSet>
                                <artifact>
                                    <groupId>com.github.veithen</groupId>
                                    <artifactId>hermetic-security-manager</artifactId>
                                </artifact>
                            </artifactSet>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.veithen.maven</groupId>
                <artifactId>hermetic-maven-plugin</artifactId>
                <configuration>
                    <allowExec>true</allowExec>
                </configuration>
                <!-- TODO: remove this when a new release is available -->
                <executions>
                    <execution>
                        <id>default</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.veithen.maven</groupId>
                <artifactId>resolver-proxy-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>start</goal>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-invoker-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                            <streamLogs>true</streamLogs>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
                <configuration>
                    <projectName>hermetic-maven-plugin</projectName>
                    <licenseName>apache_v2</licenseName>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
