<?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>
	<groupId>org.zkoss.zk</groupId>
	<artifactId>zul</artifactId>
	<packaging>jar</packaging>
	<version>9.0.1.2</version>
	<name>ZK XUL Components</name>
	<url>http://www.zkoss.org/zul</url>
	<description>ZK XUL components (XML user interface markup language)</description>
	<licenses>
		<license>
			<name>GNU LESSER GENERAL PUBLIC LICENSE, Version 3</name>
			<url>http://www.gnu.org/licenses/lgpl.html</url>
			<distribution>repo</distribution>
		</license>
	</licenses>
	<developers>
		<developer>
			<id>zkteam</id>
			<name>ZK Team</name>
			<email>info@zkoss.org</email>
			<url>http://www.zkoss.org</url>
			<organization>Potix</organization>
			<organizationUrl>http://www.zkoss.org</organizationUrl>
			<roles>
				<role>architect</role>
				<role>developer</role>
			</roles>
			<timezone>8</timezone>
			<properties>
				<picUrl>http://www.zkoss.org</picUrl>
			</properties>
		</developer>
	</developers>
	<scm>
		<connection>scm:git:https://github.com/zkoss/zk.git</connection>
		<url>https://mavensync.zkoss.org/maven2</url>
	</scm>
	<repositories>
		<repository>
			<id>zk repository</id>
			<url>https://mavensync.zkoss.org/maven2</url>
		</repository>
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>zkmaven</id>
			<name>ZK Maven Plugin Repository</name>
			<url>https://mavensync.zkoss.org/maven2</url>
		</pluginRepository>
		<pluginRepository>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<id>central</id>
			<name>Maven Plugin Repository</name>
			<url>https://repo1.maven.org/maven2</url>
		</pluginRepository>
	</pluginRepositories>
	<dependencies>
		<dependency>
			<groupId>org.zkoss.zk</groupId>
			<artifactId>zk</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
		    <groupId>javax.servlet</groupId>
		    <artifactId>servlet-api</artifactId>
		    <version>2.5</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	<build>
		<directory>${project.basedir}/debug</directory>
		<outputDirectory>${project.basedir}/debug/classes</outputDirectory>
		<finalName>${project.artifactId}-${project.version}</finalName>
		<testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory>
		<sourceDirectory>${project.basedir}/src/</sourceDirectory>
		<resources>
            <resource>
                <directory>${project.basedir}/src/archive</directory>
            </resource>
			<resource>
				<directory>${project.basedir}/codegen/archive</directory>
			</resource>
		</resources>
		<plugins>
			<!--<plugin>
				<groupId>org.zkoss.maven</groupId>
				<artifactId>yuicompressor-maven-plugin-zk</artifactId>
				<version>1.1.4</version>
				<executions>
					<execution>
						<goals>
							<goal>compress</goal>
						</goals>
					</execution>
				</executions>
			</plugin>-->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.6.0</version>
				<executions>
					<execution>
						<id>compile-less</id>
						<phase>process-resources</phase>
						<goals>
							<goal>exec</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<executable>npx</executable>
					<arguments>
						<argument>zklessc</argument>
						<argument>--source</argument>
						<argument>${project.basedir}/src/archive/web</argument>
						<argument>--output</argument>
						<argument>${project.build.outputDirectory}/web</argument>
						<argument>--compress</argument>
					</arguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.1</version>
				<configuration>
					<source>8</source>
					<target>8</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>com.github.eirslett</groupId>
				<artifactId>frontend-maven-plugin</artifactId>
				<version>1.7.6</version>
				<configuration>
					<nodeVersion>v10.16.0</nodeVersion>
					<workingDirectory>../</workingDirectory> <!-- zk folder -->
				</configuration>
				<executions>
					<execution>
						<id>install node and npm</id>
						<goals>
							<goal>install-node-and-npm</goal>
						</goals>
					</execution>
					<execution>
						<id>npm install</id>
						<goals>
							<goal>npm</goal>
						</goals>
						<configuration>
							<arguments>install</arguments>
						</configuration>
					</execution>
					<execution>
						<id>typescript_production</id>
						<goals>
							<goal>npm</goal>
						</goals>
						<phase>process-resources</phase>
						<configuration>
							<arguments>
								run build:single --
								--src="${project.basedir}/src/archive/web/js"
								--dest="${project.build.outputDirectory}/web/js"
							</arguments>
						</configuration>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project> 
