Fix service handling and refresh problem for distribution table
[cdm-vaadin.git] / pom.xml
diff --git a/pom.xml b/pom.xml
index cc6a9186ba27ff9f3f8072427ebfbcdd0b1799a9..42e152ba496905b1211cb9e536a333f45dcdf6b2 100755 (executable)
--- a/pom.xml
+++ b/pom.xml
@@ -4,15 +4,21 @@
   <groupId>eu.etaxonomy</groupId>
   <artifactId>cdm-vaadin</artifactId>
   <packaging>war</packaging>
-  <version>4.0.0</version>
+  <version>4.8.0-SNAPSHOT</version>
   <name>Vaadin Web Application</name>
   <properties>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-    <vaadin.version>7.6.3</vaadin.version>
+    <vaadin.version>7.7.7</vaadin.version>
+    <vaadin-spring.version>1.2.0</vaadin-spring.version>
     <vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
-    <cdmlib.version>4.0.0-SNAPSHOT</cdmlib.version>
+    <cdmlib.version>4.8.0-SNAPSHOT</cdmlib.version>
     <unitils.version>3.4.2</unitils.version>
-    <spring.version>4.2.4.RELEASE</spring.version>
+    <!-- 
+        lucene.version must match the version as defined in cdmlib
+    -->
+    <lucene.version>5.4.1</lucene.version>
+    <maven.compiler.source>1.8</maven.compiler.source>
+    <maven.compiler.target>1.8</maven.compiler.target>
   </properties>
   <prerequisites>
     <maven>3.0.5</maven>
@@ -21,7 +27,7 @@
     <!-- the cdm internal repository -->
     <repository>
       <id>EditRepository</id>
-      <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
+      <url>http://cybertaxonomy.eu/mavenrepo/</url>
     </repository>
     <!-- current spring source repositories -->
     <repository>
       </snapshots>
     </pluginRepository>
   </pluginRepositories>
+  <dependencyManagement>
+    <dependencies>
+      <dependency>
+        <groupId>com.vaadin</groupId>
+        <artifactId>vaadin-bom</artifactId>
+        <version>${vaadin.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <groupId>eu.etaxonomy</groupId>
+        <artifactId>cdmlib-parent</artifactId>
+        <version>${cdmlib.version}</version>
+        <type>pom</type>
+        <scope>import</scope>
+      </dependency>
+      <dependency>
+        <!-- Try updating in cdmlib to 20090211 -->
+        <groupId>org.json</groupId>
+        <artifactId>json</artifactId>
+        <version>20151123</version>
+      </dependency>
+    </dependencies>
+  </dependencyManagement>
   <distributionManagement>
     <repository>
       <uniqueVersion>false</uniqueVersion>
             </executions>
             <configuration>
               <file>pom.xml</file>
-              <!-- \u003C = < , \u003E = >  -->
+              <!-- \u003C = < , \u003E = > -->
               <token>(\u003Ccdmlib\.version\u003E)[^\u003C]*</token>
               <value>$1${project.version}</value>
             </configuration>
         </plugins>
       </build>
     </profile>
+    <profile>
+      <id>java8-doclint-disabled</id>
+      <activation>
+        <jdk>[1.8,)</jdk>
+      </activation>
+      <properties>
+        <javadoc.opts>-Xdoclint:none</javadoc.opts>
+      </properties>
+    </profile>
   </profiles>
   <build>
+    <resources>
+      <resource>
+        <!-- replace the place holders like ${...} in datasources.xml -->
+        <filtering>true</filtering>
+        <directory>src/test/resources</directory>
+        <targetPath>../test-classes</targetPath>
+        <includes>
+          <include>datasources.xml</include>
+        </includes>
+      </resource>
+      <resource>
+        <!-- all other test resources without filtering -->
+        <directory>src/test/resources</directory>
+        <targetPath>../test-classes</targetPath>
+        <excludes>
+          <exclude>datasources.xml</exclude>
+        </excludes>
+      </resource>
+      <resource>
+        <!-- all main resources without filtering -->
+        <directory>src/main/resources</directory>
+      </resource>
+    </resources>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <version>3.3</version>
         <configuration>
-          <source>1.7</source>
-          <target>1.7</target>
+          <source>${maven.compiler.source}</source>
+          <target>${maven.compiler.target}</target>
           <encoding>UTF-8</encoding>
         </configuration>
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.19.1</version>
         <configuration>
           <argLine>-Xms256m -Xmx512m</argLine>
         </configuration>
           </filesets>
         </configuration>
       </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.9.1</version>
+        <configuration>
+          <additionalparam>${javadoc.opts}</additionalparam>
+        </configuration>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-war-plugin</artifactId>
         <version>${vaadin.plugin.version}</version>
         <configuration>
           <extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
-          <!-- <runTarget>mobilemail</runTarget> -->
           <!-- We are doing "inplace" but into subdir VAADIN/widgetsets. 
             This way compatible with Vaadin eclipse plugin. -->
-          <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets
-          </webappDirectory>
-          <hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets
-          </hostedWebapp>
+          <webappDirectory>${basedir}/src/main/webapp/VAADIN/widgetsets</webappDirectory>
+          <hostedWebapp>${basedir}/src/main/webapp/VAADIN/widgetsets</hostedWebapp>
           <!-- Most Vaadin apps don't need this stuff, guide that to target -->
           <persistentunitcachedir>${project.build.directory}</persistentunitcachedir>
           <deploy>${project.build.directory}/gwt-deploy</deploy>
           </execution>
         </executions>
       </plugin>
-      <!-- <plugin> -->
-      <!-- <groupId>org.eclipse.jetty</groupId> -->
-      <!-- <artifactId>jetty-maven-plugin</artifactId> -->
-      <!-- <version>9.2.3.v20140905</version> -->
-      <!-- <configuration> -->
-      <!-- <scanIntervalSeconds>10</scanIntervalSeconds> -->
-      <!-- <stopPort>8005</stopPort> -->
-      <!-- <stopKey>STOP</stopKey> -->
-      <!-- <useProvidedScope>true</useProvidedScope> -->
-      <!-- <webApp> -->
-      <!-- <descriptor>${project.basedir}/src/main/webapp/WEB-INF/web.xml</descriptor> -->
-      <!-- </webApp> -->
-      <!-- </configuration> -->
-      <!-- <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> -->
-      <!-- </plugin> -->
+      <plugin>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-maven-plugin</artifactId>
+        <version>9.4.0.RC1</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>
+          <useTestScope>true</useTestScope>
+          <scanIntervalSeconds>2</scanIntervalSeconds>
+          <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 overridden 
+                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>
+              <name>log4j.configuration</name>
+              <value>file:///home/andreas/.cdmLibrary/log4j.properties</value>
+            </systemProperty>
+          </systemProperties>
+        </configuration>
+        <dependencies>
+          <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-log4j12</artifactId>
+            <version>1.6.4</version>
+          </dependency>
+        </dependencies>
+      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
           <allowUntracked>true</allowUntracked>
         </configuration>
         <dependencies>
-          <!-- 
-                upgrading dependency jsch.agent.version of jgit-flow plugin to 0.1.53 
-                in order have ssl key exchange algorithms compatible with openssh 6.7 
-             -->
+          <!-- upgrading dependency jsch.agent.version of jgit-flow plugin 
+            to 0.1.53 in order have ssl key exchange algorithms compatible with openssh 
+            6.7 -->
           <dependency>
             <groupId>com.jcraft</groupId>
             <artifactId>jsch</artifactId>
     </pluginManagement>
   </build>
   <dependencies>
+    <!-- ============ Vaadin ============ -->
+    <dependency>
+      <groupId>com.vaadin</groupId>
+      <artifactId>vaadin-spring</artifactId>
+      <version>${vaadin-spring.version}</version>
+    </dependency>
     <dependency>
       <groupId>com.vaadin</groupId>
       <artifactId>vaadin-server</artifactId>
-      <version>${vaadin.version}</version>
     </dependency>
     <dependency>
       <groupId>com.vaadin</groupId>
       <artifactId>vaadin-client-compiled</artifactId>
-      <version>${vaadin.version}</version>
     </dependency>
     <!-- Needed when using the widgetset optimizer (custom ConnectorBundleLoaderFactory). 
       For widgetset compilation, vaadin-client-compiler is automatically added 
     <dependency>
       <groupId>com.vaadin</groupId>
       <artifactId>vaadin-client</artifactId>
-      <version>${vaadin.version}</version>
-      <scope>provided</scope>
+      <scope>test</scope>
     </dependency>
     <!-- disabling push for the moment because it does not work with run-jetty-run 
       due to the fact that the latest (even nightly) version of run-jetty-run uses 
     <dependency>
       <groupId>com.vaadin</groupId>
       <artifactId>vaadin-themes</artifactId>
-      <version>${vaadin.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>javax.servlet-api</artifactId>
-      <version>3.1.0</version>
-      <scope>provided</scope>
     </dependency>
     <dependency>
       <groupId>com.vaadin</groupId>
       <version>RELEASE</version>
       <scope>test</scope>
     </dependency>
+    <!-- vaadin addons / extensions -->
+    <dependency>
+      <groupId>org.vaadin.addons</groupId>
+      <artifactId>contextmenu</artifactId>
+      <version>4.5</version>
+    </dependency>
+    <!--     <dependency>
+        only in the edit repo
+      <groupId>org.vaadin.addons</groupId>
+      <artifactId>lazyloadwrapper</artifactId>
+      <version>0.1-alpha</version>
+    </dependency> -->
+    <!-- ============ cdmlib ============ -->
     <dependency>
       <groupId>eu.etaxonomy</groupId>
-      <artifactId>cdmlib-services</artifactId>
-      <version>${cdmlib.version}</version>
-    
-    
-<!--       <scope>provided</scope> -->
+      <artifactId>cdmlib-remote</artifactId>
+      <scope>compile</scope>
     </dependency>
     <dependency>
       <groupId>eu.etaxonomy</groupId>
       <artifactId>cdmlib-test</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>eu.etaxonomy</groupId>
+      <artifactId>cdmlib-db</artifactId>
       <version>${cdmlib.version}</version>
       <scope>test</scope>
     </dependency>
-    <!-- to override version number coming with vaadin client -->
+    <!-- ============ Other ============ -->
+    <!-- 
+        to override version number coming with vaadin client 
+        version is managed in cdmlib-parent
+    -->
     <dependency>
       <groupId>javax.validation</groupId>
       <artifactId>validation-api</artifactId>
-      <version>1.1.0.Final</version>
     </dependency>
     <dependency>
       <groupId>org.springmodules</groupId>
           <artifactId>spring-mock</artifactId>
         </exclusion>
       </exclusions>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>com.thoughtworks.xstream</groupId>
-      <artifactId>xstream</artifactId>
-      <version>1.4.7</version>
-      <scope>provided</scope>
+      <scope>test</scope>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>
       <artifactId>spring-mock</artifactId>
       <version>2.0.8</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context-support</artifactId>
-      <version>${spring.version}</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-web</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-webmvc</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-    <!-- vaadin addons / extensions -->
-    <dependency>
-      <groupId>org.vaadin.addons</groupId>
-      <artifactId>contextmenu</artifactId>
-      <version>4.5</version>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.11</version>
       <scope>test</scope>
     </dependency>
-    <!-- unitils dependencies - start -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-core</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-database</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--       <exclusions> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-jdbc</artifactId> -->
-<!--         </exclusion> -->
-<!--       </exclusions> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-dbmaintainer</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--       <exclusions> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.hibernate</groupId> -->
-<!--           <artifactId>hibernate</artifactId> -->
-<!--         </exclusion> -->
-<!--       </exclusions> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-dbunit</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--       <exclusions> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-core</artifactId> -->
-<!--         </exclusion> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-jdbc</artifactId> -->
-<!--         </exclusion> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-beans</artifactId> -->
-<!--         </exclusion> -->
-<!--       </exclusions> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-easymock</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-mock</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-inject</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-orm</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--        <scope>test</scope> -->
-<!--       <exclusions> -->
-<!--      <exclusion> -->
-<!--        <artifactId>*</artifactId> -->
-<!--        <groupId>org.springframework</groupId> -->
-<!--      </exclusion> -->
-<!--      <exclusion> -->
-<!--        <artifactId>persistence-api</artifactId> -->
-<!--        <groupId>javax.persistence</groupId> -->
-<!--      </exclusion> -->
-<!--      <exclusion> -->
-<!--        <artifactId>hibernate</artifactId> -->
-<!--        <groupId>org.hibernate</groupId> -->
-<!--      </exclusion> -->
-<!--    </exclusions> -->
-<!--     </dependency>  -->
-<!--     <dependency> -->
-<!--       <groupId>org.unitils</groupId> -->
-<!--       <artifactId>unitils-spring</artifactId> -->
-<!--       <version>${unitils.version}</version> -->
-<!--       <scope>test</scope> -->
-<!--       <exclusions> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-core</artifactId> -->
-<!--         </exclusion> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-context</artifactId> -->
-<!--         </exclusion> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-beans</artifactId> -->
-<!--         </exclusion> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-test</artifactId> -->
-<!--         </exclusion> -->
-<!--         <exclusion> -->
-<!--           <groupId>org.springframework</groupId> -->
-<!--           <artifactId>spring-tx</artifactId> -->
-<!--         </exclusion> -->
-<!--       </exclusions> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.easymock</groupId> -->
-<!--       <artifactId>easymock</artifactId> -->
-<!--       <version>3.1</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>xmlunit</groupId> -->
-<!--       <artifactId>xmlunit</artifactId> -->
-<!--       <version>1.4</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>org.dbunit</groupId> -->
-<!--       <artifactId>dbunit</artifactId> -->
-<!--       <version>2.4.9</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-<!--     <dependency> -->
-<!--       <groupId>commons-dbcp</groupId> -->
-<!--       <artifactId>commons-dbcp</artifactId> -->
-<!--       <version>1.4</version> -->
-<!--       <scope>test</scope> -->
-<!--     </dependency> -->
-    <!-- unitils dependencies - end -->
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-log4j12</artifactId>
-      <version>1.7.2</version>
-      <scope>provided</scope>
+      <groupId>org.json</groupId>
+      <artifactId>json</artifactId>
     </dependency>
     <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>1.7.2</version>
+      <groupId>javax.servlet</groupId>
+      <artifactId>javax.servlet-api</artifactId>
       <scope>provided</scope>
     </dependency>
-    <dependency>
-      <groupId>org.json</groupId>
-      <artifactId>json</artifactId>
-      <version>20151123</version>
-    </dependency>
   </dependencies>
 </project>