updating poms for branch'hotfix/4.5.1' with non-snapshot versions
[cdmlib.git] / cdmlib-remote-webapp / pom.xml
old mode 100644 (file)
new mode 100755 (executable)
index a156a19..244b80d
@@ -4,7 +4,7 @@
   <parent>
     <artifactId>cdmlib-parent</artifactId>
     <groupId>eu.etaxonomy</groupId>
-    <version>3.13.0-SNAPSHOT</version>
+    <version>4.5.1</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>
@@ -94,6 +78,7 @@
     <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?
     <dependency>
       <groupId>io.springfox</groupId>
       <artifactId>springfox-swagger2</artifactId>
+      <scope>test</scope>
     </dependency>
-    <!-- dependencies for swagger-springmvc, added explicitly -->
+    <!-- 
+        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>hibernate-c3p0</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-        <artifactId>c3p0</artifactId>
-        <groupId>com.mchange</groupId>
-    </dependency>
+<!--     <dependency> -->
+<!--         <groupId>com.mchange</groupId> -->
+<!--         <artifactId>c3p0</artifactId> -->
+<!--         <scope>test</scope> -->
+<!--     </dependency> -->
       <!-- Profiling -->
       <dependency>
       <groupId>com.yourkit</groupId>
 
   <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>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>classes</targetPath>
-        <directory>${basedir}/src/test/resources</directory>
+        <directory>src/main/resources</directory>
       </resource>
     </resources>
     <plugins>
           </execution>
         </executions>
       </plugin>
-      
       <plugin>
         <groupId>org.eclipse.jetty</groupId>
         <artifactId>jetty-maven-plugin</artifactId>
-        <version>9.1.3.v20140225</version><!-- do not update, since later versions are no longer compatible to java 7  -->
-        <dependencies>
-        </dependencies>
+        <version>9.1.3.v20140225</version>
+        <!--  
+            NOTE:
+            9.4.0.RC1 requires jdk 1.8, formerly we've been using version 9.1.3.v20140225 which was 
+            the last version compatible to java 7, but this was causing other problems related to asm
+            which could not be easily solved.
+        -->
         <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>
               <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 war 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>