<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">
  <properties>
    <maven.compiler.source>11</maven.compiler.source>
    <maven.compiler.target>11</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
	<sonar.projectKey>diogosmendonca_PatternLanguage</sonar.projectKey>
	<sonar.organization>diogosmendonca</sonar.organization>
	<sonar.host.url>https://sonarcloud.io</sonar.host.url>
  </properties>
  
  <modelVersion>4.0.0</modelVersion>
  
  <name>Source Code Pattern Language</name>
  <artifactId>SCPL</artifactId>
  <groupId>com.github.diogosmendonca</groupId>
  <version>0.2.1-beta</version>
  <description>A markup language to find and alert source code patterns</description>
  <url>https://github.com/diogosmendonca/PatternLanguage</url>

  <licenses>
    <license>
      <name>GNU General Public License v3.0</name>
      <url>https://www.gnu.org/licenses/gpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <scm>
    <url>https://github.com/diogosmendonca/PatternLanguage</url>
  </scm>

  <developers>
	<developer>
		<id>deniscrispe</id>
		<name>Denis Crispe Silva</name>
	</developer>
	<developer>
		<id>andrealvesaraujo</id>
		<name>Andre Alves Araujo</name>
	</developer>
	<developer>
		<id>diogosmendonca</id>
		<name>Diogo Silveira Mendonça</name>
	</developer>
  </developers>

  <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>
  
  <build>
 	<finalName>scpl</finalName>  		
	<plugins>
		<plugin>
	        <groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-surefire-plugin</artifactId>
			<version>3.0.0-M5</version>
			<configuration>
				<includes>
					<include>**/JunitSuiteTest.java</include>
				</includes>
	          	<excludes>
            		<exclude>**/AceitacaoTest.java</exclude>
            		<exclude>**/CLITest.java</exclude>
					<exclude>**/SingletonTest.java</exclude>
          		</excludes>
	        </configuration>
      	</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-assembly-plugin</artifactId>
			<executions>
				<execution>
					<phase>package</phase>
					<goals>
						<goal>single</goal>
					</goals>
					<configuration>
						<archiveBaseDirectory>${project.basedir}</archiveBaseDirectory>
						<archive>
							<manifest>
								<mainClass>br.scpl.view.Main</mainClass>
							</manifest>
						</archive>
						<appendAssemblyId>true</appendAssemblyId>
						<descriptorRefs>
							<descriptorRef>jar-with-dependencies</descriptorRef>
						</descriptorRefs>
					</configuration>
				</execution>
			</executions>
		</plugin>
		<plugin>
			<groupId>org.jacoco</groupId>
			<artifactId>jacoco-maven-plugin</artifactId>
			<version>0.8.6</version>
			<executions>
				<execution>
					<id>default-prepare-agent</id>
					<goals>
						<goal>prepare-agent</goal>
					</goals>
				</execution>
				<execution>
					<id>default-report</id>
					<goals>
						<goal>report</goal>
					</goals>
				</execution>
			</executions>
		</plugin>
		<plugin>
		   <groupId>org.pitest</groupId>
		   <artifactId>pitest-maven</artifactId>
		   <version>1.5.2</version>
		   <configuration>
   		   		<targetClasses>
	            	<param>br.scpl.*</param>
	        	</targetClasses>
	        	<targetTests>
	            	<param>scpl.JunitSuiteTest</param>
        		</targetTests>
    		</configuration>
		</plugin>
		
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-site-plugin</artifactId>
			<version>3.7.1</version>
		</plugin>
		<plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-project-info-reports-plugin</artifactId>
			<version>3.0.0</version>
		</plugin>
	</plugins>
	<resources>
		<resource>
			<directory>src/main/resources</directory>
			<filtering>true</filtering>
		</resource>
		<resource>
			<directory>src/test/resources</directory>
			<filtering>true</filtering>
	    </resource>
	</resources> 
  </build>

  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <show>public</show>
        </configuration>
      </plugin>
	  <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <!-- select non-aggregate reports -->
              <report>report</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
    </plugins>
  </reporting>
  
  <dependencies>
		<!-- https://mvnrepository.com/artifact/log4j/log4j -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.17</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
		<dependency>
		    <groupId>org.apache.commons</groupId>
		    <artifactId>commons-lang3</artifactId>
		    <version>3.9</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/junit/junit -->
		<dependency>
		    <groupId>junit</groupId>
		    <artifactId>junit</artifactId>
		    <version>4.13.1</version>
		    <scope>test</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.beust/jcommander -->
		<dependency>
		    <groupId>com.beust</groupId>
		    <artifactId>jcommander</artifactId>
		    <version>1.78</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.googlecode.juniversalchardet/juniversalchardet -->
		<dependency>
		    <groupId>com.googlecode.juniversalchardet</groupId>
		    <artifactId>juniversalchardet</artifactId>
		    <version>1.0.3</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
		<dependency>
		    <groupId>com.google.code.gson</groupId>
		    <artifactId>gson</artifactId>
		    <version>2.8.6</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
		<dependency>
		    <groupId>org.apache.maven.plugins</groupId>
		    <artifactId>maven-surefire-plugin</artifactId>
		    <version>3.0.0-M5</version>
			<scope>test</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.google.collections/google-collections -->
		<dependency>
		    <groupId>com.google.collections</groupId>
		    <artifactId>google-collections</artifactId>
		    <version>1.0</version>
		</dependency>
		<!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
		<dependency>
		    <groupId>commons-lang</groupId>
		    <artifactId>commons-lang</artifactId>
		    <version>2.6</version>
		</dependency>		
	</dependencies>

	<profiles>
  		<profile>
		  <id>release</id>
		  <build>
		  	<finalName>scpl</finalName>  		
			<plugins>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-javadoc-plugin</artifactId>
					<version>3.2.0</version>
					<configuration>
					<show>private</show>
					<nohelp>true</nohelp>
					</configuration>
					<executions>
						<execution>
							<id>attach-javadocs</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-source-plugin</artifactId>
					<version>3.2.0</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-gpg-plugin</artifactId>
					<version>1.5</version>
					<executions>
						<execution>
							<id>sign-artifacts</id>
							<phase>verify</phase>
							<goals>
								<goal>sign</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
		  	</plugins>
		  </build>
		</profile>
	</profiles>
</project>