<?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.axellience</groupId>
    <artifactId>vue-gwt</artifactId>
    <version>1.0-beta-2</version>
    <packaging>jar</packaging>

    <name>Vue GWT</name>
    <description>Let you use Vue.js Components in GWT application and code Vue.js Components in Java</description>
    <url>https://github.com/Axellience/vue-gwt</url>

	<licenses>
		<license>
			<name>MIT License</name>
			<url>http://www.opensource.org/licenses/mit-license.php</url>
		</license>
	</licenses>

	<developers>
		<developer>
			<name>Adrien Baron</name>
			<email>adrien.baron@axellience.com</email>
			<organization>Axellience</organization>
			<organizationUrl>http://www.genmymodel.com</organizationUrl>
		</developer>
	</developers>

	<scm>
		<connection>scm:git:git://github.com/Axellience/vue-gwt.git</connection>
		<developerConnection>scm:git:ssh://github.com:Axellience/vue-gwt.git</developerConnection>
		<url>https://github.com/Axellience/vue-gwt/tree/master</url>
	</scm>

	<properties>
        <gwt.version>2.8.0</gwt.version>
        <jsinterop.version>1.0.0</jsinterop.version>

        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>

		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-user</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.google.gwt</groupId>
            <artifactId>gwt-dev</artifactId>
            <version>${gwt.version}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.squareup</groupId>
            <artifactId>javapoet</artifactId>
            <version>1.9.0</version>
        </dependency>
        <dependency>
            <!-- jsoup HTML parser library @ http://jsoup.org/ -->
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
            <version>1.10.2</version>
        </dependency>
        <dependency>
            <groupId>com.github.javaparser</groupId>
            <artifactId>javaparser-core</artifactId>
            <version>3.0.1</version>
        </dependency>
		<dependency>
			<groupId>com.samaxes.maven</groupId>
			<artifactId>minify-maven-plugin</artifactId>
			<version>1.7.6</version>
		</dependency>
		<dependency>
			<groupId>com.coveo</groupId>
			<artifactId>nashorn-commonjs-modules</artifactId>
			<version>1.0.8</version>
		</dependency>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
		</dependency>
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
			<classifier>sources</classifier>
		</dependency>
    </dependencies>

	<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>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
            <resource>
                <directory>src/main/java</directory>
                <includes>
                    <include>**/*.java</include>
                    <include>**/*.gwt.xml</include>
                </includes>
            </resource>
        </resources>

		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.1</version>
				<configuration>
					<!-- Disable annotation processing for ourselves.-->
					<compilerArgument>-proc:none</compilerArgument>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.samaxes.maven</groupId>
				<artifactId>minify-maven-plugin</artifactId>
				<version>1.7.6</version>
				<executions>
					<execution>
						<id>default-minify</id>
						<configuration>
							<charset>UTF-8</charset>
							<webappSourceDir>src/main/resources/com/axellience/vuegwt/client/resources</webappSourceDir>
							<jsSourceDir>sources</jsSourceDir>
							<webappTargetDir>src/main/resources/com/axellience/vuegwt/client/resources</webappTargetDir>
							<jsTargetDir>.</jsTargetDir>

							<bundleConfiguration>src/main/resources/com/axellience/vuegwt/client/resources/bundle.config.json</bundleConfiguration>
							<jsEngine>CLOSURE</jsEngine>
						</configuration>
						<goals>
							<goal>minify</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>release</id>
			<build>
				<plugins>
					<!-- Include Java source -->
					<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>

					<!-- Include Java doc -->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-javadoc-plugin</artifactId>
						<version>2.10.4</version>
						<executions>
							<execution>
								<id>attach-javadocs</id>
								<goals>
									<goal>jar</goal>
								</goals>
							</execution>
						</executions>
					</plugin>

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

					<!-- Sonatype -->
					<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>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
