<?xml version="1.0" encoding="UTF-8"?>
<project
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
  xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <artifactId>portlets</artifactId>
    <groupId>com.aimluck.eip</groupId>
    <version>8.0.1</version>
    <relativePath>../pom.xml</relativePath>
  </parent>

  <groupId>com.aimluck.eip</groupId>
  <artifactId>aipo-portlet-wiki</artifactId>
  <packaging>jar</packaging>

  <name>Aipo Wiki Portlet</name>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.8</version>
        <executions>
            <execution>
                <id>copy-template</id>
            	<phase>initialize</phase>
            	<configuration>
		          <target>
		            <echo message="copy template files from ja directory"/>
		            <property name="htmlDir" value="src/main/webapp/WEB-INF/templates/vm/portlets/html"/>
		            <copy todir="${htmlDir}">
		                <fileset dir="${htmlDir}/ja"/>
		            </copy>
		          </target>
		        </configuration>
	            <goals>
	              <goal>run</goal>
	            </goals>
            </execution>
          <execution>
            <id>copy</id>
            <phase>package</phase>
            <configuration>
              <target>
                <copy todir="../../war/target/aipo" verbose="false"
                  overwrite="true">
                  <fileset dir="./src/main/webapp" includes="**/*" />
                </copy>
                <copy todir="../../war/target/aipo/WEB-INF/lib"
                  verbose="false" overwrite="true">
                  <fileset dir="./target" includes="*-${aipo.version}.jar" />
                </copy>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>yuicompressor-maven-plugin</artifactId>
        <version>1.3.2</version>
        <executions>
          <execution>
            <goals>
              <goal>compress</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <sourceDirectory>./src/main/webapp/javascript</sourceDirectory>
          <outputDirectory>../../war/target/aipo/javascript</outputDirectory>
          <nosuffix>true</nosuffix>
          <encoding>UTF-8</encoding>
          <gzip>false</gzip>
          <includes>
            <include>**/*.js</include>
          </includes>
          <jswarn>false</jswarn>
          <statistics>false</statistics>
          <force>true</force>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>com.aimluck.eip</groupId>
      <artifactId>aipo-portlet-fileupload</artifactId>
      <version>${aipo.version}</version>
    </dependency>
  </dependencies>

</project>
