<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>br.gov.lexml</groupId>
	<artifactId>lexml-renderer-scala</artifactId>
	<version>1.1.2</version>
	<name>LexML EPUB Renderer</name>
	<description>LexML Brazil document EPUB rendering library.</description>
	<url>https://github.com/lexml/lexml-renderer-scala</url>

	<licenses>
		<license>
			<name>GPLv2</name>
			<url>https://www.gnu.org/licenses/old-licenses/gpl-2.0.html</url>
		</license>
	</licenses>
 
	<developers>
		<developer>
			<id>jrafael</id>
			<name>João Nicola</name>
			<email>jrafael@senado.leg.br</email>
		</developer>
	</developers>

	<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>



	<properties>
		<scala.version>2.13</scala.version>
		<scala.lib.version>${scala.version}.2</scala.lib.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<scm>
		<url>https://github.com/lexml/lexml-renderer-scala</url>
		<developerConnection>scm:git:https://github.com/lexml/lexml-renderer-scala.git</developerConnection>
		<connection>scm:git:https://github.com/lexml/lexml-renderer-scala.git</connection>
		<tag>1.1.2</tag>
	</scm>

	<build>
		<plugins>
			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>scala-maven-plugin</artifactId>
				<version>4.3.1</version>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
							<goal>testCompile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<sourceDir>src/main/scala</sourceDir>
					<fork>true</fork>
					<jvmArgs>
						<jvmArg>-Xms1024m</jvmArg>
						<jvmArg>-Xmx4096m</jvmArg>
						<jvmArg>-Xss16m</jvmArg>
					</jvmArgs>
				</configuration>
			</plugin>
		</plugins>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>

	</build>
		
	<dependencies>
		<dependency>
		    <groupId>org.scala-lang.modules</groupId>
		    <artifactId>scala-xml_${scala.version}</artifactId>
		    <version>1.3.0</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.8</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.7</version>
		</dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>2.11.1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>2.11.1</version>
            <scope>runtime</scope>
        </dependency>
		<dependency>
			<groupId>org.scala-lang</groupId>
			<artifactId>scala-library</artifactId>
			<version>${scala.lib.version}</version>
			<type>jar</type>
		</dependency>

		<dependency>
			<groupId>org.bitbucket.inkytonik.kiama</groupId>
			<artifactId>kiama_${scala.version}</artifactId>
			<version>2.3.0</version>
			<exclusions>
				<exclusion>
					<groupId>org.scala-lang</groupId>
					<artifactId>scala-library</artifactId>
				</exclusion>
			</exclusions>
		</dependency>


		<dependency>
			<groupId>org.scala-lang.modules</groupId>
			<artifactId>scala-swing_${scala.version}</artifactId>
			<version>2.1.1</version>
		</dependency>
	</dependencies>

<profiles>
      <profile>
	 <id>onejar</id>
	 <activation>
          <activeByDefault>false</activeByDefault>
        </activation>
        <build>
          <plugins>
			<plugin>
			  <!--groupId>org.dstovall</groupId--> <!-- not available on the central -->
			  <groupId>com.jolira</groupId>
			  <artifactId>onejar-maven-plugin</artifactId>
			  <version>1.4.4</version>
			  <executions>
			    <execution>
			      <phase>package</phase>
			      <configuration>
			        <mainClass>br.gov.lexml.renderer.gui.Main</mainClass>
			        <attachToBuild>true</attachToBuild>
			        <!-- https://code.google.com/p/onejar-maven-plugin/issues/detail?id=8 -->
			        <!--classifier>onejar</classifier-->
			        <filename>${project.build.finalName}-onejar.${project.packaging}</filename>
			      </configuration>
			      <goals>
			        <goal>one-jar</goal>
			      </goals>
			    </execution>
			  </executions>
			</plugin>
	  </plugins>
        </build>
      </profile>
      <profile>
        <id>release</id>
        <activation>
          <activeByDefault>false</activeByDefault>
        </activation>
        <build>
          <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <detail>true</detail>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                </configuration>
            </plugin>
              <plugin>
                  <groupId>org.sonatype.plugins</groupId>
                  <artifactId>nexus-staging-maven-plugin</artifactId>
                  <version>1.6.7</version>
                  <extensions>true</extensions>
                  <configuration>
                      <serverId>ossrh</serverId>
                      <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
                      <autoReleaseAfterClose>true</autoReleaseAfterClose>
                  </configuration>
              </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.0.1</version>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
              </plugin>
              <!-- Usar o plugin jar abaixo só para projetos Scala -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <executions>
                <execution>
                    <id>empty-javadoc-jar</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                    <configuration>
                        <classifier>javadoc</classifier>
                        <classesDirectory>${basedir}/javadoc</classesDirectory>
                    </configuration>
                </execution>
             </executions>
           </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>
                          <configuration>
                              <!-- Prevent gpg from using pinentry programs. Fixes: gpg: signing
                                  failed: Inappropriate ioctl for device -->
                              <gpgArguments>
                                  <arg>--pinentry-mode</arg>
                                  <arg>loopback</arg>
                              </gpgArguments>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>
         </plugins>
       </build>

   </profile>
</profiles>
		

</project>
