<parent>
<artifactId>cdmlib-parent</artifactId>
<groupId>eu.etaxonomy</groupId>
- <version>3.7.0-SNAPSHOT</version>
+ <version>4.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<groupId>eu.etaxonomy</groupId>
- <artifactId>cdmlib-remote-webapp</artifactId>
- <version>3.8-SNAPSHOT</version>
+ <artifactId>cdmlib-remote-webapp</artifactId>
<name>CDM Remote Webapp</name>
<packaging>war</packaging>
and http://stackoverflow.com/questions/6981564/why-must-the-jdbc-driver-be-put-in-tomcat-home-lib-folder
-->
<exclusion>
- <artifactId>postgresql</artifactId>
- <groupId>postgresql</groupId>
+ <groupId>net.sourceforge.jtds</groupId>
+ <artifactId>jtds</artifactId>
</exclusion>
<exclusion>
- <artifactId>mysql-connector-java</artifactId>
<groupId>mysql</groupId>
+ <artifactId>mysql-connector-java</artifactId>
</exclusion>
<exclusion>
- <artifactId>c3p0</artifactId>
- <groupId>com.mchange</groupId>
+ <groupId>org.postgresql</groupId>
+ <artifactId>postgresql</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>jdbc4</artifactId>
</exclusion>
<exclusion>
<groupId>oracle</groupId>
<artifactId>ojdbc14</artifactId>
</exclusion>
<exclusion>
- <groupId>net.sourceforge.jtds</groupId>
- <artifactId>jtds</artifactId>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>com.mchange</groupId>
+ <artifactId>c3p0</artifactId>
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>eu.etaxonomy</groupId>
+ <artifactId>cdmlib-test</artifactId>
+ <scope>test</scope>
+ </dependency>
<dependency>
<!-- TODO this is also offered by cdmlib-remote, can it be removed?
What does provided mean? -->
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
</dependency>
-
- <dependency>
- <groupId>commons-io</groupId>
- <artifactId>commons-io</artifactId>
- </dependency>
<!-- JsonView -->
- <dependency>
- <!-- TODO can this be removed, it already exists in cdmlib-remote -->
- <groupId>net.sf.json-lib</groupId>
- <artifactId>json-lib</artifactId>
- <classifier>jdk15</classifier>
- </dependency>
-
- <!-- Profiling -->
+ <!--
+ -->
<dependency>
<groupId>org.springframework</groupId>
- <artifactId>org.springframework.oxm</artifactId>
- <version>${spring.version}</version>
+ <artifactId>spring-oxm</artifactId>
</dependency>
- <!-- XmlView -->
+ <!-- XmlView
+ -->
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
</dependency>
<!-- swagger -->
<dependency>
- <groupId>com.mangofactory</groupId>
- <artifactId>swagger-springmvc</artifactId>
- <version>0.8.5</version>
+ <groupId>io.springfox</groupId>
+ <artifactId>springfox-swagger2</artifactId>
+ <scope>test</scope>
</dependency>
- <!-- dependencies for swagger-springmvc, added explicitely -->
+ <!--
+ dependencies for springfox-swagger2, added explicitly to pin the version
+ these dependencies are also required by the cdmlib!
+ -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<!-- END of dependencies for swagger-springmvc, added explicitely -->
+
<!-- testing -->
- <dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>com.yourkit</groupId>
- <artifactId>yjp-controller-api-redist</artifactId>
- <scope>test</scope>
- </dependency>
+
<!-- Connection Pooling and jdbc -->
<dependency>
<groupId>org.hibernate</groupId>
<dependency>
<artifactId>c3p0</artifactId>
<groupId>com.mchange</groupId>
+ <scope>test</scope>
+ </dependency>
+ <!-- Profiling -->
+ <dependency>
+ <groupId>com.yourkit</groupId>
+ <artifactId>yjp-controller-api-redist</artifactId>
+ <scope>test</scope>
</dependency>
</dependencies>
<build>
<resources>
- <!-- ${basedir}/src/test/resources -->
<resource>
<!-- replace the place holders like ${...} in datasources.xml -->
- <targetPath>${project.build.directory}/test-classes</targetPath>
<filtering>true</filtering>
- <directory>${basedir}/src/test/resources</directory>
+ <directory>src/test/resources</directory>
+ <targetPath>../test-classes</targetPath>
<includes>
<include>datasources.xml</include>
</includes>
</resource>
<resource>
<!-- all other test resources without filtering -->
- <targetPath>${project.build.directory}/test-classes</targetPath>
- <directory>${basedir}/src/test/resources</directory>
+ <directory>src/test/resources</directory>
+ <targetPath>../test-classes</targetPath>
<excludes>
<exclude>datasources.xml</exclude>
</excludes>
</resource>
<resource>
<!-- all main resources without filtering -->
- <targetPath>${project.build.directory}/classes</targetPath>
- <directory>${basedir}/src/main/resources</directory>
+ <directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <version>9.1.3.v20140225</version>
+ <version>9.1.3.v20140225</version><!-- do not update, since later versions are no longer compatible to java 7 -->
<configuration>
<stopKey>stop</stopKey>
<stopPort>9199</stopPort>
<scanIntervalSeconds>10</scanIntervalSeconds>
+ <useTestScope>true</useTestScope>
<jettyXml>${basedir}/src/test/resources/etc/jetty/jetty.xml,${basedir}/src/test/resources/etc/jetty/jetty-http.xml</jettyXml>
<!-- <jettyXml>./src/test/resources/etc/jetty/jetty.xml,./src/test/resources/etc/jetty/jetty-http.xml,./src/test/resources/etc/jetty/jetty-ssl.xml,./src/test/resources/etc/jetty/jetty-https.xml</jettyXml> -->
<systemProperties>
+ <force>true</force>
<systemProperty>
<name>cdm.datasource</name>
<value>h2_cdmTest</value>
</systemProperty>
+ <systemProperty>
+ <!--
+ The lucene index should be placed into the target folder,
+ so user.home needs to be set to this folder.
+ user.home needs to be overriden since it already
+ exists, thus the force option is turned on above
+ -->
+ <name>user.home</name>
+ <value>${basedir}/target/</value>
+ </systemProperty>
<systemProperty>
<!-- datasources.xml is prepared by <plugins><resources>..</resources>
above -->
<name>cdm.beanDefinitionFile</name>
<value>${project.build.directory}/test-classes/datasources.xml</value>
</systemProperty>
+ <systemProperty>
+ <!--
+ start with swagger profile so that the swagger doc
+ can be generated
+ -->
+ <name>spring.profiles.active</name>
+ <value>swagger</value>
+ </systemProperty>
</systemProperties>
</configuration>
<executions>
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.6</version>
+ <executions>
+ <execution>
+ <!--
+ The war must be created after running the integration-tests,
+ since the SwaggerGroupsIT test populates the classes/api-docs-static/
+ folder with static swagger doc files. The are otherwise not packed
+ into the wae file.
+ -->
+ <phase>verify</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <escapeWindowsPaths>false</escapeWindowsPaths>
+ </configuration>
+ </plugin>
+
</plugins>
</build>
</project>