<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>com.astralanguage</groupId>
	<artifactId>astra-base</artifactId>

	<name>${project.groupId}:${project.artifactId}</name>
	<description>Base project for ASTRA applications</description>
	<url>https://astralanguage.com</url>
	<version>1.0.9</version>
	<packaging>pom</packaging>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Rem Collier</name>
			<email>rem.collier@ucd.ie</email>
			<organisation>University College Dublin</organisation>
			<organisationUrl>http://www.ucd.ie</organisationUrl>
		</developer>
	</developers>

	<scm>
      <!-- Should be format scm:git:git or scm:git:https -->
      <connection>scm:git:https://gitlab.com/astra-language/astra-core.git</connection>
      <developerConnection>scm:git:git@gitlab.com:astra-language/astra-core.git</developerConnection>
      <url>https://gitlab.com/astra-language/astra-core/-/tree/master/astra-base</url>
    </scm>
    
    <parent>
		<groupId>com.astralanguage</groupId>
		<artifactId>astra-core</artifactId>
		<version>1.0.9</version>
	</parent>

    <properties>
        <astra.main>Main</astra.main>
        <astra.name>main</astra.name>
    </properties>
    
    <dependencies>
        <dependency>
            <groupId>com.astralanguage</groupId>
            <artifactId>astra-interpreter</artifactId>
            <version>1.0.9</version>
        </dependency>
        <dependency>
            <groupId>com.astralanguage</groupId>
            <artifactId>astra-apis</artifactId>
            <version>1.0.9</version>
        </dependency>
        <dependency>
            <groupId>com.astralanguage</groupId>
            <artifactId>astra-compiler</artifactId>
            <version>1.0.9</version>
        </dependency>
    </dependencies>

    <distributionManagement>
		<snapshotRepository>
			<id>ossrh</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
		</snapshotRepository>
	</distributionManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <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://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </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>
                                <configuration>
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

	<build>
        <resources>
			<resource>
				<directory>src/main/astra</directory>
				<includes>
					<include>**/*.astra</include>
				</includes>
			</resource>
			<resource>
				<directory>src/test/astra</directory>
				<includes>
					<include>**/*.astra</include>
				</includes>
			</resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.htm</include>
                    <include>**/*.html</include>
                </includes>
            </resource>
        </resources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.astralanguage</groupId>
                    <artifactId>astra-maven-plugin</artifactId>
                    <version>1.0.9</version>
                    <configuration>
                        <mainClass>${astra.main}</mainClass>
            			<mainName>${astra.name}</mainName>
                    </configuration>
                    <executions>
                        <execution>
                            <id>astra.compile</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>astra.test</id>
                            <phase>test-compile</phase>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>astra.testrun</id>
                            <phase>test</phase>
                            <goals>
                                <goal>test</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>3.1.1</version>
                    <configuration>
                        <archive>
                            <index>true</index>
                            <manifest>
                                <mainClass>${astra.main}</mainClass>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <defaultGoal>clean compile astra:deploy</defaultGoal>
        <plugins>
            <plugin>
                <groupId>com.astralanguage</groupId>
                <artifactId>astra-maven-plugin</artifactId>
                <version>1.0.9</version>
            </plugin>
        </plugins>
    </build>
</project>