blob: 052d6fb1c2ac4fe84c962ddcd290b9af865ed29c [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<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>org.apache.incubator</groupId>
<artifactId>jspwiki</artifactId>
<version>2.9.1-SNAPSHOT</version>
<name>Apache JSPWiki (Incubating)</name>
<description>Incubating Apache JSPWiki is a leading open source WikiWiki engine, feature-rich
and built around standard J2EE components (Java, servlets, JSP).</description>
<url>http://incubator.apache.org/jspwiki/</url>
<packaging>war</packaging>
<prerequisites>
<maven>3.0</maven>
</prerequisites>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jspwiki.jdk.version>1.6</jspwiki.jdk.version>
</properties>
<dependencies>
<dependency>
<groupId>xmlrpc</groupId>
<artifactId>xmlrpc</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
<version>3.6.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>net.sourceforge</groupId>
<artifactId>sandler</artifactId>
<version>0.5</version>
</dependency>
<dependency>
<groupId>opensymphony</groupId>
<artifactId>oscache</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>oro</groupId>
<artifactId>oro</artifactId>
<version>2.0.7</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.metaparadigm</groupId>
<artifactId>json-rpc</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.jvnet.hudson</groupId>
<artifactId>org.suigeneris.jrcs.diff</artifactId>
<version>0.4.2</version>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>org.freshcookies</groupId>
<artifactId>freshcookies-security</artifactId>
<version>0.60</version>
</dependency>
<dependency>
<groupId>ecs</groupId>
<artifactId>ecs</artifactId>
<version>1.4.2</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>net.sourceforge</groupId>
<artifactId>akismet-java</artifactId>
<version>1.02</version>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>nekohtml</groupId>
<artifactId>nekohtml</artifactId>
<version>0.9.4</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>jaxen</groupId>
<artifactId>jaxen</artifactId>
<version>1.1-beta-6</version>
<exclusions>
<exclusion>
<groupId>*</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.sourceforge.stripes</groupId>
<artifactId>stripes</artifactId>
<version>1.5.7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>tomcat</groupId>
<artifactId>jasper-runtime</artifactId>
<version>5.5.23</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
<version>7.6.7.v20120910</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.25.0</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>JSPWiki</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
<resource>
<directory>etc/i18n</directory>
<includes>
<include>**/*</include>
</includes>
</resource>
</resources>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<directory>tests/etc</directory>
<includes>
<!--include>selenium/*</include-->
<include>jspwiki.policy</include>
<include>jspwiki-testUserPolicy.policy</include>
<include>test.properties</include>
<include>log4j.properties</include>
<include>TextFormattingRules.txt</include>
<include>TestPlugins.txt</include>
</includes>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>${jspwiki.jdk.version}</source>
<target>${jspwiki.jdk.version}</target>
</configuration>
</plugin>
<!-- With below plugin can deploy to an embedded Tomcat instance via:
mvn clean install tomcat7:run-war [-Dmaven.test.skip]
...or standalone by adding a <server/> entry "myTomcat":
http://www.jroller.com/gmazza/entry/web_service_tutorial#maventomcat
and running tomcat7:redeploy instead of run-war in
string above.
Either way, JSPWiki URL will be
http://localhost:8080/JSPWiki
-->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
<configuration>
<server>myTomcat</server>
<url>http://localhost:8080/manager/text</url>
<path>/${project.build.finalName}</path>
</configuration>
</plugin>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>generate-resources</phase>
<configuration>
<target>
<copy file="tests/etc/userdatabase.xml.tmpl" toFile="tests/etc/userdatabase.xml"/>
<copy file="tests/etc/groupdatabase.xml.tmpl" toFile="tests/etc/groupdatabase.xml"/>
<copy file="etc/jspwiki.properties.tmpl" tofile="etc/jspwiki.properties" />
<copy file="tests/etc/jspwiki.properties.tmpl" tofile="target/test-classes/jspwiki.properties" />
<copy file="tests/etc/jspwiki_rcs.properties.tmpl" tofile="target/test-classes/jspwiki_rcs.properties" />
<copy file="tests/etc/jspwiki_vers.properties.tmpl" tofile="target/test-classes/jspwiki_vers.properties" />
<!-- Filter the properties files -->
<replace file="etc/jspwiki.properties"
replacefilterfile="build.properties" />
<replace file="target/test-classes/jspwiki.properties"
replacefilterfile="build.properties" />
<replace file="target/test-classes/jspwiki_rcs.properties"
replacefilterfile="build.properties" />
<replace file="target/test-classes/jspwiki_vers.properties"
replacefilterfile="build.properties" />
<!-- Create web.xml files for testing -->
<copy file="${basedir}/etc/web.xml" tofile="target/test-classes/WEB-INF/web.xml" />
<!-- For web unit tests, turn off SSL (self-signed certs b0rk
the tests) and enable JDBC refs -->
<replace file="target/test-classes/WEB-INF/web.xml"
token="CONFIDENTIAL" value="NONE" />
<replace file="target/test-classes/WEB-INF/web.xml"
token="&lt;!-- REMOVE ME TO ENABLE JDBC DATABASE" value="" />
<replace file="target/test-classes/WEB-INF/web.xml"
token="REMOVE ME TO ENABLE JDBC DATABASE --&gt;" value="" />
<!-- For unit testing, turn on container auth -->
<replace file="target/test-classes/WEB-INF/web.xml"
token="&lt;!-- REMOVE ME TO ENABLE CONTAINER-MANAGED AUTH" value="" />
<replace file="target/test-classes/WEB-INF/web.xml"
token="REMOVE ME TO ENABLE CONTAINER-MANAGED AUTH --&gt;" value="" />
<!-- Copy the DTDs to the test WEB-INF -->
<mkdir dir="target/test-classes/WEB-INF/dtd" />
<copy toDir="target/test-classes/WEB-INF/dtd">
<fileset dir="${basedir}/etc/dtd/" />
</copy>
<!-- Copy the database configuration information -->
<mkdir dir="tests/etc/db/hsql" />
<copy file="tests/etc/jdbc.properties.tmpl" tofile="tests/etc/db/jdbc.properties" />
<!-- Bulk-copy the table setup/teardown scripts -->
<copy toDir="tests/etc/db/hsql" overwrite="true">
<fileset dir="etc/db/hsql" />
<filterset>
<filtersfile file="target/test-classes/jspwiki.properties" />
<filtersfile file="build.properties" />
</filterset>
</copy>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Surefire plugin (running unit tests):
http://maven.apache.org/surefire/maven-surefire-plugin/
Individual tests can be run command line via:
mvn clean test -Dtest=WikiEngineTest,AclImplTest,...
All tests can be skipped via -Dmaven.test.skip
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<configuration>
<excludes>
<!-- time-consuming tests excluded by default -->
<exclude>**/StressTestVersioningProvider.java</exclude>
<exclude>**/StressTestSpeed.java</exclude>
<!--exclude>**/*Test.java</exclude-->
</excludes>
<includes>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
<!-- Compress certain CSS and JS files using the YUICompressor
TODO: See if all JS files can be compressed to simplify
configuration (currently just using hardcoded subset in
Ant file.)
-->
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<version>1.3.2</version>
<executions>
<execution>
<id>compressJSfiles</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<nosuffix>true</nosuffix>
<warSourceDirectory>${basedir}/src/webdocs</warSourceDirectory>
<webappDirectory>${project.build.directory}/generated-sources/yuicompress</webappDirectory>
<!-- Lots of warnings (300+) as YUICompressor is unhappy with our JS files -->
<!--jswarn>false</jswarn-->
<includes>
<include>scripts/jspwiki-common.js</include>
<include>scripts/jspwiki-edit.js</include>
<include>scripts/jspwiki-prefs.js</include>
<include>scripts/jspwiki-commonstyles.js</include>
<include>scripts/prettify.js</include>
</includes>
</configuration>
</execution>
<execution>
<!-- Separate execution for CSS files due to its different line-break setting
(https://github.com/yui/yuicompressor/blob/master/README.md) as configured
in Ant.
TODO: See if can compress all CSS files (using Ant subset)
TODO: See if can have same line-break setting for JS and CSS to simplify
configuration
-->
<id>compressCSSfiles</id>
<goals>
<goal>compress</goal>
</goals>
<configuration>
<nosuffix>true</nosuffix>
<warSourceDirectory>${basedir}/src/webdocs</warSourceDirectory>
<webappDirectory>${project.build.directory}/generated-sources/yuicompress</webappDirectory>
<linebreakpos>0</linebreakpos>
<includes>
<include>templates/default/jspwiki.css</include>
<include>templates/default/jspwiki_print.css</include>
<include>templates/default/skins/OrderedList/skin.css</include>
<include>templates/default/skins/PlainVanilla/skin.css</include>
<include>templates/default/skins/PlainVanilla 1024x768/skin.css</include>
<include>templates/default/skins/Smart/skin.css</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webXml>etc/web.xml</webXml>
<archiveClasses>true</archiveClasses>
<webResources>
<resource>
<directory>etc</directory>
<targetPath>WEB-INF</targetPath>
<includes>
<include>userdatabase.xml</include>
<include>dtd/**</include>
<include>groupdatabase.xml</include>
<include>geronimo-web.xml</include>
<include>jspwiki.policy</include>
<include>*.tld</include>
<include>jspwiki.properties</include>
</includes>
</resource>
<resource>
<directory>etc</directory>
<targetPath>WEB-INF/classes</targetPath>
<includes>
<include>oscache.properties</include>
</includes>
</resource>
<resource>
<directory>src/webdocs</directory>
<includes>
<include>admin/**</include>
<include>error/**</include>
<include>images/**</include>
<include>scripts/**</include>
<include>templates/**</include>
<include>*.jsp</include>
<include>*.css</include>
</includes>
<!-- Below excluded because YUICompressor's version of
the files will be used. -->
<excludes>
<exclude>scripts/jspwiki-common.js</exclude>
<exclude>scripts/jspwiki-edit.js</exclude>
<exclude>scripts/jspwiki-prefs.js</exclude>
<exclude>scripts/jspwiki-commonstyles.js</exclude>
<exclude>scripts/prettify.js</exclude>
<exclude>templates/default/jspwiki.css</exclude>
<exclude>templates/default/jspwiki_print.css</exclude>
<exclude>templates/default/skins/OrderedList/skin.css</exclude>
<exclude>templates/default/skins/PlainVanilla/skin.css</exclude>
<exclude>templates/default/skins/PlainVanilla 1024x768/skin.css</exclude>
<exclude>templates/default/skins/Smart/skin.css</exclude>
</excludes>
</resource>
<!-- Output directory configured above with the YUICompressor Maven plugin -->
<resource>
<directory>${project.build.directory}/generated-sources/yuicompress</directory>
</resource>
</webResources>
</configuration>
</plugin>
<!-- Below plugin for Selenium tests (mvn integration-test, not yet working) -->
<!--plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.0.0.M3</version>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<contextPath>/</contextPath>
<scanIntervalSeconds>10</scanIntervalSeconds>
<stopKey>STOP</stopKey>
<stopPort>8005</stopPort>
<port>8080</port>
</configuration>
<executions>
<execution>
<id>start-jetty</id>
<phase>pre-integration-test</phase>
<goals>
<goal>stop</goal>
<goal>run-exploded</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>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>2.3</version>
<configuration>
<browser>*firefox</browser>
<suite>tests/build/webtests/test-custom/selenium/TestSuite.html</suite>
<startURL>http://localhost:8080/JSPWiki</startURL>
</configuration>
<executions>
<execution>
<id>Run-Selenese-Scripts</id>
<phase>integration-test</phase>
<goals>
<goal>selenese</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.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<versionRange>[1.7,)</versionRange>
<goals><goal>run</goal></goals>
</pluginExecutionFilter>
<action><ignore></ignore></action>
</pluginExecution>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.alchim31.maven</groupId>
<artifactId>yuicompressor-maven-plugin</artifactId>
<versionRange>[1.3.2,)</versionRange>
<goals><goal>compress</goal></goals>
</pluginExecutionFilter>
<action><ignore></ignore></action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>