<?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.github.seasarorg.mayaa</groupId>
  <artifactId>mayaa</artifactId>
  <name>Mayaa</name>
  <packaging>jar</packaging>
  <version>1.2</version>
  <description>Mayaa is server side web template engine that is strongly aware of work sharing between programmers and designers based on HTML based templates.</description>
  <url>http://mayaa.seasar.org/</url>

  <scm>
    <connection>scm:git:git://github.com/seasarorg/mayaa.git</connection>
    <developerConnection>scm:git:ssh://github.com:seasarorg/mayaa.git</developerConnection>
    <url>http://github.com/seasarorg/mayaa/tree/master</url>
  </scm>

  <issueManagement>
    <system>Github</system>
    <url>https://github.com/seasarorg/mayaa/issues</url>
  </issueManagement>

  <inceptionYear>2004</inceptionYear>

  <properties>
    <!-- 普段はJUnitパフォーマンス計測用テスト、遅いテストは除外する -->
    <testExcludedGroups>test.PerformanceTest.class,test.SlowTest.class</testExcludedGroups>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>

  <profiles>
    <profile>
        <!-- JUnitにて低速なテストも含めて実行するためのプロファイル -->
        <id>withSlowTest</id>
        <build>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <excludedGroups>test.PerformanceTest.class</excludedGroups>
                <argLine>${jacocoArgs} -Xmx2048m</argLine>
              </configuration>
            </plugin>
          </plugins>
        </build>
        <properties>
        </properties>
      </profile>
      <profile>
        <!-- JUnitにてパフォーマンスの検証を行うためのプロファイル -->
        <!-- 対象テストを test.PerformanceTest.class に限定し、Java Flight Recorder を有効にする -->
        <id>withPerformanceTest</id>
        <properties>
          <testExcludedGroups></testExcludedGroups><!-- 除外テスト指定を空にする-->
        </properties>
        <build>
          <plugins>
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-surefire-plugin</artifactId>
              <configuration>
                <groups>test.PerformanceTest.class</groups>
                <argLine>-XX:+FlightRecorder -XX:StartFlightRecording=duration=60s,filename=target/performance-test.jfr</argLine>
              </configuration>
            </plugin>
          </plugins>
        </build>
      </profile>
  </profiles>

  <mailingLists>
    <mailingList>
      <name>Mayaa-user</name>
      <subscribe>https://www.seasar.org/mailman/listinfo/mayaa-user</subscribe>
      <unsubscribe>https://www.seasar.org/mailman/listinfo/mayaa-user</unsubscribe>
      <post>mayaa-user@ml.seasar.org</post>
      <archive>http://ml.seasar.org/archives/mayaa-user/</archive>
    </mailingList>
  </mailingLists>

  <developers>
    <developer>
      <id>suga</id>
      <name>SUGA Koji</name>
      <email></email>
      <organization>Gluegent Inc.</organization>
      <timezone>+9</timezone>
    </developer>
    <developer>
      <id>masataka_k</id>
      <name>KURIHARA Masataka</name>
      <email></email>
      <url>http://d.hatena.ne.jp/masataka_k/</url>
      <organization>Gluegent Inc.</organization>
      <timezone>+9</timezone>
    </developer>
    <developer>
      <id>maruo</id>
      <name>MARUO Syunsuke</name>
      <email></email>
      <url>http://d.hatena.ne.jp/maruo_syunsuke/</url>
      <organization>Gluegent Inc.</organization>
      <timezone>+9</timezone>
    </developer>
    <developer>
      <id>duran</id>
      <name>duran</name>
      <email></email>
      <url>http://d.hatena.ne.jp/duran/</url>
      <organization></organization>
      <timezone>+9</timezone>
    </developer>
    <developer>
      <id>katochin</id>
      <name>KATO Taro</name>
      <email></email>
      <url>http://d.hatena.ne.jp/t-katochin/</url>
      <organization>Gluegent Inc.</organization>
      <timezone>+9</timezone>
    </developer>
    <developer>
      <id>sasakichi</id>
      <name>SASAKI Hisanobu</name>
      <email></email>
      <url></url>
      <organization></organization>
      <timezone>+9</timezone>
    </developer>
    <developer>
      <id>matobat</id>
      <name>MATOBA Tatsunori</name>
      <email></email>
      <url>http://d.hatena.ne.jp/matobat/</url>
      <timezone>+9</timezone>
    </developer>
    <developer>
      <id>susumuis</id>
      <name>Susumu ISHIGAMI</name>
      <email></email>
      <url>http://www.susumuis.info/</url>
      <timezone>+9</timezone>
    </developer>
  </developers>

  <licenses>
    <license>
      <name>The Apache Software License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>The Seasar Foundation</name>
    <url>http://www.seasar.org/</url>
  </organization>

  <build>
    <sourceDirectory>src-api</sourceDirectory>
    <resources>
      <resource>
        <directory>src-api</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src-impl</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/java</directory>
        <excludes>
            <exclude>**/*.java</exclude>
        </excludes>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <configuration>
            <encoding>UTF-8</encoding>
            <source>1.7</source>
            <target>1.7</target>
            <compilerArgument>-Xlint:deprecation</compilerArgument>
          </configuration>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <configuration>
            <encoding>UTF-8</encoding>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <configuration>
            <excludedGroups>${testExcludedGroups}</excludedGroups>
            <argLine>${jacocoArgs} -Xmx2048m</argLine>
            <systemPropertyVariables>
              <inMaven>1</inMaven>
            </systemPropertyVariables>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
        <executions>
          <execution>
            <id>source-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <encoding>UTF-8</encoding>
          <docencoding>UTF-8</docencoding>
          <charset>UTF-8</charset>
          <source>1.7</source>
          <quiet>true</quiet>
        </configuration>
        <executions>
          <execution>
            <id>javadoc-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>add-source</id>
            <goals>
              <goal>add-source</goal>
            </goals>
            <configuration>
              <sources>
                <source>src-impl</source>
              </sources>
            </configuration>
          </execution>
          <execution>
            <id>add-test-resource</id>
            <phase>generate-test-resources</phase>
            <goals>
              <goal>add-test-resource</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>src/integration-test/resources</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-failsafe-plugin</artifactId>
        <version>2.22.0</version>
        <executions>
          <execution>
            <goals>
              <goal>integration-test</goal>
              <goal>verify</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>templating-maven-plugin</artifactId>
        <version>1.0.0</version>
        <executions>
          <execution>
            <id>filter-src</id>
            <goals>
              <goal>filter-sources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.seasar.mayaa.impl.standalone.FileGenerator</mainClass>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.jacoco</groupId>
        <artifactId>jacoco-maven-plugin</artifactId>
        <version>0.8.2</version>
        <executions>
          <execution>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <configuration>
              <propertyName>jacocoArgs</propertyName>
              <destFile>${project.build.directory}/jacoco-output/jacoco-ut.exec</destFile>
            </configuration>
          </execution>
          <!-- attached to Maven test phase -->
          <execution>
            <id>report</id>
            <phase>test</phase>
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <dataFile>${project.build.directory}/jacoco-output/jacoco-ut.exec</dataFile>
              <outputDirectory>${project.reporting.outputDirectory}/jacoco-ut</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>before-integration-test-execution</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>prepare-agent</goal>
            </goals>
            <configuration>
              <propertyName>jacocoArgsIt</propertyName>
              <destFile>${project.build.directory}/jacoco-output/jacoco-it.exec</destFile>
            </configuration>
          </execution>
          <execution>
            <id>after-integration-test-execution</id>
            <phase>verify</phase>
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <dataFile>${project.build.directory}/jacoco-output/jacoco-it.exec</dataFile>
              <outputDirectory>${project.reporting.outputDirectory}/jacoco-it</outputDirectory>
            </configuration>
          </execution>
          <execution>
            <id>merge-unit-and-integration</id>
            <phase>verify</phase>
              <goals>
                <goal>merge</goal>
              </goals>
              <configuration>
              <fileSets>
                <fileSet>
                  <directory>${project.build.directory}/jacoco-output/</directory>
                  <includes>
                    <include>*.exec</include>
                  </includes>
                </fileSet>
              </fileSets>
              <destFile>${project.build.directory}/jacoco-output/merged.exec</destFile>
            </configuration>
          </execution>
          <execution>
            <id>create-merged-report</id>
            <phase>verify</phase>
            <goals>
              <goal>report</goal>
            </goals>
            <configuration>
              <dataFile>${project.build.directory}/jacoco-output/merged.exec</dataFile>
              <outputDirectory>${project.reporting.outputDirectory}/jacoco-merged</outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>9.4.11.v20180605</version>
        <configuration>
          <httpConnector>
            <port>8999</port>
          </httpConnector>
          <stopKey>quit</stopKey>
          <stopPort>9000</stopPort>
          <useTestScope>true</useTestScope>
          <webAppSourceDirectory>${basedir}/src/integration-test/webapp</webAppSourceDirectory>
          <supportedPackagings>
            <supportedPackaging>jar</supportedPackaging>
          </supportedPackagings>
        </configuration>
        <executions>
          <execution>
            <id>start-jetty</id>
            <phase>pre-integration-test</phase>
            <goals>
              <goal>stop</goal>
              <goal>run-forked</goal><!-- for jacoco coverage -->
            </goals>
            <configuration>
              <jvmArgs>-Djetty.port=8999 ${jacocoArgsIt}</jvmArgs>
              <waitForChild>false</waitForChild>
            </configuration>
          </execution>
          <execution>
            <id>stop-jetty</id>
            <phase>post-integration-test</phase>
            <goals>
              <goal>stop</goal>
            </goals>
          </execution>
        </executions>
      </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>
      <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>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav</artifactId>
        <version>1.0-beta-2</version>
      </extension>
    </extensions>
  </build>

  <dependencies>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
      <version>1.9.4</version>
    </dependency>
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2.2</version>
    </dependency>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <version>1.2</version>
    </dependency>
    <dependency>
      <groupId>jaxen</groupId>
      <artifactId>jaxen</artifactId>
      <version>1.1.1</version>
      <exclusions>
        <exclusion>
          <groupId>dom4j</groupId>
          <artifactId>dom4j</artifactId>
        </exclusion>
        <exclusion>
          <groupId>jdom</groupId>
          <artifactId>jdom</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xerces</groupId>
          <artifactId>xmlParserAPIs</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xerces</groupId>
          <artifactId>xercesImpl</artifactId>
        </exclusion>
        <exclusion>
          <groupId>xom</groupId>
          <artifactId>xom</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>nekohtml</groupId>
      <artifactId>nekohtml</artifactId>
      <version>0.9.5</version>
      <exclusions>
        <exclusion>
          <groupId>xerces</groupId>
          <artifactId>xerces</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>rhino</groupId>
      <artifactId>js</artifactId>
      <version>1.7R2</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.12.0</version>
    </dependency>
    <dependency>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
      <version>1.3.03</version>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>jsp-api</artifactId>
      <version>2.0</version>
      <scope>provided</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/junit/junit -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.13.1</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.mockito/mockito-core -->
    <dependency>
      <groupId>org.mockito</groupId>
      <artifactId>mockito-core</artifactId>
      <version>2.28.2</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-test -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <version>3.2.18.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.springframework/spring-web -->
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-web</artifactId>
      <version>3.2.18.RELEASE</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/ch.qos.logback/logback-classic -->
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.2.3</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/javax.activation/javax.activation-api -->
    <dependency>
      <groupId>javax.activation</groupId>
      <artifactId>javax.activation-api</artifactId>
      <version>1.2.0</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.sun.activation/javax.activation -->
    <dependency>
      <groupId>com.sun.activation</groupId>
      <artifactId>javax.activation</artifactId>
      <version>1.2.0</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/javax.servlet.jsp.jstl-api -->
    <dependency>
      <groupId>javax.servlet.jsp.jstl</groupId>
      <artifactId>javax.servlet.jsp.jstl-api</artifactId>
      <version>1.2.2</version>
      <scope>test</scope>
    </dependency>
    <!-- https://mvnrepository.com/artifact/org.apache.taglibs/taglibs-standard-impl -->
    <dependency>
        <groupId>org.apache.taglibs</groupId>
        <artifactId>taglibs-standard-impl</artifactId>
        <version>1.2.5</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>com.codeborne</groupId>
        <artifactId>selenide</artifactId>
        <version>5.1.0</version>
        <scope>test</scope>
    </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>
</project>
