relaxing web service access restrictions
[cdmlib.git] / cdmlib-remote-webapp / pom.xml
old mode 100644 (file)
new mode 100755 (executable)
index e21015b..79baa7c
@@ -4,7 +4,7 @@
   <parent>
     <artifactId>cdmlib-parent</artifactId>
     <groupId>eu.etaxonomy</groupId>
-    <version>3.8.0</version>
+    <version>4.4.0-SNAPSHOT</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
             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>
-        </exclusion>
-        <exclusion>
-          <artifactId>mysql-connector-java</artifactId>
-          <groupId>mysql</groupId>
-        </exclusion>
-        <exclusion>
-          <artifactId>c3p0</artifactId>
-          <groupId>com.mchange</groupId>
-        </exclusion>
-        <exclusion>
-            <groupId>oracle</groupId>
-            <artifactId>ojdbc14</artifactId>
-        </exclusion>
-        <exclusion>
-            <groupId>net.sourceforge.jtds</groupId>
-            <artifactId>jtds</artifactId>         
+            <groupId>eu.etaxonomy</groupId>
+            <artifactId>cdmlib-db</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>
       <artifactId>hibernate-c3p0</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-        <artifactId>c3p0</artifactId>
-        <groupId>com.mchange</groupId>
+<!--     <dependency> -->
+<!--         <groupId>com.mchange</groupId> -->
+<!--         <artifactId>c3p0</artifactId> -->
+<!--         <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>