All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.pom.xml Maven / Gradle / Ivy

There is a newer version: 4.0.3
Show newest version
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
<?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>${package}</groupId>
    <artifactId>${artifactId}</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>${artifactId}</name>
    <description>Spring and JDBI web archetype</description>
    <url>https://github.com/kentyeh/${artifactId}Arch</url>
    
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.7</maven.compiler.source>
        <maven.compiler.target>1.7</maven.compiler.target>
        <maven.compiler.optimize>true</maven.compiler.optimize>
        <spring.version>4.2.2.RELEASE</spring.version>
        <spring.security.version>4.0.3.RELEASE</spring.security.version>
        <hibernate.version>5.0.3.Final</hibernate.version>
        <cucumber.version>1.2.4</cucumber.version>
        <h2.version>1.4.190</h2.version>
        <capsule.version>1.0</capsule.version>
        <atomikos.version>4.0.0M4</atomikos.version>
        <maven.test.skip>false</maven.test.skip>
        <context.path>${symbol_dollar}{project.artifactId}</context.path>
        <log4j.version>2.4.1</log4j.version> 
        <disruptor.version>3.3.2</disruptor.version>
        <jndi.dsname>${JndiDataSourceName}</jndi.dsname>
        <key.alias>tomcat</key.alias>
        <key.cn>localhost</key.cn>
        <key.pass>password</key.pass>
        <test.http.port>${HTTP_PORT}</test.http.port>
        <test.ssl.port>${SSL_PORT}</test.ssl.port>
        <findbugs.fork>false</findbugs.fork>
        <wroFolder>${symbol_dollar}{basedir}/src/main/webapp/wro</wroFolder>
    </properties>
    
    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
        </license>
    </licenses>
    <developers>
        <developer>
            <id>yes2000</id>
            <name>Kent Yeh</name>
            <email>[email protected]</email>
            <url>https://github.com/kentyeh</url>
            <roles>
                <role>architect</role>
                <role>developer</role>
            </roles>
            <timezone>+8</timezone>
            <properties>
                <picUrl>http://lh3.googleusercontent.com/-riyCbTcpYdo/AAAAAAAAAAI/AAAAAAAAAAA/47MhS2LUlZo/s48-c-k/photo.jpg</picUrl>
            </properties>
        </developer>
    </developers>
    
    <!--Defaine your Srouce Management,設定源碼版本管理-->
    <scm>
        <url>[email protected]:kentyeh/${artifactId}Arch.git</url>
        <connection>scm:git:[email protected]:kentyeh/${artifactId}Arch.git</connection>
        <developerConnection>scm:git:[email protected]:kentyeh/${artifactId}Arch.git</developerConnection>
    </scm>
    
    <dependencies>
        <!--Log4j2 start-->
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-core</artifactId>
            <version>${symbol_dollar}{log4j.version}</version> 
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-api</artifactId>
            <version>${symbol_dollar}{log4j.version}</version> 
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-jcl</artifactId>
            <version>${symbol_dollar}{log4j.version}</version> 
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-slf4j-impl</artifactId>
            <version>${symbol_dollar}{log4j.version}</version> 
        </dependency>
        <dependency>
            <groupId>com.lmax</groupId>
            <artifactId>disruptor</artifactId>
            <version>${symbol_dollar}{disruptor.version}</version>
        </dependency>
        <!--Log4j2 end-->

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${symbol_dollar}{spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${symbol_dollar}{spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${symbol_dollar}{spring.version}</version>
        </dependency>
	
        <!--Mobile device dection-->
        <dependency>
            <groupId>org.springframework.mobile</groupId>
            <artifactId>spring-mobile-device</artifactId>
            <version>1.1.5.RELEASE</version>
        </dependency> 
        
        <!--Database Start-->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${symbol_dollar}{spring.version}</version>
        </dependency>
        <dependency>
            <groupId>org.jdbi</groupId>
            <artifactId>jdbi</artifactId>
            <version>2.69-alpha</version>
        </dependency>
        <dependency>
            <groupId>org.antlr</groupId>
            <artifactId>stringtemplate</artifactId>
            <version>3.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>5.2.2.Final</version>
        </dependency>
        <!--hibernate-validator 5.x require el-api-->
        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>el-api</artifactId>
            <version>2.2.1-b04</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>el-impl</artifactId>
            <version>2.2.1-b05</version>
            <scope>runtime</scope>
        </dependency>
        
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache-core</artifactId>
            <version>2.6.11</version>                      
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-ehcache</artifactId>
            <version>${symbol_dollar}{hibernate.version}</version>
        </dependency>
        <!--Add your jdbc library. 加入您自個兒的JDBC函式庫-->
        <!--Database End-->
        
        <!--Spring Security start-->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-config</artifactId>
            <version>${symbol_dollar}{spring.security.version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-taglibs</artifactId>
            <version>${symbol_dollar}{spring.security.version}</version>
        </dependency>
        <dependency>
            <groupId>org.openid4java</groupId>
            <artifactId>openid4java</artifactId>
            <version>0.9.8</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-openid</artifactId>
            <version>${symbol_dollar}{spring.security.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.openid4java</groupId>
                    <artifactId>openid4java-nodeps</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <!--Spring Security end-->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
            <version>1.2</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
        <!--Test library dependencies -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>${symbol_dollar}{spring.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-test</artifactId>
            <version>${symbol_dollar}{spring.security.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
            <version>6.9.9</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-java</artifactId>
            <version>${symbol_dollar}{cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-testng</artifactId>
            <version>${symbol_dollar}{cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>info.cukes</groupId>
            <artifactId>cucumber-spring</artifactId>
            <version>${symbol_dollar}{cucumber.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>${symbol_dollar}{h2.version}</version> 
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>1.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
        
        <!--Integration test with Selenium-->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.47.1</version>
            <scope>test</scope>
        </dependency>
        
        <!--HtmlUnit start-->
        <dependency>
            <groupId>net.sourceforge.htmlunit</groupId>
            <artifactId>htmlunit</artifactId>
            <version>2.18</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.4.01</version>
            <scope>test</scope>
        </dependency>
        <dependency>    
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.1</version>
            <scope>test</scope>
        </dependency>
        <!--For htmlunit: version conflict with openid4java -->
        <dependency>
            <groupId>net.sourceforge.nekohtml</groupId>
            <artifactId>nekohtml</artifactId>
            <version>1.9.22</version>
            <scope>test</scope>
        </dependency>
        <!--HtmlUnit end-->
    </dependencies>
    <prerequisites>
        <maven>3.0.1</maven>
    </prerequisites> 
    <profiles>
        <profile>
            <id>cuke</id>
            <dependencies>
                <dependency>
                    <groupId>info.cukes</groupId>
                    <artifactId>cucumber-java</artifactId>
                    <version>${symbol_dollar}{cucumber.version}</version>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>exec-maven-plugin</artifactId>
                        <version>1.4.0</version>
                        <executions>
                            <execution>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>exec</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <executable>java</executable>
                            <arguments>
                                <argument>-classpath</argument>
                                <classpath /> 
                                <argument>cucumber.api.cli.Main</argument>
                                <argument>-p</argument>
                                <argument>pretty</argument>
                                <argument>--snippets</argument>
                                <argument>camelcase</argument>
                                <argument>-d</argument>
                                <argument>${symbol_dollar}{basedir}/src/test/resources/features</argument>
                            </arguments>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>runwar</id>
            <build>
                <plugins>
                    <!-- Generate ssl key store for package, 產生key store 一併打包 -->
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>keytool-maven-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>genkey</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>generateKeyPair</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <keystore>${symbol_dollar}{project.build.directory}/${symbol_dollar}{project.artifactId}/WEB-INF/ssl.keystore</keystore>
                            <dname>cn=${symbol_dollar}{key.cn}</dname>
                            <storepass>${symbol_dollar}{key.pass}</storepass>
                            <keypass>${symbol_dollar}{key.pass}</keypass>
                            <alias>${symbol_dollar}{key.alias}</alias>
                            <keyalg>RSA</keyalg>
                            <validity>36525</validity>
                        </configuration>
                    </plugin>
                    <!-- Package capsule necessary class and jar, 打包併入Capsule必要的類別與函式庫 -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-dependency-plugin</artifactId>
                        <version>2.10</version>
                        <executions>
                            <execution>
                                <id>unpack</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>unpack</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>co.paralleluniverse</groupId>
                                            <artifactId>capsule</artifactId>
                                            <version>${symbol_dollar}{capsule.version}</version>
                                            <type>jar</type>
                                            <overWrite>false</overWrite>
                                            <outputDirectory>${symbol_dollar}{project.build.directory}/${symbol_dollar}{project.artifactId}</outputDirectory>
                                            <includes>**/*.class</includes>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                            <execution>
                                <id>copy</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>copy</goal>
                                </goals>
                                <configuration>
                                    <artifactItems>
                                        <artifactItem>
                                            <groupId>co.paralleluniverse</groupId>
                                            <artifactId>capsule-maven</artifactId>
                                            <version>${symbol_dollar}{capsule.version}</version>
                                            <type>jar</type>
                                            <outputDirectory>${symbol_dollar}{project.build.directory}/${symbol_dollar}{project.artifactId}</outputDirectory>
                                        </artifactItem>
                                    </artifactItems>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <!-- Copy jetty config & h2 initial schmea to pacage, 打包Jetty設定檔與H2初始化之sql-->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-resources-plugin</artifactId>
                        <version>2.7</version>
                        <executions>
                            <execution>
                                <id>copy-jetty-config</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>copy-resources</goal>
                                </goals>
                                <configuration>
                                    <outputDirectory>${symbol_dollar}{project.build.directory}/${symbol_dollar}{project.artifactId}/WEB-INF</outputDirectory>
                                    <resources>
                                        <resource>
                                            <directory>${symbol_dollar}{basedir}/src/test/resources/runWar</directory>
                                            <filtering>true</filtering>
                                        </resource>
                                    </resources>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-war-plugin</artifactId>
                        <version>2.6</version>
                        <configuration>
                            <archive>
                                <manifestEntries>
                                    <Main-Class>Capsule</Main-Class>
                                    <Premain-Class>Capsule</Premain-Class>
                                    <Caplets>co.paralleluniverse:capsule-maven:${symbol_dollar}{capsule.version}</Caplets>
                                    <Application>org.eclipse.jetty:jetty-runner:9.2.13.v20150730</Application>
                                    <Application-Class>org.eclipse.jetty.runner.Runner</Application-Class>
                                    <System-Properties>catalina.home=${symbol_dollar}CAPSULE_DIR/WEB-INF org.jboss.logging.provider=log4j2</System-Properties>
                                    <Dependencies>javax.transaction:jta:1.1 com.h2database:h2:${symbol_dollar}{h2.version} com.atomikos:transactions-jta:${symbol_dollar}{atomikos.version} com.atomikos:transactions-jdbc:${symbol_dollar}{atomikos.version} org.slf4j:slf4j-simple:1.7.12</Dependencies>
                                    <Allow-Snapshots>true</Allow-Snapshots>
                                    <Min-Java-Version>1.7.0</Min-Java-Version>
                                    <Args>--config ${symbol_dollar}CAPSULE_DIR/WEB-INF/jetty.xml ${symbol_dollar}CAPSULE_JAR</Args>
                                </manifestEntries>
                            </archive>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <build>
        <finalName>${symbol_dollar}{project.artifactId}</finalName>
        <resources>
            <resource>
                <directory>${symbol_dollar}{basedir}/src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>${symbol_dollar}{basedir}/src/test/resources</directory>
                <filtering>true</filtering> 
            </testResource>
        </testResources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.3</version>
                <configuration>
                    <source>${symbol_dollar}{maven.compiler.source}</source>
                    <target>${symbol_dollar}{maven.compiler.target}</target>
                    <showDeprecation>true</showDeprecation>
                    <optimize>true</optimize>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
                <version>3.0.0</version>
                <configuration>
                    <filesets>
                        <fileset>
                            <directory>${symbol_dollar}{wroFolder}</directory>
                            <followSymlinks>false</followSymlinks>
                            <useDefaultExcludes>true</useDefaultExcludes>
                        </fileset>
                    </filesets>
                </configuration>
            </plugin>
            <plugin>
                <groupId>ro.isdc.wro4j</groupId>
                <artifactId>wro4j-maven-plugin</artifactId>
                <version>1.7.9</version>
                <!--<executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>-->
                <configuration>
                    <targetGroups>all</targetGroups>
                    <minimize>true</minimize>
                    <contextFolder>${symbol_dollar}{basedir}/src/main/webapp/</contextFolder>
                    <destinationFolder>${symbol_dollar}{wroFolder}</destinationFolder>
                    <wroFile>${symbol_dollar}{basedir}/src/test/resources/wro.xml</wroFile>
                    <!--Google Closure Compile JavaScript processor-->
                    <wroManagerFactory>ro.isdc.wro.extensions.manager.standalone.GoogleStandaloneManagerFactory</wroManagerFactory>
                    <ignoreMissingResources>false</ignoreMissingResources>
                    <parallelProcessing>true</parallelProcessing>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>2.19</version>
                <executions>
                    <execution>
                        <id>integration-test</id>
                        <goals>
                            <goal>integration-test</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>verify</id>
                        <goals>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>      
                    <systemProperties>
                        <property>
                            <name>catalina.home</name>
                            <value>${symbol_dollar}{project.build.directory}</value>
                        </property>
                        <property>
                            <name>org.jboss.logging.provider</name>
                            <value>log4j2</value>
                        </property>
                    </systemProperties>
                    <suiteXmlFiles>
                        <suiteXmlFile>${symbol_dollar}{project.build.testOutputDirectory}/testng-integration.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <includes>
                        <include>**/Test*.java</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.19</version>
                <configuration>
                    <systemProperties>
                        <property>
                            <name>catalina.home</name>
                            <value>${symbol_dollar}{project.build.directory}</value>
                        </property>
                        <property>
                            <name>org.jboss.logging.provider</name>
                            <value>log4j2</value>
                        </property>
                    </systemProperties>
                    <suiteXmlFiles>
                        <suiteXmlFile>${symbol_dollar}{project.build.testOutputDirectory}/testng-unit.xml</suiteXmlFile>
                    </suiteXmlFiles> 
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.7</version>
                <executions>
                    <execution>
                        <phase>pre-site</phase>
                        <goals>
                            <goal>cobertura</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>net.sourceforge.cobertura</groupId>
                        <artifactId>cobertura</artifactId>
                        <version>2.1.1</version>
                    </dependency>
                </dependencies>
                <!-- Uncomment if java version 7+-->
                <configuration>
                    <argLine>-XX:-UseSplitVerifier</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>3.5</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>check</goal>
                            <goal>cpd-check</goal>
                        </goals>
                    </execution>
                </executions>   
                <configuration>
                    <failOnViolation>false</failOnViolation>
                    <linkXref>true</linkXref>
                    <sourceEncoding>${symbol_dollar}{project.build.sourceEncoding}</sourceEncoding>
                    <minimumTokens>100</minimumTokens><!--minimun token duplicated think as source duplicated-->
                    <targetJdk>${symbol_dollar}{maven.compiler.target}</targetJdk>
                    <verbose>true</verbose>
                </configuration> 
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>3.0.2</version>
                <executions>
                    <execution>
                        <id>check</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>   
                <configuration>
                    <effort>Max</effort><!--Detect Level:Min,Default or Max-->
                    <xmlOutput>true</xmlOutput>
                    <fork>${symbol_dollar}{findbugs.fork}</fork>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>keytool-maven-plugin</artifactId>
                <version>1.5</version>
                <executions>
                    <execution>
                        <id>clean</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>clean</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>genkey</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>generateKeyPair</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <keystore>${symbol_dollar}{project.build.directory}/ssl.keystore</keystore>
                    <dname>cn=${symbol_dollar}{key.cn}</dname>
                    <storepass>${symbol_dollar}{key.pass}</storepass>
                    <keypass>${symbol_dollar}{key.pass}</keypass>
                    <alias>${symbol_dollar}{key.alias}</alias>
                    <keyalg>RSA</keyalg>
                    <validity>36525</validity>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.eclipse.jetty</groupId>
                <artifactId>jetty-maven-plugin</artifactId>
                <version>9.2.13.v20150730</version>
                <executions>
                    <execution>
                        <id>start-jetty</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>start</goal>
                        </goals>
                        <configuration>
                            <scanIntervalSeconds>0</scanIntervalSeconds>
                            <daemon>true</daemon>
                        </configuration>   
                    </execution> 
                    <execution>
                        <id>stop-jetty</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>stop</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.h2database</groupId>
                        <artifactId>h2</artifactId>
                        <version>${symbol_dollar}{h2.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.atomikos</groupId>
                        <artifactId>transactions-jdbc</artifactId>
                        <version>${symbol_dollar}{atomikos.version}</version>
                    </dependency>
                    <dependency>
                        <groupId>com.atomikos</groupId>
                        <artifactId>transactions-jta</artifactId>
                        <version>${symbol_dollar}{atomikos.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <systemProperties>
                        <systemProperty>
                            <name>catalina.home</name>
                            <value>${symbol_dollar}{project.build.directory}</value>
                        </systemProperty>
                        <systemProperty>
                            <name>env</name>
                            <value>${symbol_dollar}{env}</value>
                        </systemProperty>
                        <systemProperty>
                            <name>org.jboss.logging.provider</name>
                            <value>log4j2</value>
                        </systemProperty>
                    </systemProperties>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <jettyXml>${symbol_dollar}{project.build.testOutputDirectory}/jetty-server.xml</jettyXml>
                    <webApp>
                        <contextPath>/${symbol_dollar}{context.path}</contextPath>
                        <jettyEnvXml>${symbol_dollar}{project.build.testOutputDirectory}/jetty-env.xml</jettyEnvXml>
                    </webApp>
                    <httpConnector>
                        <port>${symbol_dollar}{test.http.port}</port>
                    </httpConnector>
                    <requestLog implementation="org.eclipse.jetty.server.NCSARequestLog">
                        <filename>${symbol_dollar}{project.build.directory}/logs/jetty_yyyy_mm_dd.request.log</filename>
                        <retainDays>90</retainDays>
                        <append>true</append>
                        <extended>false</extended>
                        <logTimeZone>GMT</logTimeZone>
                    </requestLog>            
                    <stopKey>HALT</stopKey>
                    <stopPort>9966</stopPort>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <!-- Enabled excutions section for integration test-->
                <!--executions>
                    <execution>
                        <id>start-tomcat</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <daemon>true</daemon>
                        </configuration>
                    </execution>
                    <execution>
                        <id>stop-tomcat</id>
                        <phase>post-integration-test</phase>
                        <goals>
                            <goal>shutdown</goal>
                        </goals>
                    </execution>
                </executions-->
                <dependencies>   
                    <dependency>
                        <groupId>com.h2database</groupId>
                        <artifactId>h2</artifactId>
                        <version>${symbol_dollar}{h2.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <protocol>org.apache.coyote.http11.Http11NioProtocol</protocol>
                    <delegate>true</delegate>
                    <contextReloadable>true</contextReloadable>
                    <contextFile>${symbol_dollar}{basedir}/src/test/resources/tomcat-context.xml</contextFile>
                    <uriEncoding>UTF-8</uriEncoding>
                    <port>${symbol_dollar}{test.http.port}</port>
                    <httpsPort>${symbol_dollar}{test.ssl.port}</httpsPort>
                    <path>/${symbol_dollar}{context.path}</path>
                    <keystoreFile>${symbol_dollar}{project.build.directory}/ssl.keystore</keystoreFile>
                    <keystorePass>${symbol_dollar}{key.pass}</keystorePass>
                    <!--true for integration testing, false for stand alone web start-->
                    <fork>false</fork>
                    <systemProperties>
                        <catalina.home>${symbol_dollar}{project.build.directory}</catalina.home>
                        <org.jboss.logging.provider>log4j2</org.jboss.logging.provider>
                    </systemProperties>
                    <systemProperties>
                        <org.jboss.logging.provider>log4j2</org.jboss.logging.provider>
                    </systemProperties>
                    <skipErrorOnShutdown>true</skipErrorOnShutdown>
                </configuration>
            </plugin>
            <!--Site Report Configuration,報表管理-->
            <plugin>
                <artifactId>maven-site-plugin</artifactId>
                <version>3.4</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.maven.doxia</groupId>
                        <artifactId>doxia-module-markdown</artifactId>
                        <version>1.6</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <!--Uncomment if jdk 7+-->
                    <!--argLine>-XX:-UseSplitVerifier</argLine-->
                    <locales>zh_TW</locales>
                    <reportPlugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-project-info-reports-plugin</artifactId>
                            <version>2.8.1</version>
                            <configuration>
                                <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                            </configuration>
                            <reportSets>
                                <reportSet>
                                    <reports>
                                        <report>index</report>
                                        <report>plugin-management</report><!--專案外掛程式管理 (Project Plugin Management)-->
                                        <!--report>distribution-management</report>  發佈管理-->
                                        <report>scm</report><!--原始碼貯藏庫 (Source Repository)-->
                                        <!--report>mailing-list</report>  專案郵件列表 (Project Mailing Lists)-->
                                        <!--report>issue-tracking</report> 問題追蹤 (Issue Tracking)-->
                                        <!--report>cim</report>  持續整合 (Continuous Integration)-->
                                        <report>plugins</report><!--專案建構外掛程式 (Project Build Plugins)-->
                                        <report>license</report><!--專案授權許可 (Project License)-->
                                        <report>project-team</report><!--團隊 (The Team)-->
                                        <report>summary</report><!--專案摘要 (Project Summary)-->
                                        <report>dependencies</report> <!--專案依賴 (Project Dependencies)-->
                                        <report>dependency-management</report>
                                        <report>modules</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-javadoc-plugin</artifactId>
                            <version>2.10.3</version>
                            <configuration>
                                <aggregate>true</aggregate>
                                <minmemory>128m</minmemory>
                                <maxmemory>512</maxmemory>
                                <breakiterator>true</breakiterator>
                                <failOnError>false</failOnError>
                                <quiet>true</quiet>
                                <source>${symbol_dollar}{maven.compiler.source}</source>
                                <verbose>false</verbose>
                                <linksource>true</linksource>
                                <links>
                                    <link>http://docs.oracle.com/javase/8/docs/api/</link>
                                    <link>http://docs.oracle.com/javaee/7/api/</link>
                                    <link>http://docs.spring.io/spring/docs/current/javadoc-api/</link>
                                    <link>http://docs.spring.io/spring-security/site/docs/current/apidocs/</link>
                                    <link>http://docs.spring.io/spring-mobile/docs/current/api/</link>
                                    <link>http://docs.jboss.org/hibernate/stable/core/javadocs/</link>
                                    <link>http://logging.apache.org/log4j/2.x/log4j-api/apidocs/</link>
                                    <link>http://logging.apache.org/log4j/2.x/log4j-core/apidocs/</link>
                                    <link>http://jdbi.org/apidocs/</link>
                                </links>
                            </configuration>
                            <reportSets>
                                <reportSet>
                                    <id>javadoc</id>
                                    <reports>
                                        <report>javadoc</report>
                                        <!--report>test-javadoc</report-->
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-jxr-plugin</artifactId>
                            <version>2.5</version>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-pmd-plugin</artifactId>
                            <version>3.5</version>
                            <configuration>
                                <failOnViolation>false</failOnViolation>
                                <linkXref>true</linkXref>
                                <sourceEncoding>${symbol_dollar}{project.build.sourceEncoding}</sourceEncoding>
                                <minimumTokens>100</minimumTokens><!--minimun token duplicated think as source duplicated-->
                                <targetJdk>${symbol_dollar}{maven.compiler.target}</targetJdk>
                                <verbose>true</verbose>
                            </configuration> 
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>findbugs-maven-plugin</artifactId>
                            <version>3.0.2</version>
                            <configuration>
                                <failOnError>false</failOnError>
                                <xmlOutputDirectory>${symbol_dollar}{project.build.directory}/site</xmlOutputDirectory>
                                <effort>Max</effort><!--Detect Level:Min,Default or Max-->
                                <xmlOutput>true</xmlOutput>
                                <fork>${symbol_dollar}{findbugs.fork}</fork>
                            </configuration>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-surefire-report-plugin</artifactId>
                            <version>2.19</version>
                            <reportSets>
                                <reportSet>
                                    <id>integration-tests</id>
                                    <reports>
                                        <!--Alternatives ,二選一
                                            report: invoke test ,會引發測試
                                            report-only: invoke test ,不會引發測試,但是之前必須經過測試
                                        -->
                                        <!--<report>report</report>--> 
                                        <report>report-only</report>
                                        <report>failsafe-report-only</report>
                                    </reports>
                                </reportSet>
                            </reportSets>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>cobertura-maven-plugin</artifactId>
                            <version>2.6</version>
                        </plugin>
                    </reportPlugins>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>




© 2015 - 2024 Weber Informatics LLC | Privacy Policy