<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>org.jsweet.candies</groupId>
	<artifactId>processing</artifactId>
	<version>3.3.7.5-ktb3</version>
	<properties>
		<jsweet.transpiler.version>2.3.0</jsweet.transpiler.version>
		<jsweet.core.version>6.0.1</jsweet.core.version>
		<jsweet.processing-support.version>3.3.7.1</jsweet.processing-support.version>
	</properties>
	<repositories>
		<repository>
			<id>jsweet-central</id>
			<name>libs-release</name>
			<url>http://repository.jsweet.org/artifactory/libs-release-local</url>
		</repository>
		<repository>
			<snapshots />
			<id>jsweet-snapshots</id>
			<name>libs-snapshot</name>
			<url>http://repository.jsweet.org/artifactory/libs-snapshot-local</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>jsweet-plugins-release</id>
			<name>plugins-release</name>
			<url>http://repository.jsweet.org/artifactory/plugins-release-local</url>
		</pluginRepository>
		<pluginRepository>
			<snapshots />
			<id>jsweet-plugins-snapshots</id>
			<name>plugins-snapshot</name>
			<url>http://repository.jsweet.org/artifactory/plugins-snapshot-local</url>
		</pluginRepository>
	</pluginRepositories>
	<dependencies>
		<dependency>
			<groupId>org.jsweet</groupId>
			<artifactId>jsweet-core</artifactId>
			<version>${jsweet.core.version}</version>
		</dependency>
		<dependency>
			<groupId>org.jsweet.extension</groupId>
			<artifactId>processing-jsweet-support</artifactId>
			<version>${jsweet.processing-support.version}</version>
			<scope>runtime</scope>
			<optional>true</optional>
		</dependency>
	</dependencies>
	<build>
		<sourceDirectory>src/main/java</sourceDirectory>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
					<fork>true</fork>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.jsweet</groupId>
				<artifactId>jsweet-maven-plugin</artifactId>
				<version>${jsweet.transpiler.version}</version>
				<configuration>
					<bundle>true</bundle>
					<verbose>true</verbose>
					<outDir>src/main/resources/META-INF/resources/webjars/${project.artifactId}/${project.version}</outDir>
					<tsOut>src/main/resources/META-INF/resources/webjars/${project.artifactId}/${project.version}</tsOut>
					<declaration>true</declaration>
					<dtsOut>src/main/resources/META-INF/resources/typings/${project.artifactId}/${project.version}</dtsOut>
					<targetVersion>ES5</targetVersion>
					<encoding>UTF-8</encoding>
					<ignoredProblems>
						<ignoredProblem>INVALID_METHOD_BODY_IN_INTERFACE</ignoredProblem>
						<ignoredProblem>INVALID_PRIVATE_IN_INTERFACE</ignoredProblem>
					</ignoredProblems>
					<factoryClassName>org.jsweet.extension.processing.ProcessingJSweetFactory</factoryClassName>
				</configuration>
				<executions>
					<execution>
						<id>generate-js</id>
						<phase>generate-sources</phase>
						<goals>
							<goal>jsweet</goal>
						</goals>
					</execution>
					<execution>
						<id>clean</id>
						<phase>clean</phase>
						<goals>
							<goal>clean</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.8</version>
				<executions>
					<execution>
						<phase>package</phase>
						<configuration>
							<target>
								<echo message="copying generated bundles to dist..." />

								<mkdir dir="dist/"></mkdir>

								<copy
									file="src/main/resources/META-INF/resources/typings/${project.artifactId}/${project.version}/bundle.d.ts"
									tofile="dist/${project.artifactId}.d.ts" verbose="true"
									failonerror="false" />
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<configuration>
					<filesets>
						<fileset>
							<directory>src/main/resources/META-INF/resources/webjars</directory>
							<includes>
								<include>**</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
						<fileset>
							<directory>src/main/resources/META-INF/resources/typings</directory>
							<includes>
								<include>**</include>
							</includes>
							<followSymlinks>false</followSymlinks>
						</fileset>
					</filesets>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
					<execution>
						<phase>deploy</phase>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.10.3</version>
				<configuration>
					<javadocVersion>1.8</javadocVersion>
					<sourcepath>src/main/java</sourcepath>
					<skip>${skipJavadoc}</skip>
					<encoding>UTF-8</encoding>
					<fixTags>all</fixTags>
					<failOnError>false</failOnError>
					<!-- leave these options unchanged to place the Javadoc at the right 
						place for jsweet.org -->
					<reportOutputDirectory>/var/www/apidocs/releases/org/jsweet/candies</reportOutputDirectory>
					<destDir>${project.artifactId}/${project.version}</destDir>
					<!-- end of jsweet.org configuration -->
					<header><![CDATA[<a href="http://www.jsweet.org" target="_blank" style="text-transform: lowercase">http://www.jsweet.org<a>]]></header>
					<bottom><![CDATA[<center>Copyright 2015, <a href="http://www.cincheo.org" target="_blank">Cinchéo SAS<a> - Web site: <a href="http://www.jsweet.org" target="_blank">http://www.jsweet.org<a><center>]]></bottom>
					<stylesheetfile>/var/www/apidocs/stylesheet.css</stylesheetfile>
				</configuration>
				<executions>
					<execution>
						<id>attach-javadoc</id>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>

		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings 
					only. It has no influence on the Maven build itself. -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.jsweet
										</groupId>
										<artifactId>
											jsweet-maven-plugin
										</artifactId>
										<versionRange>
											[1.1.0-SNAPSHOT,)
										</versionRange>
										<goals>
											<goal>jsweet</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>org.apache.maven.plugins</groupId>
										<artifactId>maven-antrun-plugin</artifactId>
										<versionRange>[1.0,)</versionRange>
										<goals>
											<goal>run</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore></ignore>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>
	<distributionManagement>
		<repository>
			<id>jsweet-release</id>
			<name>libs-release</name>
			<url>http://repository.jsweet.org/artifactory/libs-release-local</url>
		</repository>
		<snapshotRepository>
			<id>jsweet-snapshots</id>
			<name>libs-snapshot</name>
			<url>http://repository.jsweet.org/artifactory/libs-snapshot-local</url>
		</snapshotRepository>
	</distributionManagement>
	<organization>
		<name>JSweet</name>
		<url>http://www.jsweet.org</url>
	</organization>
</project>
