<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.redhat.cloud.event</groupId>
  <artifactId>event-schemas</artifactId>
  <version>1.4.2</version>

  <name>console.redhat.com CloudEvents for Java</name>
  <description>Jsonschema definitions for events generated by console.redhat.com apps</description>
  <url>https://github.com/redHatInsights/event-schemas-java</url>
  <developers>
    <developer>
      <name>Kevin Howell</name>
      <organization>Red Hat</organization>
    </developer>
    <developer>
      <name>Gwenneg Lepage</name>
      <organization>Red Hat</organization>
    </developer>
    <developer>
      <name>Josejulio Martínez</name>
      <organization>Red Hat</organization>
    </developer>
  </developers>

  <properties>
    <java.release>11</java.release>
    <maven.compiler.parameters>true</maven.compiler.parameters>
    <maven.compiler.target>${java.release}</maven.compiler.target>
    <maven.compiler.source>${java.release}</maven.compiler.source>
    <junit.version>5.9.3</junit.version>
  </properties>

  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <connection>scm:git:ssh://git@github.com/RedHatInsights/event-schemas-java.git</connection>
    <url>https://github.com/RedHatInsights/event-schemas-java.git</url>
    <developerConnection>scm:git:ssh://git@github.com/RedHatInsights/event-schemas-java.git</developerConnection>
    <tag>insights-schemas-java-parent-0.10</tag>
  </scm>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.fasterxml.jackson</groupId>
        <artifactId>jackson-bom</artifactId>
        <version>2.15.0</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.datatype</groupId>
      <artifactId>jackson-datatype-jsr310</artifactId>
    </dependency>
    <dependency>
      <groupId>com.networknt</groupId>
      <artifactId>json-schema-validator</artifactId>
      <version>1.0.80</version>
    </dependency>

    <!-- Test dependencies -->
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>${junit.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <distributionManagement>
    <repository>
      <id>jboss.staging</id>
      <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2</url>
    </repository>
  </distributionManagement>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-resources-plugin</artifactId>
        <version>3.3.1</version>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>
      <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</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <!-- auto release -->
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.13</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>jboss.staging</serverId>
          <nexusUrl> https://repository.jboss.org/nexus/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>

      <!-- tests -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>3.0.0</version>
      </plugin>
    </plugins>
    <resources>
      <!-- Default resource path -->
      <resource>
        <directory>${basedir}/src/main/resources</directory>
      </resource>

      <!-- Schemas path -->
      <resource>
        <directory>${basedir}/api</directory>
        <includes>
          <include>schemas/**</include>
        </includes>
      </resource>
    </resources>
  </build>
</project>
