<?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/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>

	<groupId>com.github.crisposs</groupId>
	<artifactId>jabsc</artifactId>
	<version>0.1.5</version>
	<packaging>jar</packaging>
	<name>ABS Compiler for Java</name>

	<description>
	<![CDATA[Compile ABS source to Java source]]>
	</description>
	<url>https://gitub.com/CrispOSS/jabsc</url>
	<licenses>
		<license>
			<name>Apache License 2.0</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
		</license>
	</licenses>


	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<version.abs-api>0.8.8</version.abs-api>
		<version.airline>0.7</version.airline>
		<version.jabsc-maven-plugin>0.1.0</version.jabsc-maven-plugin>
		<version.junit>4.12</version.junit>
		<version.jflex>1.6.1</version.jflex>
		<version.cup>2015.03.26</version.cup>
		<version.javawriter>2.5.1</version.javawriter>
		<version.slf4j>1.7.12</version.slf4j>
	</properties>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.3</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.6</version>
				<configuration>
					<archive>
						<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
					</archive>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.5.0</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Export-Package>jabsc,jabsc.cli</Export-Package>
					</instructions>
					<archive>
						<manifest>
							<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
							<addClasspath>true</addClasspath>
							<classpathPrefix>./</classpathPrefix>
							<mainClass>jabsc.cli.Bootstrap</mainClass>
						</manifest>
					</archive>
				</configuration>
				<executions>
					<execution>
						<id>bundle-manifest</id>
						<phase>process-classes</phase>
						<goals>
							<goal>manifest</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>2.5.5</version>
				<configuration>
					<descriptor>src/main/assembly/assembly-standalone.xml</descriptor>
					<appendAssemblyId>false</appendAssemblyId>
				</configuration>
				<executions>
					<execution>
						<id>single</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.5.2</version>
				<configuration>
					<releaseProfiles>release</releaseProfiles>
					<goals>deploy nexus-staging:release</goals>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.sonatype.plugins</groupId>
				<artifactId>nexus-staging-maven-plugin</artifactId>
				<version>1.6.5</version>
				<extensions>true</extensions>
				<configuration>
					<serverId>sonatype-nexus-staging</serverId>
					<nexusUrl>https://oss.sonatype.org/</nexusUrl>
					<autoReleaseAfterClose>true</autoReleaseAfterClose>
					<stagingProfileId>56528f0b778564</stagingProfileId>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<dependencies>
		<dependency>
			<groupId>${project.groupId}</groupId>
			<artifactId>abs-api</artifactId>
			<version>${version.abs-api}</version>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${version.junit}</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>de.jflex</groupId>
			<artifactId>jflex</artifactId>
			<version>${version.jflex}</version>
		</dependency>
		<dependency>
			<groupId>nz.ac.waikato.cms.weka.thirdparty</groupId>
			<artifactId>java-cup-11b-runtime</artifactId>
			<version>${version.cup}</version>
		</dependency>
		<dependency>
			<groupId>nz.ac.waikato.cms.weka.thirdparty</groupId>
			<artifactId>java-cup-11b</artifactId>
			<version>${version.cup}</version>
		</dependency>
		<dependency>
			<groupId>com.squareup</groupId>
			<artifactId>javawriter</artifactId>
			<version>${version.javawriter}</version>
		</dependency>
		<dependency>
			<groupId>io.airlift</groupId>
			<artifactId>airline</artifactId>
			<version>${version.airline}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-simple</artifactId>
			<version>${version.slf4j}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jul-to-slf4j</artifactId>
			<version>${version.slf4j}</version>
		</dependency>
	</dependencies>

	<distributionManagement>
		<repository>
			<id>sonatype-nexus-staging</id>
			<name>Nexus Staging Repository</name>
			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
		</repository>
		<snapshotRepository>
			<id>sonatype-nexus-snapshots</id>
			<name>Sonatype Nexus Snapshots</name>
			<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
		</snapshotRepository>
	</distributionManagement>

	<scm>
		<url>https://github.com/CrispOSS/jabsc.git</url>
		<connection>scm:git:https://github.com/CrispOSS/jabsc.git</connection>
		<developerConnection>scm:git:git@github.com:CrispOSS/jabsc.git</developerConnection>
		<tag>v0.1.5</tag>
	</scm>

	<issueManagement>
		<system>GitHub</system>
		<url>https://github.com/CrispOSS/jabsc/issues</url>
	</issueManagement>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-source-plugin</artifactId>
						<version>2.4</version>
						<executions>
							<execution>
								<id>attach-sources</id>
								<phase>verify</phase>
								<goals>
									<goal>jar-no-fork</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.3</version>
						<configuration>
							<excludePackageNames>bnfc.abs,bnfc.abs.Absyn</excludePackageNames>
							<tags>
								<tag>
									<name>implSpec</name>
								</tag>
							</tags>
						</configuration>
						<executions>
							<execution>
								<id>default</id>
								<phase>verify</phase>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.6</version>
						<configuration>
							<executable>gpg2</executable>
						</configuration>
						<executions>
							<execution>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>jabsc</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>com.github.crisposs</groupId>
						<artifactId>jabsc-maven-plugin</artifactId>
						<version>${version.jabsc-maven-plugin}</version>
						<executions>
							<execution>
								<id>abs-compile</id>
								<phase>generate-sources</phase>
								<goals>
									<goal>jabsc</goal>
								</goals>
								<configuration>
									<sourceDirectory>${basedir}/src/test/resources/jabsc/abs</sourceDirectory>
								</configuration>
							</execution>
						</executions>
						<dependencies>
							<dependency>
								<groupId>${project.groupId}</groupId>
								<artifactId>${project.artifactId}</artifactId>
								<version>0.1.5</version>
							</dependency>
						</dependencies>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

	<developers>
		<developer>
			<id>nobeh</id>
			<email>nobeh5@gmail.com</email>
			<name>Behrooz Nobakht</name>
			<timezone>+1</timezone>
		</developer>
	</developers>
</project>

