<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>com.umlet</groupId>
		<artifactId>umlet-parent</artifactId>
		<version>15.1</version>
	</parent>

	<artifactId>umlet-gwt</artifactId>
	<packaging>gwt-lib</packaging>

	<properties>
		<!-- GWT 2.8 requires Java 8 -->
		<maven.compiler.source>1.8</maven.compiler.source>
		<maven.compiler.target>1.8</maven.compiler.target>
		<gwt.version>2.9.0</gwt.version>
		<gwt.plugin.version>1.0-rc-10</gwt.plugin.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.umlet</groupId>
			<artifactId>umlet-elements</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>com.umlet</groupId>
			<artifactId>umlet-elements</artifactId>
			<version>${project.version}</version>
			<classifier>sources</classifier>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-servlet</artifactId>
			<version>${gwt.version}</version>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-user</artifactId>
			<version>${gwt.version}</version>
		</dependency>
		<dependency>
			<groupId>com.google.gwt</groupId>
			<artifactId>gwt-dev</artifactId>
			<version>${gwt.version}</version>
		</dependency>
		<dependency>
			<groupId>org.vectomatic</groupId>
			<artifactId>lib-gwt-file</artifactId>
			<version>0.3.9</version>
		</dependency>
		<dependency>
			<groupId>org.vectomatic</groupId>
			<artifactId>lib-gwt-file</artifactId>
			<version>0.3.9</version>
			<classifier>sources</classifier>
		</dependency>
		<dependency>
			<groupId>ru.finam</groupId>
			<artifactId>slf4j-gwt</artifactId>
			<version>1.7.7.1</version>
			<!-- no additional source entry necessary because the author packages
				the normal jar with the sources -->
		</dependency>
        <dependency>
            <groupId>com.google.elemental2</groupId>
            <artifactId>elemental2-core</artifactId>
            <version>1.1.0</version>
	    </dependency>
        <dependency>
            <groupId>com.google.elemental2</groupId>
            <artifactId>elemental2-dom</artifactId>
            <version>1.1.0</version>
        </dependency>
	</dependencies>

	<build>
		<plugins>
			<!-- Synchronize palettes from umlet-res with the GWT palettes -->
			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<!-- unpack all dependencies from umlet-eclipse-plugin-deps and umlet-res -->
					<execution>
						<id>unpack</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.basedir}/src/main/java/com/baselet/gwt/client/view</outputDirectory>
							<!-- synchronize all palettes except the deprecated ones and Activity
								AIO because they are OldGridElements which do not work in GWT -->
							<includes>palettes/*.*</includes>
							<excludes>palettes/Deprecated*.*,palettes/UML Activity - All in
								one.*</excludes>
							<artifactItems>
								<artifactItem>
									<groupId>com.umlet</groupId>
									<artifactId>umlet-res</artifactId>
									<version>${project.version}</version>
								</artifactItem>
							</artifactItems>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<!-- start the GWT compiler during the build -->
			<plugin>
				<groupId>net.ltgt.gwt.maven</groupId>
				<artifactId>gwt-maven-plugin</artifactId>
				<version>${gwt.plugin.version}</version>
				<extensions>true</extensions>
				<configuration>
					<!-- <skipCompilation>true</skipCompilation> -->
					<moduleName>baseletgwt</moduleName>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>