<?xml version="1.0" encoding="UTF-8"?>
<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>io.github.ranSprd</groupId>
  <artifactId>netbeans-pojoMaker</artifactId>
  <version>0.6.3</version>
  <packaging>nbm</packaging>
  
  <name>NB PojoMaker ${project.version}</name>
  <description>This plugin is a small integrated interface of jsonschema2pojo which generates simple Java classes from Json snippets.</description>
  <url>https://github.com/ranSprd/netbeans-pojomaker</url>
  
  <developers>
    <developer>
      <id>ranSprd</id>
      <name>kiar</name>
      <url>https://github.com/ranSprd</url>
    </developer>
  </developers>  
  
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
      
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  
  <scm>
    <connection>scm:git:git@github.com:ranSprd/netbeans-pojomaker.git</connection>
    <developerConnection>scm:git:git@github.com:ranSprd/netbeans-pojomaker.git</developerConnection>
    <url>https://github.com/netbeans-pojomaker/tree/${project.scm.tag}</url>
    <tag>netbeans-pojoMaker-0.6.3</tag>
  </scm>  
  
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>  
  </distributionManagement>  

  
  <dependencies>
    <dependency>
      <groupId>org.jsonschema2pojo</groupId>
      <artifactId>jsonschema2pojo-core</artifactId>
      <version>1.2.1</version>
    </dependency>    
    <dependency>
      <groupId>com.sun.codemodel</groupId>
      <artifactId>codemodel</artifactId>
      <version>2.6</version>
    </dependency>    
    <dependency>
      <groupId>commons-lang</groupId>
      <artifactId>commons-lang</artifactId>
      <version>2.6</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.14.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.14.2</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-annotations</artifactId>
      <version>2.14.2</version>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-api</artifactId>
      <version>5.9.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-params</artifactId>
      <version>5.9.2</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.junit.jupiter</groupId>
      <artifactId>junit-jupiter-engine</artifactId>
      <version>5.9.2</version>
      <scope>test</scope>
    </dependency>
    
    
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-netbeans-api-annotations-common</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-netbeans-api-templates</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-util</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-util-ui</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-actions</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-nodes</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-filesystems</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-loaders</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-dialogs</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-awt</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-netbeans-modules-projectapi</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-openide-util-lookup</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <dependency>
      <groupId>org.netbeans.api</groupId>
      <artifactId>org-netbeans-api-java-classpath</artifactId>
      <version>RELEASE140</version>
    </dependency>
    <!--    <dependency>
      <groupId>org.netbeans.modules</groupId>
      <artifactId>org-netbeans-modules-java-j2seproject</artifactId>
      <version>RELEASE140</version>
    </dependency>-->
    
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.netbeans.utilities</groupId>
        <artifactId>nbm-maven-plugin</artifactId>
        <version>4.8</version>
        <extensions>true</extensions>
        <configuration>
          <publicPackages>
            <publicPackage>io.github.ranSprd.pojomaker</publicPackage>
            <publicPackage>io.github.ranSprd.pojomaker.actions</publicPackage>
            <publicPackage>io.github.ranSprd.pojomaker.ui</publicPackage>
          </publicPackages>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.11.0</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.3.0</version>
        <configuration>
          <archive>
            <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>3.0.0-M7</version>
        <configuration>
          <!--upgrade MINOR instead of PATCH--> 
          <projectVersionPolicyId>SemVerVersionPolicy</projectVersionPolicyId>
          <pushChanges>false</pushChanges>
          <localCheckout>true</localCheckout>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.release</groupId>
            <artifactId>maven-release-semver-policy</artifactId>
            <version>3.0.0-M7</version>
          </dependency>
        </dependencies>
      </plugin>      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-gpg-plugin</artifactId>
        <version>3.0.1</version>
        <executions>
          <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.22.2</version>
      </plugin>
    </plugins>
  </build>
  
  
    <profiles>
      <profile>
        <id>release</id>
        <build>
          <plugins>
            <plugin>
              <groupId>org.sonatype.plugins</groupId>
              <artifactId>nexus-staging-maven-plugin</artifactId>
              <version>1.6.12</version>
              <extensions>true</extensions>
              <configuration>
                <serverId>ossrh</serverId>
                <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                <autoReleaseAfterClose>true</autoReleaseAfterClose>
              </configuration>
              <dependencies>
                <dependency>
                  <groupId>com.thoughtworks.xstream</groupId>
                  <artifactId>xstream</artifactId>
                  <version>1.4.15</version> <!-- apparently this needs to be exactly this version -->
                </dependency>
              </dependencies>        
            </plugin> 
          </plugins>
        </build>
      </profile>
      
      <profile>
        <id>github</id>
        <distributionManagement>
          <repository>
            <id>github</id>
            <name>GitHub OWNER Apache Maven Packages</name>
            <url>https://maven.pkg.github.com/ranSprd/netbeans-pojoMaker</url>
          </repository> 
          <snapshotRepository>
            <id>github</id>
            <name>GitHub OWNER Apache Maven Packages</name>
            <url>https://maven.pkg.github.com/ranSprd/netbeans-pojoMaker</url>
          </snapshotRepository>
        </distributionManagement>
      </profile>
      
      <profile>
        <id>analysis</id>
        <properties>
          <sonar.coverage.jacoco.xmlReportPaths>${project.build.directory}/site/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
          <sonar.organization>ransprd</sonar.organization>
          <sonar.projectKey>ranSprd_netbeans-pojomaker</sonar.projectKey>
          <sonar.host.url>https://sonarcloud.io</sonar.host.url>
        </properties>
        <build>
          <plugins>
            <plugin>
              <groupId>org.sonarsource.scanner.maven</groupId>
              <artifactId>sonar-maven-plugin</artifactId>
              <version>3.9.1.2184</version>
            </plugin>
            
            <plugin>
              <groupId>org.jacoco</groupId>
              <artifactId>jacoco-maven-plugin</artifactId>
              <version>0.8.8</version>
              <executions>
                <execution>
                  <id>reports</id>
                  <phase>verify</phase>
                  <goals>
                    <goal>report</goal>
                  </goals>
                </execution>                         
                <execution>
                  <id>prepare-unit-tests-agent</id>
                  <goals>
                    <goal>prepare-agent</goal>
                  </goals>
                  <configuration>
                    <propertyName>surefireArgLine</propertyName>
                  </configuration>                        
                </execution>                    
              </executions>
            </plugin>      
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <version>3.0.0-M9</version>
              <configuration>
                <!-- Sets the VM argument line used when unit tests are run. -->
                <argLine>${surefireArgLine}</argLine>
              </configuration>
            </plugin>
          </plugins>          
        </build>
      </profile>
    </profiles>
  
</project>
