<?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>
	<parent>
        <groupId>org.mule.tools</groupId>
        <artifactId>apikit-tools</artifactId>
        <version>0.1-SNAPSHOT</version>
    </parent>
	<groupId>org.mule.tools</groupId>
	<artifactId>apikit-studio-plugin</artifactId>
	<version>1.0.0-SNAPSHOT</version>
	<name>APIKit Studio Plugin</name>
	<packaging>pom</packaging>

	<properties>
		<tycho.groupid>org.eclipse.tycho</tycho.groupid>
		<tycho.version>0.16.0</tycho.version>
		<tycho-extras.groupid>org.eclipse.tycho</tycho-extras.groupid>
		<tycho-extras.version>0.16.0</tycho-extras.version>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

		<keystore.path>${project.parent.basedir}/raml.ks</keystore.path>
		<keystore.type>JKS</keystore.type>
		<keystore.alias>raml</keystore.alias>
		<keystore.store.password>ramlmani$here</keystore.store.password>

		<jarsigner.tsa>https://timestamp.geotrust.com/tsa</jarsigner.tsa>
		<skipSign>true</skipSign>
	</properties>

	<modules>
		<module>org.mule.tooling.apikit.target</module>
		<module>org.mule.tooling.apikit</module>
		<module>org.mule.tooling.apikit.feature</module>
		<module>org.mule.tooling.apikit.deps</module>
		<module>org.mule.tooling.apikit.p2</module>
	</modules>

	<build>
		<plugins>
			<plugin>
				<groupId>${tycho.groupid}</groupId>
				<artifactId>tycho-maven-plugin</artifactId>
				<version>${tycho.version}</version>
				<extensions>true</extensions>
			</plugin>
			<plugin>
				<groupId>${tycho.groupid}</groupId>
				<artifactId>target-platform-configuration</artifactId>
				<version>${tycho.version}</version>
				<configuration>
					<resolver>p2</resolver>
					<ignoreTychoRepositories>true</ignoreTychoRepositories>
					<target>
						<artifact>
							<groupId>org.mule.tools</groupId>
							<artifactId>apikit</artifactId>
							<version>1.0.0-SNAPSHOT</version>
						</artifact>
					</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jarsigner-plugin</artifactId>
				<version>1.2</version>
				<executions>
					<execution>
						<id>sign</id>
						<goals>
							<goal>sign</goal>
						</goals>
					</execution>
					<execution>
						<id>verify</id>
						<goals>
							<goal>verify</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<certs>true</certs>
					<verbose>false</verbose>
					<storetype>${keystore.type}</storetype>
					<keystore>${keystore.path}</keystore>
					<alias>${keystore.alias}</alias>
					<storepass>${keystore.store.password}</storepass>
					<arguments>
						<argument>-tsa</argument>
						<argument>${jarsigner.tsa}</argument>
					</arguments>
					<skip>${skipSign}</skip>
				</configuration>
			</plugin>
		</plugins>
		<pluginManagement>
			<plugins>
				<plugin>
					<groupId>${tycho.groupid}</groupId>
					<artifactId>tycho-compiler-plugin</artifactId>
					<version>${tycho.version}</version>
				</plugin>
				<plugin>
					<groupId>${tycho.groupid}</groupId>
					<artifactId>tycho-surefire-plugin</artifactId>
					<version>${tycho.version}</version>
				</plugin>
				<plugin>
					<groupId>${tycho.groupid}</groupId>
					<artifactId>tycho-p2-repository-plugin</artifactId>
					<version>${tycho.version}</version>
				</plugin>
				<plugin>
					<groupId>${tycho.groupid}</groupId>
					<artifactId>tycho-p2-publisher-plugin</artifactId>
					<version>${tycho.version}</version>
				</plugin>
				<plugin>
					<groupId>${tycho.groupid}</groupId>
					<artifactId>tycho-p2-director-plugin</artifactId>
					<version>${tycho.version}</version>
				</plugin>
				<plugin>
					<groupId>${tycho-extras.groupid}</groupId>
					<artifactId>tycho-p2-extras-plugin</artifactId>
					<version>${tycho-extras.version}</version>
				</plugin>
				<plugin>
					<groupId>${tycho-extras.groupid}</groupId>
					<artifactId>target-platform-validation-plugin</artifactId>
					<version>${tycho-extras.version}</version>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
</project>
