moved all jetty + cdmlib related stuff (except web.xml) to test
authorCherian Mathew <c.mathew@bgbm.org>
Mon, 15 Dec 2014 13:18:59 +0000 (13:18 +0000)
committerCherian Mathew <c.mathew@bgbm.org>
Mon, 15 Dec 2014 13:18:59 +0000 (13:18 +0000)
15 files changed:
.gitattributes
ide/eclipse/cdm-vaadin.launch
pom.xml
src/main/java/eu/etaxonomy/MyVaadinUI.java
src/main/java/eu/etaxonomy/cdm/vaadin/presenter/AuthenticationPresenter.java
src/main/webapp/WEB-INF/web.xml
src/test/java/eu/etaxonomy/cdm/remote/config/AbstractWebApplicationConfigurer.java [moved from src/main/java/eu/etaxonomy/cdm/remote/config/AbstractWebApplicationConfigurer.java with 100% similarity]
src/test/java/eu/etaxonomy/cdm/remote/config/DataSourceConfigurer.java [moved from src/main/java/eu/etaxonomy/cdm/remote/config/DataSourceConfigurer.java with 100% similarity]
src/test/java/eu/etaxonomy/cdm/remote/config/DataSourceProperties.java [moved from src/main/java/eu/etaxonomy/cdm/remote/config/DataSourceProperties.java with 100% similarity]
src/test/java/eu/etaxonomy/cdm/remote/config/LoggingConfigurer.java [moved from src/main/java/eu/etaxonomy/cdm/remote/config/LoggingConfigurer.java with 100% similarity]
src/test/java/eu/etaxonomy/cdm/vaadin/ui/NavigatorTestUI.java
src/test/resources/datasources.xml [new file with mode: 0644]
src/test/resources/etc/jetty/jetty.xml [moved from src/main/webapp/jetty.xml with 100% similarity]
src/test/resources/eu/etaxonomy/cdm/remote/ehcache.xml [moved from src/main/resources/eu/etaxonomy/cdm/remote/ehcache.xml with 100% similarity]
src/test/resources/h2/cdmTest.h2.db [new file with mode: 0644]

index e256ea3a5d34e774e9bab7afd7bc09c8d6e05ef5..1222c79182b6655fb7bc83e6963977aa2b83b11f 100644 (file)
@@ -2,10 +2,6 @@
 ide/eclipse/cdm-vaadin.launch -text
 /pom.xml -text
 src/main/java/eu/etaxonomy/MyVaadinUI.java -text
-src/main/java/eu/etaxonomy/cdm/remote/config/AbstractWebApplicationConfigurer.java -text
-src/main/java/eu/etaxonomy/cdm/remote/config/DataSourceConfigurer.java -text
-src/main/java/eu/etaxonomy/cdm/remote/config/DataSourceProperties.java -text
-src/main/java/eu/etaxonomy/cdm/remote/config/LoggingConfigurer.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/AppWidgetSet.gwt.xml -text
 src/main/java/eu/etaxonomy/cdm/vaadin/CdmAppInitializer.java.bkp -text
 src/main/java/eu/etaxonomy/cdm/vaadin/container/CdmSQLContainer.java -text
@@ -15,7 +11,6 @@ src/main/java/eu/etaxonomy/cdm/vaadin/ui/AbstractAuthenticatedUI.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/util/CdmSpringContextHelper.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/view/AuthenticationView.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/view/IAuthenticationComponent.java -text
-src/main/resources/eu/etaxonomy/cdm/remote/ehcache.xml -text
 src/main/resources/log4j.properties -text
 src/main/webapp/META-INF/MANIFEST.MF -text
 src/main/webapp/META-INF/context.xml -text
@@ -29,21 +24,28 @@ src/main/webapp/WEB-INF/applicationContext.xml -text
 src/main/webapp/WEB-INF/cdm-vaadin-servlet.xml -text
 src/main/webapp/WEB-INF/datasources/configurable.xml -text
 src/main/webapp/WEB-INF/web.xml -text
-src/main/webapp/jetty.xml -text
+src/test/java/eu/etaxonomy/cdm/remote/config/AbstractWebApplicationConfigurer.java -text
+src/test/java/eu/etaxonomy/cdm/remote/config/DataSourceConfigurer.java -text
+src/test/java/eu/etaxonomy/cdm/remote/config/DataSourceProperties.java -text
+src/test/java/eu/etaxonomy/cdm/remote/config/LoggingConfigurer.java -text
 src/test/java/eu/etaxonomy/cdm/vaadin/CdmVaadinBaseTest.java -text
 src/test/java/eu/etaxonomy/cdm/vaadin/container/CdmSQLContainerTest.java -text
 src/test/java/eu/etaxonomy/cdm/vaadin/ui/NavigatorTestUI.java -text
 src/test/java/eu/etaxonomy/cdm/vaadin/util/CdmSpringContextHelperTest.java -text
 src/test/java/eu/etaxonomy/cdm/vaadin/view/NaviTestView.java -text
+src/test/resources/datasources.xml -text
 src/test/resources/dbscripts/001-cdm.h2.sql -text
 src/test/resources/dbscripts/hibernate.properties -text
+src/test/resources/etc/jetty/jetty.xml -text
 src/test/resources/eu/etaxonomy/cdm/applicationContext-securityTest.xml -text
 src/test/resources/eu/etaxonomy/cdm/applicationContext-test.xml -text
 src/test/resources/eu/etaxonomy/cdm/applicationContextSecurity.unused.xml -text
+src/test/resources/eu/etaxonomy/cdm/remote/ehcache.xml -text
 src/test/resources/eu/etaxonomy/cdm/vaadin/PUBLIC.xsd -text
 src/test/resources/eu/etaxonomy/cdm/vaadin/container/CdmSQLContainerTest.xml -text
 src/test/resources/eu/etaxonomy/cdm/vaadin/dataset.xsd -text
 src/test/resources/eu/etaxonomy/cdm/vaadin/util/CdmSpringContextHelperTest.xml -text
+src/test/resources/h2/cdmTest.h2.db -text
 src/test/resources/log4j.properties -text
 src/test/resources/override.properties -text
 src/test/resources/unitils.properties -text
index 66442b9c8945aaa73d5dd17e77d060b60a6f1c18..764848f9d58baf819ebaf7496810319fce016786 100644 (file)
@@ -6,30 +6,22 @@
 <listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
 <listEntry value="4"/>
 </listAttribute>
-<listAttribute key="org.eclipse.debug.ui.favoriteGroups">
-<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
-<listEntry value="org.eclipse.debug.ui.launchGroup.run"/>
-</listAttribute>
 <stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="RunJettyRunWebAppClassPathProvider"/>
 <stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="runjettyrun.Bootstrap"/>
 <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="cdm-vaadin"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Xmx500M&#13;&#10;-Dlog4j.configDebug=true&#10;-Dorg.mortbay.jetty.webapp.parentLoaderPriority=true&#10;-Dspring.profiles.active=remoting"/>
 <stringAttribute key="run_jetty_run.CONTEXT_ATTR" value="/cdm-vaadin"/>
 <booleanAttribute key="run_jetty_run.ENABLE_JNDI_ATTR" value="false"/>
 <booleanAttribute key="run_jetty_run.ENABLE_NEED_CLIENT_AUTH_ATTR" value="false"/>
 <booleanAttribute key="run_jetty_run.ENABLE_PARENT_LOADER_PRIORITY_ATTR" value="true"/>
-<booleanAttribute key="run_jetty_run.ENABLE_SCANNER_ATTR" value="true"/>
+<booleanAttribute key="run_jetty_run.ENABLE_SCANNER_ATTR" value="false"/>
 <booleanAttribute key="run_jetty_run.ENABLE_SSL_ATTR" value="false"/>
 <booleanAttribute key="run_jetty_run.IGNORE_SCAN_CLASS_WHEN_DEBUG_MODE" value="true"/>
-<stringAttribute key="run_jetty_run.JETTY_XML_PATH" value="src/main/webapp/jetty.xml"/>
+<stringAttribute key="run_jetty_run.JETTY_XML_PATH" value="/home/cmathew/Development/EDIT/cdm-vaadin/src/test/resources/etc/jetty/jetty.xml"/>
 <stringAttribute key="run_jetty_run.KEYSTORE_ATTR" value="/home/cmathew/.keystore"/>
 <stringAttribute key="run_jetty_run.KEY_PWD_ATTR" value="changeit"/>
 <stringAttribute key="run_jetty_run.PORT_ATTR" value="8080"/>
 <stringAttribute key="run_jetty_run.PWD_ATTR" value="changeit"/>
-<stringAttribute key="run_jetty_run.SCANINTERVALSECONDS_ATTR" value="1"/>
-<mapAttribute key="run_jetty_run.SCAN_FOLDER_NON_CHECKED">
-<mapEntry key="/home/cmathew/Development/EDIT/cdm-vaadin/target/test-classes" value="0"/>
-</mapAttribute>
+<stringAttribute key="run_jetty_run.SCANINTERVALSECONDS_ATTR" value="5"/>
 <stringAttribute key="run_jetty_run.SELECTED_JETTY_VERSION_ATTR" value="Jetty 9.0.0.M3"/>
 <booleanAttribute key="run_jetty_run.SHOW_ADVANCE_ATTR" value="true"/>
 <stringAttribute key="run_jetty_run.SSL_PORT_ATTR" value="8443"/>
diff --git a/pom.xml b/pom.xml
index 929e26e7fd722534ef78acb6aa273fec1c18bf61..e369461dea01fe807ae46a78a761f43d5a4f4970 100644 (file)
--- a/pom.xml
+++ b/pom.xml
                <unitils.version>3.3</unitils.version>
        </properties>
        <repositories>
-        <!-- the cdm internal repository -->
-        <repository>
-            <id>EditRepository</id>
-            <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
-        </repository>
-        <!-- current spring source repositories -->
-        <repository>
-            <id>SpringSource Enterprise Bundle Repository - External Bundle Milestones</id>
-            <url>http://repository.springsource.com/maven/bundles/milestone</url>
-        </repository>
-        <repository>
-            <id>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</id>
-            <url>http://repository.springsource.com/maven/bundles/release</url>
-        </repository>
-        <repository>
-            <id>SpringSource Enterprise Bundle Repository - External Bundle Releases</id>
-            <url>http://repository.springsource.com/maven/bundles/external</url>
-        </repository>
+               <!-- the cdm internal repository -->
+               <repository>
+                       <id>EditRepository</id>
+                       <url>http://wp5.e-taxonomy.eu/mavenrepo/</url>
+               </repository>
+               <!-- current spring source repositories -->
+               <repository>
+                       <id>SpringSource Enterprise Bundle Repository - External Bundle Milestones</id>
+                       <url>http://repository.springsource.com/maven/bundles/milestone</url>
+               </repository>
+               <repository>
+                       <id>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</id>
+                       <url>http://repository.springsource.com/maven/bundles/release</url>
+               </repository>
+               <repository>
+                       <id>SpringSource Enterprise Bundle Repository - External Bundle Releases</id>
+                       <url>http://repository.springsource.com/maven/bundles/external</url>
+               </repository>
                <repository>
                        <id>vaadin-addons</id>
                        <url>http://maven.vaadin.com/vaadin-addons</url>
                </repository>
-               
+
                <repository>
                        <id>vaadin-snapshots</id>
                        <url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
                        </snapshots>
                </pluginRepository>
        </pluginRepositories>
+       <distributionManagement>
+               <repository>
+                       <uniqueVersion>false</uniqueVersion>
+                       <id>wp5.e-taxonomy.eu</id>
+                       <name>Edit Maven Repository</name>
+                       <url>scpexe://wp5.e-taxonomy.eu/var/www/wp5.e-taxonomy.eu/mavenrepo/</url>
+                       <layout>default</layout>
+               </repository>
+       </distributionManagement>
        <dependencies>
                <dependency>
                        <groupId>com.vaadin</groupId>
                                <version>2.17</version>
                                <configuration>
                                        <!-- Remove the skipTests line below to run TestBench tests -->
-<!--                                   <skipTests>true</skipTests> -->
+                                       <!-- <skipTests>true</skipTests> -->
                                </configuration>
                                <executions>
                                        <execution>
index 23483b8be1ea4f1a52ecfb2a88268116cd262e1d..351cf07d371a9f7c20d259e5c0402c62051d4c98 100644 (file)
@@ -1,9 +1,7 @@
 package eu.etaxonomy;
 
-import javax.servlet.annotation.WebInitParam;
 import javax.servlet.annotation.WebServlet;
 
-import com.vaadin.annotations.Push;
 import com.vaadin.annotations.Theme;
 import com.vaadin.annotations.VaadinServletConfiguration;
 import com.vaadin.server.VaadinRequest;
@@ -23,8 +21,8 @@ public class MyVaadinUI extends UI
 //                     @WebInitParam(name="org.atmosphere.cpr.asyncSupport", value="org.atmosphere.container.Jetty9AsyncSupportWithWebSocket")
 //     })
     
-    @WebServlet(value = "/*", asyncSupported = true)
-    @VaadinServletConfiguration(productionMode = false, ui = MyVaadinUI.class, widgetset = "eu.etaxonomy.AppWidgetSet")
+    @WebServlet(value = {"/*", "/VAADIN/*"}, asyncSupported = true)
+    @VaadinServletConfiguration(productionMode = false, ui = MyVaadinUI.class, widgetset = "eu.etaxonomy.cdm.vaadin.AppWidgetSet")
     public static class Servlet extends VaadinServlet {
     }
 
index d7137b139b4f294494afe5204c856b8f97010c8e..f71471c21f64044b5588b58accd3ee7602aac2df 100644 (file)
@@ -4,14 +4,12 @@ import org.springframework.security.authentication.AuthenticationManager;
 import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
 import org.springframework.security.core.Authentication;
 
-import com.vaadin.server.VaadinSession;
-
-import eu.etaxonomy.cdm.remote.config.DataSourceConfigurer;
-import eu.etaxonomy.cdm.remote.config.DataSourceProperties;
 import eu.etaxonomy.cdm.vaadin.util.CdmSpringContextHelper;
 import eu.etaxonomy.cdm.vaadin.view.AuthenticationView;
 import eu.etaxonomy.cdm.vaadin.view.IAuthenticationComponent;
 
+
+
 public class AuthenticationPresenter implements IAuthenticationComponent.AuthenticationComponentListener{
 
        private AuthenticationView view;
index 18616916b2a66603821f0227315a4f5415aa7326..aefe5496bde6c96912b7ed159bf9480190c470c9 100644 (file)
@@ -4,8 +4,8 @@
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
       version="3.0"> 
 
-    <description>cdmlib-remote web-application instance</description>
-    <display-name>cdmlib-remote-webapp</display-name>
+    <description>cdmlib-vaadin web-application instance</description>
+    <display-name>cdmlib-vaadin</display-name>
 
     <welcome-file-list>
         <welcome-file>index.html</welcome-file>
index 4fc3476e76c369fe79bb30a39b17ee07f1fb07c0..cd46c38569d49449c5bf9da8e5be8590f3188a9e 100644 (file)
@@ -24,7 +24,7 @@ public class NavigatorTestUI extends AbstractAuthenticatedUI {
                        Logger.getLogger(NavigatorTestUI.class.getName());
 
        @WebServlet(value = {"/app-test/navi/*"}, asyncSupported = true)
-       @VaadinServletConfiguration(productionMode = false, ui = NavigatorTestUI.class, widgetset = "eu.etaxonomy.AppWidgetSet")
+       @VaadinServletConfiguration(productionMode = false, ui = NavigatorTestUI.class, widgetset = "eu.etaxonomy.cdm.vaadin.AppWidgetSet")
        public static class Servlet extends CdmVaadinConversationalServlet {
                
        }
diff --git a/src/test/resources/datasources.xml b/src/test/resources/datasources.xml
new file mode 100644 (file)
index 0000000..5bcfca2
--- /dev/null
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+    xmlns:tx="http://www.springframework.org/schema/tx"\r
+    xmlns:context="http://www.springframework.org/schema/context"\r
+    xsi:schemaLocation="http://www.springframework.org/schema/beans   http://www.springframework.org/schema/beans/spring-beans-2.5.xsd\r
+    http://www.springframework.org/schema/context   http://www.springframework.org/schema/context/spring-context-2.5.xsd\r
+    http://www.springframework.org/schema/tx   http://www.springframework.org/schema/tx/spring-tx-2.5.xsd\r
+    ">\r
+\r
+    <!--\r
+      DataSourceProperties allow configuring specific properties of the datasources\r
+\r
+       * cdmlib-remote.xslBasePath:\r
+            alternative base path for REST services to retrieve XSL style sheets from.\r
+            the base path must be on the same domain since cross domain xsl loading is\r
+            not permitted\r
+      -->\r
+      <bean id="dataSourceProperties" class="eu.etaxonomy.cdm.remote.config.DataSourceProperties">\r
+        <property name="propsMap">\r
+          <map>\r
+            <!--\r
+            <entry key="dataSourceBeanID">\r
+                <props>\r
+                    <prop key="cdmlib-remote.xslBasePath">/xsl</prop>\r
+                </props>\r
+            </entry>\r
+             -->\r
+            </map>\r
+        </property>\r
+      </bean>\r
+\r
+    <bean id="h2_cdmTest"  lazy-init="true" class="com.mchange.v2.c3p0.ComboPooledDataSource">\r
+        <property name="driverClass" value="eu.etaxonomy.cdm.database.LocalH2"/>\r
+        <property name="user" value="sa" />\r
+        <property name="password" value="" />\r
+        <property name="jdbcUrl" value="jdbc:h2:file:${project.build.directory}/test-classes/h2/cdmTest"/>\r
+    </bean>\r
+</beans>\r
diff --git a/src/test/resources/h2/cdmTest.h2.db b/src/test/resources/h2/cdmTest.h2.db
new file mode 100644 (file)
index 0000000..1e7c55e
Binary files /dev/null and b/src/test/resources/h2/cdmTest.h2.db differ