You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ma...@apache.org on 2017/06/10 11:25:46 UTC

[01/50] archiva git commit: Changing transaction handling

Repository: archiva
Updated Branches:
  refs/heads/citest 345379814 -> d915440a8


Changing transaction handling


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/e7143b5e
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/e7143b5e
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/e7143b5e

Branch: refs/heads/citest
Commit: e7143b5e780a3cf66b16c8510961df199d86defa
Parents: b7174c4
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Oct 14 21:40:10 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Oct 14 21:40:10 2016 +0200

----------------------------------------------------------------------
 .../archiva/web/security/ArchivaUserManagerAuthenticator.java   | 1 +
 .../src/main/resources/META-INF/spring-context.xml              | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/e7143b5e/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
index 0a74e39..b1cbc9c 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaUserManagerAuthenticator.java
@@ -209,6 +209,7 @@ public class ArchivaUserManagerAuthenticator
             {
                 log.warn( "Login for user {} and userManager {} failed, message: {}", source.getUsername(),
                           userManager.getId(), e.getMessage() );
+                e.printStackTrace();
                 resultException = e;
                 authnResultErrors.add( new AuthenticationFailureCause( AuthenticationConstants.AUTHN_RUNTIME_EXCEPTION,
                                                                        "Login for user " + source.getUsername()

http://git-wip-us.apache.org/repos/asf/archiva/blob/e7143b5e/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
index d295d09..3c5ad2e 100755
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
@@ -58,6 +58,11 @@
   </bean>
 
 
+  <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+      <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven transaction-manager="transactionManager"/>
 
 
 </beans>
\ No newline at end of file


[07/50] archiva git commit: Add jpa settings to test spring contexts

Posted by ma...@apache.org.
Add jpa settings to test spring contexts


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/e6950bba
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/e6950bba
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/e6950bba

Branch: refs/heads/citest
Commit: e6950bba280cb48e06a005423ae34d05e2fad73c
Parents: 99de626
Author: Martin Stockhammer <ma...@apache.org>
Authored: Wed Oct 26 23:27:26 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Wed Oct 26 23:27:26 2016 +0200

----------------------------------------------------------------------
 ...pring-context-cleanup-released-snapshots.xml | 37 ++++++++++++++++++--
 .../spring-context-purge-consumer-test.xml      | 37 ++++++++++++++++++--
 .../src/test/resources/spring-context.xml       | 37 ++++++++++++++++++--
 .../src/test/resources/spring-context.xml       | 37 ++++++++++++++++++--
 .../src/test/resources/spring-context.xml       | 36 +++++++++++++++++--
 .../src/test/resources/spring-context.xml       | 37 ++++++++++++++++++--
 .../src/test/resources/spring-context.xml       | 37 ++++++++++++++++++--
 .../resources/META-INF/spring-context-test.xml  | 37 ++++++++++++++++++--
 .../src/test/resources/spring-context.xml       | 36 +++++++++++++++++--
 .../resources/spring-context-test-common.xml    | 36 +++++++++++++++++--
 .../test/resources/spring-context-with-jcr.xml  | 37 ++++++++++++++++++--
 .../spring-context-servlet-security-test.xml    | 36 +++++++++++++++++--
 .../src/test/resources/spring-context.xml       | 36 +++++++++++++++++--
 13 files changed, 450 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
index 297ab97..349cd9c 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <bean name="archivaConfiguration#cleanup-released-snapshots" class="org.apache.archiva.configuration.DefaultArchivaConfiguration">
@@ -65,4 +65,37 @@
     </property>
   </bean>
 
+  <!-- ***
+     JPA settings
+     *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
+
+
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
index 1713444..63aafa5 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <context:annotation-config/>
@@ -115,5 +115,38 @@
     </property>
   </bean>
 
+  <!-- ***
+     JPA settings
+     *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
+
+
 
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
index 1b8fbab..fc70ff8 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
   <context:annotation-config/>
   <context:component-scan base-package="org.apache.archiva.metadata.repository"/>
@@ -46,4 +46,37 @@
 
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
 
+  <!-- ***
+     JPA settings
+     *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
+
+
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
index df44656..a071075 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="false">
 
   <context:annotation-config/>
@@ -41,4 +41,37 @@
     </property>
   </bean>
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
+
+  <!-- ***
+     JPA settings
+     *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
+
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
index ee094ea..5815e03 100755
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
@@ -20,11 +20,11 @@
 
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <context:annotation-config/>
@@ -85,4 +85,36 @@
 
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
 
+  <!-- ***
+   JPA settings
+   *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
+
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
index e1e4b87..3ae5809 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
@@ -20,11 +20,12 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd" default-lazy-init="true">
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
+       default-lazy-init="true">
 
   <context:annotation-config/>
   <context:component-scan base-package="org.apache.archiva.admin.mock"/>
@@ -58,4 +59,36 @@
 
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
 
+  <!-- ***
+       JPA settings
+       *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
+
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
index a0a12c6..3f50a72 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
@@ -19,9 +19,10 @@
   ~ under the License.
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
-           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd" default-lazy-init="true">
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
+       default-lazy-init="true">
 
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">
@@ -60,4 +61,36 @@
 
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
 
+  <!-- ***
+     JPA settings
+     *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
+
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
index 9488526..951ced8 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
@@ -21,13 +21,14 @@
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
-       xmlns:jaxrs="http://cxf.apache.org/jaxrs"
+       xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context-3.0.xsd
            http://cxf.apache.org/jaxrs
-           http://cxf.apache.org/schemas/jaxrs.xsd" default-lazy-init="true">
+           http://cxf.apache.org/schemas/jaxrs.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
+       default-lazy-init="true">
 
   <context:annotation-config/>
   <context:component-scan
@@ -88,4 +89,36 @@
   <alias name="authorizer#rbac" alias="authorizer#default"/>
 
   <alias name="userManager#configurable" alias="userManager#default"/>
+
+  <!-- ***
+ JPA settings
+ *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
index 486850d..08e98f6 100644
--- a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <bean name="securitySystem#testable" class="org.apache.archiva.redback.system.DefaultSecuritySystem">
@@ -120,4 +120,36 @@
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
   <alias name="authorizer#rbac" alias="authorizer#default"/>
   <alias name="userManager#configurable" alias="userManager#default"/>
+
+  <!-- ***
+   JPA settings
+   *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
index 8f8085e..2937490 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <context:annotation-config/>
@@ -84,4 +84,36 @@
   <alias name="userConfiguration#archiva" alias="userConfiguration#default"/>
   <alias name="authorizer#rbac" alias="authorizer#default"/>
   <alias name="userManager#configurable" alias="userManager#default"/>
+
+  <!--  ***
+        JPA settings
+        *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!--  ***
+        End of JPA settings
+        *** -->
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
index c9ff794..5a11710 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
@@ -21,11 +21,11 @@
 
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <bean id="repository" class="org.apache.jackrabbit.core.RepositoryImpl" destroy-method="shutdown">
@@ -58,4 +58,37 @@
   <alias name="userConfiguration#archiva" alias="userConfiguration#default"/>
   <alias name="authorizer#rbac" alias="authorizer#default"/>
   <alias name="userManager#configurable" alias="userManager#default"/>
+
+  <!--  ***
+      JPA settings
+      *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!--  ***
+        End of JPA settings
+        *** -->
+
 </beans>

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
index 048c824..f747bdb 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <context:property-placeholder system-properties-mode="OVERRIDE"/>
@@ -75,4 +75,36 @@
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
   <alias name="authorizer#rbac" alias="authorizer#default"/>
   <alias name="userManager#configurable" alias="userManager#default"/>
+
+  <!-- ***
+   JPA settings
+   *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
 </beans>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/e6950bba/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
index fc8cb60..fe8f0b8 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
@@ -20,11 +20,11 @@
   -->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-       xmlns:context="http://www.springframework.org/schema/context"
+       xmlns:context="http://www.springframework.org/schema/context" xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context 
-           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"
        default-lazy-init="true">
 
   <context:property-placeholder system-properties-mode="OVERRIDE"/>
@@ -76,4 +76,36 @@
   <alias name="userConfiguration#redback" alias="userConfiguration#default"/>
   <alias name="authorizer#rbac" alias="authorizer#default"/>
   <alias name="userManager#configurable" alias="userManager#default"/>
+
+  <!-- ***
+   JPA settings
+   *** -->
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence-hsqldb.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.ConnectionURL" value="jdbc:hsqldb:mem:redback_database" />
+        <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
+        <entry key="openjpa.ConnectionUserName" value="sa" />
+        <entry key="openjpa.ConnectionPassword" value="" />
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+               value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+  <!-- ***
+     End of JPA settings
+     *** -->
 </beans>
\ No newline at end of file


[18/50] archiva git commit: migrate all tests to jetty 9.4

Posted by ma...@apache.org.
migrate all tests to jetty 9.4

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/e9376eeb
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/e9376eeb
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/e9376eeb

Branch: refs/heads/citest
Commit: e9376eeb6d72fbd83ed893c9b1ddfa57cb7220f6
Parents: 3c036f3
Author: olivier lamy <ol...@apache.org>
Authored: Fri May 12 16:19:41 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Fri May 12 16:19:41 2017 +1000

----------------------------------------------------------------------
 .../src/test/resources/log4j2-test.xml          | 41 +++++++++++++
 .../archiva/proxy/HttpProxyTransferTest.java    |  8 ++-
 .../indexing/DownloadRemoteIndexTaskTest.java   | 11 ++--
 .../src/test/resources/log4j2-test.xml          |  4 +-
 .../archiva-rest/archiva-rest-services/pom.xml  |  5 +-
 .../src/test/resources/log4j2-test.xml          |  2 +-
 .../archiva-web/archiva-web-common/pom.xml      |  5 ++
 .../remotedownload/DownloadArtifactsTest.java   | 16 +++--
 .../RemoteRepositoryConnectivityCheckTest.java  | 13 +++-
 .../src/test/resources/log4j2-test.xml          | 14 ++---
 .../archiva-web/archiva-webdav/pom.xml          |  5 ++
 ...bstractRepositoryServletProxiedTestCase.java |  8 ++-
 .../webdav/ArchivaDavSessionProviderTest.java   | 63 +++++++++++---------
 .../src/test/resources/log4j2-test.xml          |  3 +-
 pom.xml                                         |  2 +-
 15 files changed, 140 insertions(+), 60 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml
new file mode 100644
index 0000000..282cfa5
--- /dev/null
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/test/resources/log4j2-test.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+
+<configuration>
+  <appenders>
+    <Console name="console" target="SYSTEM_OUT">
+      <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
+    </Console>
+  </appenders>
+  <loggers>
+
+    <logger name="org.springframework" level="error"/>
+
+    <!--
+    <logger name="org.apache.http" level="debug"/>
+    -->
+    <root level="info">
+      <appender-ref ref="console"/>
+    </root>
+  </loggers>
+</configuration>
+
+

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
index f0ca4f5..d85d501 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
@@ -38,8 +38,10 @@ import org.apache.archiva.policies.SnapshotsPolicy;
 import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.assertj.core.api.Assertions;
 import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.Request;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.server.handler.AbstractHandler;
 import org.junit.After;
 import org.junit.Before;
@@ -164,11 +166,13 @@ public class HttpProxyTransferTest
             }
         };
 
-        server = new Server( 0 );
+        server = new Server(  );
+        ServerConnector serverConnector = new ServerConnector( server, new HttpConnectionFactory());
+        server.addConnector( serverConnector );
         server.setHandler( handler );
         server.start();
 
-        int port = server.getConnectors()[0].getLocalPort();
+        int port = serverConnector.getLocalPort();
 
         NetworkProxyConfiguration proxyConfig = new NetworkProxyConfiguration();
         proxyConfig.setHost( "localhost" );

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
index 6a1210d..09fdf5a 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
@@ -31,7 +31,9 @@ import org.apache.maven.index.MAVEN;
 import org.apache.maven.index.NexusIndexer;
 import org.apache.maven.index.expr.StringSearchExpression;
 import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.servlet.DefaultServlet;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
@@ -61,6 +63,7 @@ public class DownloadRemoteIndexTaskTest
 {
 
     private Server server;
+    private ServerConnector serverConnector;
 
     private int port;
 
@@ -81,12 +84,12 @@ public class DownloadRemoteIndexTaskTest
     public void initialize()
         throws Exception
     {
-        server = new Server( 0 );
+        server = new Server( );
+        serverConnector = new ServerConnector( server, new HttpConnectionFactory());
+        server.addConnector( serverConnector );
         createContext( server, new File( "src/test/" ) );
-
         this.server.start();
-        Connector connector = this.server.getConnectors()[0];
-        this.port = connector.getLocalPort();
+        this.port = serverConnector.getLocalPort();
         log.info( "start server on port {}", this.port );
         nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );
     }

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml
index 6e3ef0f..c7f86dd 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/log4j2-test.xml
@@ -19,7 +19,7 @@
   -->
 
 
-<configuration status="debug">
+<configuration>
   <appenders>
     <Console name="console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
@@ -29,7 +29,7 @@
 
     <logger name="org.springframework" level="error"/>
 
-    <logger name="org.apache.archiva.scheduler.indexing" level="debug"/>
+    <logger name="org.apache.archiva.scheduler.indexing" level="info"/>
     <!--
     <logger name="org.apache.http" level="debug"/>
     -->

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index f77fbc1..88420e2 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -37,7 +37,6 @@
     -->
     <redbackTestJdbcUrl>jdbc:hsqldb:mem:redback-test</redbackTestJdbcUrl>
     <redbackTestJdbcDriver>org.hsqldb.jdbcDriver</redbackTestJdbcDriver>
-    <jetty.version>9.4.5.v20170502</jetty.version>
   </properties>
 
   <dependencies>
@@ -387,12 +386,12 @@
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-server</artifactId>
-      <version>${jetty.version}</version>
+      <version>${jettyVersion}</version>
     </dependency>
     <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-servlet</artifactId>
-      <version>${jetty.version}</version>
+      <version>${jettyVersion}</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
index 4d7c9ab..1c258ef 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
@@ -30,7 +30,7 @@
     <logger name="org.apache.archiva.redback.rest.services" level="error"/>
     <logger name="JPOX" level="error"/>
     <logger name="org.apache.archiva.rest.services" level="info"/>
-    <logger name="org.springframework" level="info"/>
+    <logger name="org.springframework" level="error"/>
     <logger name="org.apache.commons.configuration" level="error"/>
 
     <root level="info">

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index e3b113a..a173f6a 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -236,6 +236,11 @@
       <artifactId>spring-web</artifactId>
     </dependency>
     <dependency>
+      <groupId>javax.mail</groupId>
+      <artifactId>mail</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
index b009e8c..eae4101 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
@@ -25,7 +25,9 @@ import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
 import org.apache.commons.io.FileUtils;
 import org.apache.maven.wagon.providers.http.HttpWagon;
 import org.apache.maven.wagon.repository.Repository;
+import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.After;
@@ -96,7 +98,9 @@ public class DownloadArtifactsTest
 
         // repo handler
 
-        this.repoServer = new Server( 0 );
+        this.repoServer = new Server(  );
+        ServerConnector repoServerConnector = new ServerConnector( this.repoServer, new HttpConnectionFactory());
+        this.repoServer.addConnector( repoServerConnector );
 
         ServletHolder shRepo = new ServletHolder( RepoServlet.class );
         ServletContextHandler contextRepo = new ServletContextHandler();
@@ -105,12 +109,16 @@ public class DownloadArtifactsTest
         contextRepo.addServlet( shRepo, "/*" );
 
         repoServer.setHandler( contextRepo );
+
         repoServer.start();
-        this.repoServerPort = repoServer.getConnectors()[0].getLocalPort();
+        this.repoServerPort = repoServerConnector.getLocalPort();
 
         //redirect handler
 
-        this.redirectServer = new Server( 0 );
+        this.redirectServer = new Server( );
+        ServerConnector redirectServerConnector = new ServerConnector( this.redirectServer, new HttpConnectionFactory());
+        this.redirectServer.addConnector( redirectServerConnector );
+
         ServletHolder shRedirect = new ServletHolder( RedirectServlet.class );
         ServletContextHandler contextRedirect = new ServletContextHandler();
         contextRedirect.setAttribute( "redirectToPort", Integer.toString( this.repoServerPort ) );
@@ -120,7 +128,7 @@ public class DownloadArtifactsTest
 
         redirectServer.setHandler( contextRedirect );
         redirectServer.start();
-        this.redirectPort = redirectServer.getConnectors()[0].getLocalPort();
+        this.redirectPort = redirectServerConnector.getLocalPort();
         log.info( "redirect server port {}", redirectPort );
 
     }

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java
index fabe568..369bb10 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/RemoteRepositoryConnectivityCheckTest.java
@@ -24,7 +24,9 @@ import org.apache.archiva.rest.api.services.RemoteRepositoriesService;
 import org.apache.commons.io.FileUtils;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.server.handler.DefaultHandler;
 import org.eclipse.jetty.server.handler.HandlerList;
 import org.eclipse.jetty.server.handler.ResourceHandler;
@@ -71,6 +73,9 @@ public class RemoteRepositoryConnectivityCheckTest
 
         Server repoServer =
             buildStaticServer( new File( System.getProperty( "basedir" ) + "/src/test/repositories/test-repo" ) );
+
+        ServerConnector serverConnector = new ServerConnector( repoServer, new HttpConnectionFactory());
+        repoServer.addConnector( serverConnector );
         repoServer.start();
 
         RemoteRepositoriesService service = getRemoteRepositoriesService();
@@ -80,7 +85,7 @@ public class RemoteRepositoryConnectivityCheckTest
         try
         {
 
-            int repoServerPort = repoServer.getConnectors()[0].getLocalPort();
+            int repoServerPort = serverConnector.getLocalPort();
 
             RemoteRepository repo = getRemoteRepository();
 
@@ -104,6 +109,8 @@ public class RemoteRepositoryConnectivityCheckTest
 
         File tmpDir = Files.createTempDirectory( "test" ).toFile();
         Server repoServer = buildStaticServer( tmpDir );
+        ServerConnector serverConnector = new ServerConnector( repoServer, new HttpConnectionFactory());
+        repoServer.addConnector( serverConnector );
         repoServer.start();
 
         RemoteRepositoriesService service = getRemoteRepositoriesService();
@@ -113,7 +120,7 @@ public class RemoteRepositoryConnectivityCheckTest
         try
         {
 
-            int repoServerPort = repoServer.getConnectors()[0].getLocalPort();
+            int repoServerPort = serverConnector.getLocalPort();
 
             RemoteRepository repo = getRemoteRepository();
 
@@ -160,7 +167,7 @@ public class RemoteRepositoryConnectivityCheckTest
 
     protected Server buildStaticServer( File path )
     {
-        Server repoServer = new Server( 0 );
+        Server repoServer = new Server(  );
 
         ResourceHandler resourceHandler = new ResourceHandler();
         resourceHandler.setDirectoriesListed( true );

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
index b80c0b0..11ff568 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/log4j2-test.xml
@@ -28,15 +28,15 @@
   <loggers>
 
     <logger name="org.springframework" level="error"/>
-
+    <logger name="org.apache.archiva" level="error"/>
     <logger name="org.apache.archiva.web" level="info"/>
-
     <logger name="org.apache.commons.configuration" level="error"/>
-
-    <logger name="org.apache.archiva.scheduler.indexing" level="debug"/>
-
-    <logger name="org.apache.archiva.remotedownload" level="debug"/>
-
+    <logger name="org.apache.archiva.scheduler.indexing" level="info"/>
+    <logger name="org.apache.archiva.remotedownload" level="info"/>
+    <logger name="org.apache.jackrabbit" level="error"/>
+    <logger name="org.quartz" level="error"/>
+    <logger name="JPOX.RDBMS" level="error"/>
+    <logger name="JPOX" level="error"/>
     <root level="info">
       <appender-ref ref="console"/>
     </root>

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index 6e7bf6f..6c4f3f9 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -160,6 +160,11 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>javax.mail</groupId>
+      <artifactId>mail</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
       <groupId>org.eclipse.jetty</groupId>
       <artifactId>jetty-server</artifactId>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java
index 0c0a718..42146c0 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/AbstractRepositoryServletProxiedTestCase.java
@@ -28,7 +28,9 @@ import org.apache.archiva.policies.ChecksumPolicy;
 import org.apache.archiva.policies.ReleasesPolicy;
 import org.apache.archiva.policies.SnapshotsPolicy;
 import org.apache.commons.io.FileUtils;
+import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.server.handler.ContextHandlerCollection;
 import org.eclipse.jetty.servlet.DefaultServlet;
 import org.eclipse.jetty.servlet.ServletContextHandler;
@@ -137,7 +139,9 @@ public abstract class AbstractRepositoryServletProxiedTestCase
             repo.root.mkdirs();
         }
 
-        repo.server = new Server( 0 );
+        repo.server = new Server( );
+        ServerConnector serverConnector = new ServerConnector( repo.server, new HttpConnectionFactory());
+        repo.server.addConnector( serverConnector );
         ContextHandlerCollection contexts = new ContextHandlerCollection();
         repo.server.setHandler( contexts );
 
@@ -154,7 +158,7 @@ public abstract class AbstractRepositoryServletProxiedTestCase
 
         repo.server.start();
 
-        int port = repo.server.getConnectors()[0].getLocalPort();
+        int port = serverConnector.getLocalPort();
         repo.url = "http://localhost:" + port + repo.context;
         log.info( "Remote HTTP Server started on {}", repo.url );
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavSessionProviderTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavSessionProviderTest.java b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavSessionProviderTest.java
index b657c08..30a1049 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavSessionProviderTest.java
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/java/org/apache/archiva/webdav/ArchivaDavSessionProviderTest.java
@@ -20,46 +20,30 @@ package org.apache.archiva.webdav;
  */
 
 import junit.framework.TestCase;
+import org.apache.archiva.redback.authentication.AuthenticationDataSource;
 import org.apache.archiva.redback.authentication.AuthenticationException;
+import org.apache.archiva.redback.authentication.AuthenticationResult;
+import org.apache.archiva.redback.authorization.AuthorizationException;
+import org.apache.archiva.redback.authorization.UnauthorizedException;
+import org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator;
 import org.apache.archiva.redback.policy.AccountLockedException;
 import org.apache.archiva.redback.policy.MustChangePasswordException;
+import org.apache.archiva.redback.system.SecuritySession;
 import org.apache.archiva.redback.users.User;
+import org.apache.archiva.security.ServletAuthenticator;
+import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
 import org.apache.jackrabbit.webdav.DavSessionProvider;
 import org.apache.jackrabbit.webdav.WebdavRequest;
 import org.apache.jackrabbit.webdav.WebdavRequestImpl;
-import org.apache.archiva.security.ServletAuthenticator;
-import org.apache.archiva.redback.authentication.AuthenticationDataSource;
-import org.apache.archiva.redback.authentication.AuthenticationResult;
-import org.apache.archiva.redback.authorization.AuthorizationException;
-import org.apache.archiva.redback.authorization.UnauthorizedException;
-import org.apache.archiva.redback.system.SecuritySession;
-import org.apache.archiva.redback.integration.filter.authentication.HttpAuthenticator;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.mock.web.MockHttpServletRequest;
 
-import javax.servlet.AsyncContext;
-import javax.servlet.DispatcherType;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.ServletInputStream;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
-import javax.servlet.http.Part;
-import java.io.BufferedReader;
 import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.security.Principal;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Locale;
-import java.util.Map;
-import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
 
 @RunWith( ArchivaBlockJUnit4ClassRunner.class )
 public class ArchivaDavSessionProviderTest
@@ -76,7 +60,7 @@ public class ArchivaDavSessionProviderTest
     {
         super.setUp();
         sessionProvider = new ArchivaDavSessionProvider( new ServletAuthenticatorMock(), new HttpAuthenticatorMock() );
-        request = new WebdavRequestImpl( new HttpServletRequestMock(), null );
+        request = new WebdavRequestImpl( new MockHttpServletRequest(), null );
     }
 
     @Test
@@ -101,11 +85,31 @@ public class ArchivaDavSessionProviderTest
     }
 
     @SuppressWarnings( "unchecked" )
+    /*
     private class HttpServletRequestMock
         implements HttpServletRequest
     {
 
         @Override
+        public long getContentLengthLong()
+        {
+            throw new UnsupportedOperationException( "Not supported yet." );
+        }
+
+        @Override
+        public String changeSessionId()
+        {
+            throw new UnsupportedOperationException( "Not supported yet." );
+        }
+
+        @Override
+        public <T extends HttpUpgradeHandler> T upgrade( Class<T> handlerClass )
+            throws IOException, ServletException
+        {
+            throw new UnsupportedOperationException( "Not supported yet." );
+        }
+
+        @Override
         public boolean authenticate( HttpServletResponse httpServletResponse )
             throws IOException, ServletException
         {
@@ -513,6 +517,7 @@ public class ArchivaDavSessionProviderTest
         }
     }
 
+    */
     private class ServletAuthenticatorMock
         implements ServletAuthenticator
     {

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml b/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml
index 1ce090b..84243af 100644
--- a/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/plugins/stage-repository-merge/src/test/resources/log4j2-test.xml
@@ -19,7 +19,7 @@
   -->
 
 
-<configuration status="debug">
+<configuration>
   <appenders>
     <Console name="console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
@@ -31,7 +31,6 @@
 
     <logger name="org.springframework" level="error"/>
 
-
     <root level="info">
       <appender-ref ref="console"/>
     </root>

http://git-wip-us.apache.org/repos/asf/archiva/blob/e9376eeb/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 53b389a..ee97196 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,7 +86,7 @@
     <httpclient.version>4.5.2</httpclient.version>
     <httpclient.core.version>4.4.4</httpclient.core.version>
     <javaxMailVersion>1.4</javaxMailVersion>
-    <jettyVersion>8.1.14.v20131031</jettyVersion>
+    <jettyVersion>9.4.5.v20170502</jettyVersion>
     <guava.version>16.0.1</guava.version>
 
     <!-- restore when we will be able to use a derby in memory database -->


[06/50] archiva git commit: Stabilised file lock implementation and tests

Posted by ma...@apache.org.
Stabilised file lock implementation and tests


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/99de6268
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/99de6268
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/99de6268

Branch: refs/heads/citest
Commit: 99de6268c9c51498b8b132ce2d7e12cb207a938f
Parents: 593d69f
Author: Martin Stockhammer <ma...@apache.org>
Authored: Wed Oct 26 23:25:50 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Wed Oct 26 23:25:50 2016 +0200

----------------------------------------------------------------------
 .../common/filelock/DefaultFileLockManager.java | 31 +++++++++++----
 .../apache/archiva/common/filelock/Lock.java    |  2 +-
 .../filelock/DefaultFileLockManagerTest.java    | 40 +++++++++++++-------
 3 files changed, 50 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/99de6268/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
index ee4fb35..2ce2f18 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
@@ -31,6 +31,7 @@ import java.io.RandomAccessFile;
 import java.nio.channels.ClosedChannelException;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 /**
  * @author Olivier Lamy
@@ -51,7 +52,6 @@ public class DefaultFileLockManager
 
     private int timeout = 0;
 
-
     @Override
     public Lock readFileLock( File file )
         throws FileLockException, FileLockTimeoutException
@@ -162,20 +162,18 @@ public class DefaultFileLockManager
                 }
             }
 
-            Lock current = lockFiles.get( file );
-
             try
             {
-
+                Lock current = lockFiles.get( file );
                 if ( current != null )
                 {
                     log.debug( "write lock file exist continue wait" );
 
                     continue;
                 }
-                lock = new Lock( file, true );
-                createNewFileQuietly( file );
-                lock.openLock( true, timeout > 0 );
+                lock = new Lock(file, true);
+                createNewFileQuietly(file);
+                lock.openLock(true, timeout > 0);
                 acquired = true;
             }
             catch ( FileNotFoundException e )
@@ -191,12 +189,29 @@ public class DefaultFileLockManager
             }
             catch ( IOException e )
             {
+                if (lock!=null && lock.isValid()) {
+                    try {
+                        lock.close();
+                    } catch (IOException ex) {
+                        // Ignore
+                    }
+                }
                 throw new FileLockException( e.getMessage(), e );
             }
-            catch ( IllegalStateException e )
+            catch ( Throwable e )
             {
+                if (lock!=null && lock.isValid()) {
+                    try {
+                        lock.close();
+                    } catch (IOException ex) {
+                        // Ignore
+                    } finally {
+                        lock = null;
+                    }
+                }
                 log.debug( "openLock {}:{}", e.getClass(), e.getMessage() );
             }
+
         }
 
         Lock current = lockFiles.putIfAbsent( file, lock );

http://git-wip-us.apache.org/repos/asf/archiva/blob/99de6268/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/Lock.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/Lock.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/Lock.java
index bd4afcb..17b19c0 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/Lock.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/Lock.java
@@ -90,7 +90,7 @@ public class Lock
 
     public boolean isValid()
     {
-        return this.fileLock.isValid();
+        return this.fileLock!=null && this.fileLock.isValid();
     }
 
     public Map<Thread, AtomicInteger> getFileClients()

http://git-wip-us.apache.org/repos/asf/archiva/blob/99de6268/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
index cc63e0c..9618661 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
@@ -35,7 +35,9 @@ import javax.inject.Named;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
+import java.nio.file.FileAlreadyExistsException;
 import java.nio.file.Files;
+import java.nio.file.Path;
 import java.nio.file.Paths;
 import java.nio.file.StandardCopyOption;
 import java.util.concurrent.atomic.AtomicInteger;
@@ -83,6 +85,22 @@ public class DefaultFileLockManagerTest
 
         }
 
+        // Files.copy is not atomic so have to try several times in
+        // a multithreaded test
+        private void copyFile(Path source, Path destination) {
+            int attempts=10;
+            boolean finished = false;
+            while(!finished && attempts-->0) {
+                try {
+                    Files.copy(source, destination, StandardCopyOption.REPLACE_EXISTING,
+                            StandardCopyOption.COPY_ATTRIBUTES);
+                    finished=true;
+                } catch (IOException ex) {
+                    //
+                }
+            }
+        }
+
         public void thread1()
             throws FileLockException, FileLockTimeoutException, IOException
         {
@@ -91,8 +109,7 @@ public class DefaultFileLockManagerTest
             try
             {
                 lock.getFile().delete();
-                Files.copy( largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING,
-                            StandardCopyOption.COPY_ATTRIBUTES );
+                copyFile( largeJar.toPath(), lock.getFile().toPath());
             }
             finally
             {
@@ -110,8 +127,7 @@ public class DefaultFileLockManagerTest
             try
             {
                 lock.getFile().delete();
-                Files.copy( largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING,
-                            StandardCopyOption.COPY_ATTRIBUTES );
+                copyFile( largeJar.toPath(), lock.getFile().toPath());
             }
             finally
             {
@@ -147,8 +163,7 @@ public class DefaultFileLockManagerTest
             try
             {
                 lock.getFile().delete();
-                Files.copy( largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING,
-                            StandardCopyOption.COPY_ATTRIBUTES );
+                copyFile( largeJar.toPath(), lock.getFile().toPath());
             }
             finally
             {
@@ -166,8 +181,7 @@ public class DefaultFileLockManagerTest
             try
             {
                 lock.getFile().delete();
-                Files.copy( largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING,
-                            StandardCopyOption.COPY_ATTRIBUTES );
+                copyFile( largeJar.toPath(), lock.getFile().toPath());
             }
             finally
             {
@@ -202,8 +216,7 @@ public class DefaultFileLockManagerTest
             try
             {
                 lock.getFile().delete();
-                Files.copy( largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING,
-                            StandardCopyOption.COPY_ATTRIBUTES );
+                copyFile( largeJar.toPath(), lock.getFile().toPath());
             }
             finally
             {
@@ -238,8 +251,7 @@ public class DefaultFileLockManagerTest
             try
             {
                 lock.getFile().delete();
-                Files.copy( largeJar.toPath(), lock.getFile().toPath(), StandardCopyOption.REPLACE_EXISTING,
-                            StandardCopyOption.COPY_ATTRIBUTES );
+                copyFile( largeJar.toPath(), lock.getFile().toPath());
             }
             finally
             {
@@ -283,9 +295,9 @@ public class DefaultFileLockManagerTest
     {
         ConcurrentFileWrite concurrentFileWrite = new ConcurrentFileWrite( fileLockManager );
         //concurrentFileWrite.setTrace( true );
-        TestFramework.runOnce( concurrentFileWrite );
+        TestFramework.runManyTimes( concurrentFileWrite, 10);
         logger.info( "success: {}", concurrentFileWrite.success );
-        Assert.assertEquals( 10, concurrentFileWrite.success.intValue() );
+        Assert.assertEquals( 100, concurrentFileWrite.success.intValue() );
     }
 
 


[31/50] archiva git commit: redback 3.0.0-SNAPSHOT

Posted by ma...@apache.org.
redback 3.0.0-SNAPSHOT

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/b77921b7
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/b77921b7
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/b77921b7

Branch: refs/heads/citest
Commit: b77921b7c0f544e16e605b55348923cc027a122b
Parents: 2cc9dc8
Author: olivier lamy <ol...@apache.org>
Authored: Wed May 24 21:55:58 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Wed May 24 21:55:58 2017 +1000

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/b77921b7/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8aadb88..9b76d6d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,7 @@
     <maven-model-converter.version>2.1</maven-model-converter.version>
     <maven.indexer.version>5.1.1</maven.indexer.version>
     <wagon.version>2.9</wagon.version>
-    <redback.version>2.7-SNAPSHOT</redback.version>
+    <redback.version>3.0.0-SNAPSHOT</redback.version>
     <redback.cache.version>2.2</redback.cache.version>
     <redback.quartz.version>2.1</redback.quartz.version>
     <redback.registry.version>2.4</redback.registry.version>


[02/50] archiva git commit: Merge branch 'master' into jpa

Posted by ma...@apache.org.
Merge branch 'master' into jpa


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/2164ef75
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/2164ef75
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/2164ef75

Branch: refs/heads/citest
Commit: 2164ef75ca57b91c3c12a6043649dcce142b5836
Parents: e7143b5 3fe1000
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun Oct 16 20:10:06 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun Oct 16 20:10:06 2016 +0200

----------------------------------------------------------------------
 .../DefaultArchivaConfiguration.java            | 67 +++++++++++---------
 .../webdav/ArchivaDavResourceFactory.java       | 14 +++-
 ...epositoryServletProxiedMetadataTestCase.java | 40 ------------
 .../AbstractRepositoryServletTestCase.java      | 31 +++++++++
 .../webdav/RepositoryServletNoProxyTest.java    | 40 ++++++++++++
 5 files changed, 118 insertions(+), 74 deletions(-)
----------------------------------------------------------------------



[13/50] archiva git commit: Add additional checks for file lock tests

Posted by ma...@apache.org.
Add additional checks for file lock tests


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/dfcef53b
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/dfcef53b
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/dfcef53b

Branch: refs/heads/citest
Commit: dfcef53bf9d32839e280ac46ccb3397d2ce0ba05
Parents: 4c35cce
Author: Martin Stockhammer <ma...@apache.org>
Authored: Thu Oct 27 17:43:31 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Thu Oct 27 23:10:49 2016 +0200

----------------------------------------------------------------------
 .../filelock/DefaultFileLockManagerTest.java    | 349 ++++++++++---------
 1 file changed, 186 insertions(+), 163 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/dfcef53b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
index 19f836d..7fa30b5 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
@@ -33,6 +33,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
 import javax.inject.Inject;
 import javax.inject.Named;
 import java.io.File;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.nio.file.FileAlreadyExistsException;
@@ -48,53 +49,49 @@ import java.util.concurrent.atomic.AtomicInteger;
  * @author Olivier Lamy
  */
 @RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations = { "classpath*:/META-INF/spring-context.xml" })
-public class DefaultFileLockManagerTest
-{
+@ContextConfiguration(locations = {"classpath*:/META-INF/spring-context.xml"})
+public class DefaultFileLockManagerTest {
 
-    final Logger logger = LoggerFactory.getLogger( getClass() );
+    final Logger logger = LoggerFactory.getLogger(getClass());
 
     @Inject
     @Named(value = "fileLockManager#default")
     FileLockManager fileLockManager;
 
     class ConcurrentFileWrite
-        extends MultithreadedTestCase
-    {
+            extends MultithreadedTestCase {
 
 
-        AtomicInteger success = new AtomicInteger( 0 );
+        AtomicInteger success = new AtomicInteger(0);
 
         FileLockManager fileLockManager;
 
-        File file = new File( System.getProperty( "buildDirectory" ), "foo.txt" );
+        File file = new File(System.getProperty("buildDirectory"), "foo.txt");
 
-        File largeJar = new File( System.getProperty( "basedir" ), "src/test/cassandra-all-2.0.3.jar" );
+        File largeJar = new File(System.getProperty("basedir"), "src/test/cassandra-all-2.0.3.jar");
 
-        ConcurrentFileWrite( FileLockManager fileLockManager )
-            throws IOException
-        {
+        ConcurrentFileWrite(FileLockManager fileLockManager)
+                throws IOException {
             this.fileLockManager = fileLockManager;
             //file.createNewFile();
 
         }
 
         @Override
-        public void initialize()
-        {
+        public void initialize() {
 
         }
 
         // Files.copy is not atomic so have to try several times in
         // a multithreaded test
         private void copyFile(Path source, Path destination) {
-            int attempts=10;
+            int attempts = 10;
             boolean finished = false;
-            while(!finished && attempts-->0) {
+            while (!finished && attempts-- > 0) {
                 try {
                     Files.copy(source, destination, StandardCopyOption.REPLACE_EXISTING,
                             StandardCopyOption.COPY_ATTRIBUTES);
-                    finished=true;
+                    finished = true;
                 } catch (IOException ex) {
                     //
                 }
@@ -102,180 +99,208 @@ public class DefaultFileLockManagerTest
         }
 
         public void thread1()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread1" );
-            Lock lock = fileLockManager.writeFileLock( this.file );
-            try
-            {
-                lock.getFile().delete();
-                copyFile( largeJar.toPath(), lock.getFile().toPath());
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread1");
+                Lock lock = fileLockManager.writeFileLock(this.file);
+                try {
+                    lock.getFile().delete();
+                    copyFile(largeJar.toPath(), lock.getFile().toPath());
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread1 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread1 ok" );
-            success.incrementAndGet();
         }
 
         public void thread2()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread2" );
-            Lock lock = fileLockManager.writeFileLock( this.file );
-            try
-            {
-                lock.getFile().delete();
-                copyFile( largeJar.toPath(), lock.getFile().toPath());
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread2");
+                Lock lock = fileLockManager.writeFileLock(this.file);
+                try {
+                    lock.getFile().delete();
+                    copyFile(largeJar.toPath(), lock.getFile().toPath());
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread2 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread2 ok" );
-            success.incrementAndGet();
+
         }
 
         public void thread3()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread3" );
-            Lock lock = fileLockManager.readFileLock( this.file );
-            try
-            {
-                Files.copy( Paths.get( lock.getFile().getPath() ),
-                            new FileOutputStream( File.createTempFile( "foo", ".jar" ) ) );
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread3");
+                Lock lock = fileLockManager.readFileLock(this.file);
+                try {
+                    Files.copy(Paths.get(lock.getFile().getPath()),
+                            new FileOutputStream(File.createTempFile("foo", ".jar")));
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread3 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread3 ok" );
-            success.incrementAndGet();
+
         }
 
         public void thread4()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread4" );
-            Lock lock = fileLockManager.writeFileLock( this.file );
-            try
-            {
-                lock.getFile().delete();
-                copyFile( largeJar.toPath(), lock.getFile().toPath());
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread4");
+                Lock lock = fileLockManager.writeFileLock(this.file);
+                try {
+                    lock.getFile().delete();
+                    copyFile(largeJar.toPath(), lock.getFile().toPath());
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread4 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread4 ok" );
-            success.incrementAndGet();
+
         }
 
         public void thread5()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread5" );
-            Lock lock = fileLockManager.writeFileLock( this.file );
-            try
-            {
-                lock.getFile().delete();
-                copyFile( largeJar.toPath(), lock.getFile().toPath());
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread5");
+                Lock lock = fileLockManager.writeFileLock(this.file);
+                try {
+                    lock.getFile().delete();
+                    copyFile(largeJar.toPath(), lock.getFile().toPath());
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread5 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread5 ok" );
-            success.incrementAndGet();
+
         }
 
         public void thread6()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread6" );
-            Lock lock = fileLockManager.readFileLock( this.file );
-            try
-            {
-                Files.copy( lock.getFile().toPath(), new FileOutputStream( File.createTempFile( "foo", ".jar" ) ) );
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread6");
+                Lock lock = fileLockManager.readFileLock(this.file);
+                try {
+                    Files.copy(lock.getFile().toPath(), new FileOutputStream(File.createTempFile("foo", ".jar")));
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread6 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread6 ok" );
-            success.incrementAndGet();
+
         }
 
         public void thread7()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread7" );
-            Lock lock = fileLockManager.writeFileLock( this.file );
-            try
-            {
-                lock.getFile().delete();
-                copyFile( largeJar.toPath(), lock.getFile().toPath());
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread7");
+                Lock lock = fileLockManager.writeFileLock(this.file);
+                try {
+                    lock.getFile().delete();
+                    copyFile(largeJar.toPath(), lock.getFile().toPath());
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread7 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread7 ok" );
-            success.incrementAndGet();
+
         }
 
         public void thread8()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread8" );
-            Lock lock = fileLockManager.readFileLock( this.file );
-            try
-            {
-                Files.copy( lock.getFile().toPath(), new FileOutputStream( File.createTempFile( "foo", ".jar" ) ) );
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread8");
+                Lock lock = fileLockManager.readFileLock(this.file);
+                try {
+                    Files.copy(lock.getFile().toPath(), new FileOutputStream(File.createTempFile("foo", ".jar")));
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread8 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread8 ok" );
-            success.incrementAndGet();
+
         }
 
         public void thread9()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread9" );
-            Lock lock = fileLockManager.writeFileLock( this.file );
-            try
-            {
-                lock.getFile().delete();
-                copyFile( largeJar.toPath(), lock.getFile().toPath());
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread9");
+                Lock lock = fileLockManager.writeFileLock(this.file);
+                try {
+                    lock.getFile().delete();
+                    copyFile(largeJar.toPath(), lock.getFile().toPath());
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread9 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread9 ok" );
-            success.incrementAndGet();
         }
 
         public void thread10()
-            throws FileLockException, FileLockTimeoutException, IOException
-        {
-            logger.info( "thread10" );
-            Lock lock = fileLockManager.readFileLock( this.file );
-            try
-            {
-                Files.copy( lock.getFile().toPath(), new FileOutputStream( File.createTempFile( "foo", ".jar" ) ) );
-            }
-            finally
-            {
-                fileLockManager.release( lock );
+                throws FileLockException, FileLockTimeoutException, IOException {
+            try {
+                logger.info("thread10");
+                Lock lock = fileLockManager.readFileLock(this.file);
+                try {
+                    Files.copy(lock.getFile().toPath(), new FileOutputStream(File.createTempFile("foo", ".jar")));
+                } finally {
+                    fileLockManager.release(lock);
+                }
+                logger.info("thread10 ok");
+                success.incrementAndGet();
+            } catch (Throwable e) {
+                logger.error("Error occured " + e.getMessage());
+                e.printStackTrace();
+                throw e;
             }
-            logger.info( "thread10 ok" );
-            success.incrementAndGet();
+
         }
 
 
@@ -283,21 +308,19 @@ public class DefaultFileLockManagerTest
 
 
     @Before
-    public void initialize()
-    {
-        fileLockManager.setSkipLocking( false );
+    public void initialize() {
+        fileLockManager.setSkipLocking(false);
         fileLockManager.clearLockFiles();
     }
 
     @Test
     public void testWrite()
-        throws Throwable
-    {
-        ConcurrentFileWrite concurrentFileWrite = new ConcurrentFileWrite( fileLockManager );
+            throws Throwable {
+        ConcurrentFileWrite concurrentFileWrite = new ConcurrentFileWrite(fileLockManager);
         //concurrentFileWrite.setTrace( true );
-        TestFramework.runManyTimes( concurrentFileWrite, 10);
-        logger.info( "success: {}", concurrentFileWrite.success );
-        Assert.assertEquals( 100, concurrentFileWrite.success.intValue() );
+        TestFramework.runManyTimes(concurrentFileWrite, 10, TestFramework.DEFAULT_CLOCKPERIOD, 20);
+        logger.info("success: {}", concurrentFileWrite.success);
+        Assert.assertEquals(100, concurrentFileWrite.success.intValue());
     }
 
 


[33/50] archiva git commit: use same plugin version

Posted by ma...@apache.org.
use same plugin version

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/0e73c44d
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/0e73c44d
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/0e73c44d

Branch: refs/heads/citest
Commit: 0e73c44d8981a369727f5928c9c0fee2a947d080
Parents: 4b6131e
Author: olivier lamy <ol...@apache.org>
Authored: Sat May 27 21:21:06 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Sat May 27 21:21:06 2017 +1000

----------------------------------------------------------------------
 .../src/main/resourcesstatic/archetype-resources/pom.xml     | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/0e73c44d/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
index fb1586e..c66cdab 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resourcesstatic/archetype-resources/pom.xml
@@ -235,7 +235,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-compiler-plugin</artifactId>
-          <version>3.5.1</version>
+          <version>3.6.1</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
@@ -245,7 +245,7 @@
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-jar-plugin</artifactId>
-          <version>2.5</version>
+          <version>3.0.0</version>
         </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
@@ -259,8 +259,8 @@
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
         <configuration>
-          <source>1.7</source>
-          <target>1.7</target>
+          <source>1.8</source>
+          <target>1.8</target>
         </configuration>
       </plugin>
     </plugins>


[03/50] archiva git commit: Fix i18n string for JPA RBac Manager

Posted by ma...@apache.org.
Fix i18n string for JPA RBac Manager


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/203de64d
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/203de64d
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/203de64d

Branch: refs/heads/citest
Commit: 203de64d1993741fb80eb5771751a0769b9e1428
Parents: 2164ef7
Author: Martin Stockhammer <ma...@apache.org>
Authored: Mon Oct 24 22:03:48 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Mon Oct 24 22:03:48 2016 +0200

----------------------------------------------------------------------
 .../src/main/resources/org/apache/archiva/i18n/default.properties  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/203de64d/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
index b5784b6..5b8e0c7 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
@@ -673,7 +673,7 @@ redback.runtime.users.cache.title=Users Cache
 
 archiva.redback.rbacmanager.ldap=LDAP RBac Manager
 archiva.redback.rbacmanager.jdo=Database RBac Manager
-archiva.redback.rbackmanager.jpa=Database JPA RBac Manager
+archiva.redback.rbacmanager.jpa=Database JPA RBac Manager
 archiva.redback.rbacmanager.cached=Cached RBac Manager
 redback.runtime.rbac-managers.impls.chose=RbacManager(s) chosen
 redback.runtime.rbac-managers.impls.available=Available RbacManagers


[30/50] archiva git commit: Fix for initialization problems with new spring version

Posted by ma...@apache.org.
Fix for initialization problems with new spring version


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/2cc9dc8b
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/2cc9dc8b
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/2cc9dc8b

Branch: refs/heads/citest
Commit: 2cc9dc8b4af78e78d46aab4b0472c2a710d5c740
Parents: 7e6ad27
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun May 21 22:38:21 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun May 21 22:38:21 2017 +0200

----------------------------------------------------------------------
 .../repository/jcr/JcrRepositorySessionFactory.java     | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/2cc9dc8b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java
index 8589ecb..1c51dfc 100644
--- a/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java
+++ b/archiva-modules/plugins/metadata-store-jcr/src/main/java/org/apache/archiva/metadata/repository/jcr/JcrRepositorySessionFactory.java
@@ -57,7 +57,7 @@ public class JcrRepositorySessionFactory
     @Inject
     private Repository repository;
 
-    @Inject
+    // Lazy evaluation to avoid problems with circular dependencies during initialization
     private MetadataResolver metadataResolver;
 
     @Inject
@@ -75,7 +75,7 @@ public class JcrRepositorySessionFactory
             //  API.
             MetadataRepository metadataRepository = new JcrMetadataRepository( metadataFacetFactories, repository );
 
-            return new RepositorySession( metadataRepository, metadataResolver );
+            return new RepositorySession( metadataRepository, getMetadataResolver() );
         }
         catch ( RepositoryException e )
         {
@@ -84,6 +84,14 @@ public class JcrRepositorySessionFactory
         }
     }
 
+    // Lazy evaluation to avoid problems with circular dependencies during initialization
+    private MetadataResolver getMetadataResolver() {
+        if (this.metadataResolver==null) {
+            this.metadataResolver = applicationContext.getBean( MetadataResolver.class );
+        }
+        return this.metadataResolver;
+    }
+
     @PostConstruct
     public void initialize()
         throws Exception


[41/50] archiva git commit: Finish migrating tests to Webdriver

Posted by ma...@apache.org.
Finish migrating tests to Webdriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/8183ff19
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/8183ff19
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/8183ff19

Branch: refs/heads/citest
Commit: 8183ff19eb4b02350c452c2c8f9b6518d7c1aae9
Parents: d31ce65
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Jun 9 16:46:52 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Jun 9 16:46:52 2017 +0200

----------------------------------------------------------------------
 .../archiva/web/test/ArchivaAdminTest.java      |  5 ++++-
 .../archiva/web/test/RepositoryAdminTest.java   | 20 ++++++++++++-----
 .../archiva/web/test/RolesManagementTest.java   | 12 +++++++---
 .../web/test/parent/AbstractArchivaTest.java    | 23 +++++++++++++++-----
 .../web/test/parent/AbstractSeleniumTest.java   |  2 +-
 5 files changed, 45 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/8183ff19/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
index 5a9d156..3e177b2 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
@@ -21,6 +21,8 @@ package org.apache.archiva.web.test;
 
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
 import org.junit.Test;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
 
 public class ArchivaAdminTest
     extends AbstractArchivaTest
@@ -30,6 +32,7 @@ public class ArchivaAdminTest
     public void testHome()
     {
         getWebDriver().get( baseUrl );
-        assertPage( "Apache Archiva" );
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 30);
+        wait.until(ExpectedConditions.titleContains("Apache Archiva"));
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/8183ff19/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
index 4728e40..0ea8580 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
@@ -24,11 +24,14 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.openqa.selenium.By;
 import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.WebElement;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 import org.openqa.selenium.support.ui.ExpectedCondition;
 import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
 
+import java.util.List;
+
 /**
  * Based on LoginTest of Emmanuel Venisse test.
  *
@@ -45,8 +48,9 @@ public class RepositoryAdminTest
     public void testManagedRepository()
     {
         login( getAdminUsername(), getAdminPassword() );
-        clickLinkWithLocator( "menu-repositories-list-a");
         WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
+        wait.until(ExpectedConditions.elementToBeClickable(By.id("menu-repositories-list-a")));
+        clickLinkWithLocator( "menu-repositories-list-a");
         wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("managed-repositories-view-a")));
         clickLinkWithXPath( "//a[@href='#remote-repositories-content']");
         wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")));
@@ -80,12 +84,16 @@ public class RepositoryAdminTest
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("user-messages"),"ProxyConnector added"));
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "myrepoid" ));
-        clickLinkWithXPath( "//i[contains(concat(' ',normalize-space(@class),' '),' icon-resize-vertical ')]/../..", true );
+        clickLinkWithXPath( "//i[contains(@class,'icon-resize-vertical')]//ancestor::a");
+        // This is needed here for HTMLUnit Tests. Currently do not know why, wait is not working for the
+        // list entries down
+        waitPage();
+        WebElement el = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("proxy-connector-edit-order-div")));
         assertTextPresent( "internal" );
-        // order test
-        Assert.assertTrue( "First repo is myrepo",findElement("//div[@id='proxy-connector-edit-order-div']/div[1]").getText().contains("myrepoid"));
-        Assert.assertTrue( "Second repo is central",findElement("//div[@id='proxy-connector-edit-order-div']/div[2]" ).getText().contains( "central" ));
-             
+        List<WebElement> repos = el.findElements(By.xpath("./div"));
+        Assert.assertTrue("First repo is myrepo", repos.get(0).getText().contains("myrepoid"));
+        Assert.assertTrue("Second repo is central", repos.get(1).getText().contains("central"));
+
         // works until this point
         /*getSelenium().mouseDown( "xpath=//div[@id='proxy-connector-edit-order-div']/div[1]" );
         getSelenium().mouseMove( "xpath=//div[@id='proxy-connector-edit-order-div']/div[2]" );

http://git-wip-us.apache.org/repos/asf/archiva/blob/8183ff19/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RolesManagementTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RolesManagementTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RolesManagementTest.java
index 1a13488..b31ab23 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RolesManagementTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RolesManagementTest.java
@@ -22,6 +22,9 @@ import org.apache.archiva.web.test.parent.AbstractArchivaTest;
 import org.apache.commons.lang.StringUtils;
 import org.junit.Assert;
 import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
 
 
 /**
@@ -36,14 +39,17 @@ public class RolesManagementTest
         throws Exception
     {
         login( getAdminUsername(), getAdminPassword() );
-        clickLinkWithLocator( "menu-roles-list-a", true );
-        assertTextPresent( "Archiva System Administrator " );
+        clickLinkWithLocator( "menu-roles-list-a");
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("roles-view"),"Archiva System Administrator"));
         Assert.assertTrue( StringUtils.isEmpty( getText( "role-description-Guest" ) ) );
         clickLinkWithLocator( "edit-role-Guest" );
+        wait.until(ExpectedConditions.elementToBeClickable(By.id("role-edit-description-save")));
         String desc = "The guest description";
         setFieldValue( "role-edit-description", desc );
         clickButtonWithLocator( "role-edit-description-save" );
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("user-messages"), "Role Guest updated."));
         clickLinkWithLocator( "roles-view-tabs-a-roles-grid" );
-        Assert.assertTrue( StringUtils.equals( desc, getText( "role-description-Guest" ) ) );
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("role-description-Guest"), desc));
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/8183ff19/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
index 54a20d5..4409ae3 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
@@ -2,6 +2,9 @@ package org.apache.archiva.web.test.parent;
 
 import org.junit.runner.RunWith;
 import org.junit.runners.BlockJUnit4ClassRunner;
+import org.openqa.selenium.By;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
 
 import java.io.File;
 import java.io.IOException;
@@ -97,9 +100,11 @@ public abstract class AbstractArchivaTest
                              boolean valid )
     {
         login( getAdminUsername(), getAdminPassword() );
-        clickLinkWithLocator( "menu-users-list-a", true );
-        clickLinkWithLocator( "users-view-tabs-li-user-edit-a", true );
-
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
+        clickLinkWithLocator( "menu-users-list-a");
+        wait.until(ExpectedConditions.elementToBeClickable(By.id("users-view-tabs-li-user-edit-a")));
+        clickLinkWithLocator( "users-view-tabs-li-user-edit-a");
+        wait.until(ExpectedConditions.elementToBeClickable(By.id("user-create-form-register-button")));
         assertCreateUserPage();
         setFieldValue( "username", userName );
         setFieldValue( "fullname", fullName );
@@ -107,8 +112,9 @@ public abstract class AbstractArchivaTest
         setFieldValue( "password", password );
         setFieldValue( "confirmPassword", confirmPassword );
 
-        clickLinkWithLocator( "user-create-form-register-button", true );
+        clickLinkWithLocator( "user-create-form-register-button");
 
+        wait.until(ExpectedConditions.presenceOfElementLocated(By.id("users-grid-user-id-" + userName)));
         assertTextPresent( "User " + userName + " created." );
         assertElementPresent( "users-grid-user-id-" + userName );
 
@@ -131,13 +137,17 @@ public abstract class AbstractArchivaTest
 
     public void deleteUser( String userName, String fullName, String emailAd, boolean validated, boolean locked )
     {
-        clickLinkWithLocator( "menu-users-list-a", true );
+        clickLinkWithLocator( "menu-users-list-a");
+        WebDriverWait wait = new WebDriverWait(getWebDriver(),10);
+        wait.until(ExpectedConditions.elementToBeClickable(By.id("users-grid-delete-" + userName)));
         assertTextPresent( userName );
         assertTextPresent( fullName );
 
         clickLinkWithLocator( "users-grid-delete-" + userName );
+        wait.until(ExpectedConditions.elementToBeClickable(By.id("dialog-confirm-modal-ok")));
 
         clickLinkWithLocator( "dialog-confirm-modal-ok" );
+        wait.until(ExpectedConditions.elementToBeClickable(By.id("alert-message-success-close-a" )));
         assertTextPresent( "User " + userName + " deleted." );
 
         clickLinkWithLocator( "alert-message-success-close-a" );
@@ -175,7 +185,8 @@ public abstract class AbstractArchivaTest
     protected void logout()
     {
         clickLinkWithLocator( "logout-link-a" );
-        waitPage();
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[text()='Login']//ancestor::a")));
         assertTextNotPresent( "Current User:" );
         assertLinkNotVisible( "Edit Details" );
         assertLinkNotVisible( "Logout" );

http://git-wip-us.apache.org/repos/asf/archiva/blob/8183ff19/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 2245910..d6d4a1f 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -355,7 +355,7 @@ public abstract class AbstractSeleniumTest
 
     public void assertPage( String title )
     {
-        Assert.assertEquals( getTitle(), title );
+        Assert.assertEquals( title,  getTitle());
     }
 
     public String getTitle()


[38/50] archiva git commit: Adding intellij ignore pattern

Posted by ma...@apache.org.
Adding intellij ignore pattern


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/422af343
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/422af343
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/422af343

Branch: refs/heads/citest
Commit: 422af343f147b63a1efd97627d6553af944c75ff
Parents: 69c6b59
Author: Martin Stockhammer <ma...@apache.org>
Authored: Mon Jun 5 22:33:50 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Mon Jun 5 22:33:50 2017 +0200

----------------------------------------------------------------------
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/422af343/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index d5addeb..4799988 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ build
 *.ipr
 *.iws
 out/
+.indexer
 
 #jenv
 .java-version


[37/50] archiva git commit: Updating tests for WebDriver and jetty backend

Posted by ma...@apache.org.
Updating tests for WebDriver and jetty backend


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/69c6b594
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/69c6b594
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/69c6b594

Branch: refs/heads/citest
Commit: 69c6b594b1bc761527157b3a8970d6e64e582ea9
Parents: 0bbedd7
Author: Martin Stockhammer <ma...@apache.org>
Authored: Mon Jun 5 22:31:48 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Mon Jun 5 22:31:48 2017 +0200

----------------------------------------------------------------------
 .../archiva-web/archiva-webapp-test/pom.xml     | 267 +++++++++++++++----
 .../archiva/web/test/WebDriverBrowseTest.java   |  72 +++--
 .../apache/archiva/web/test/WebDriverTest.java  |  52 ++--
 .../web/test/parent/AbstractSeleniumTest.java   |  18 +-
 .../web/test/tools/WebdriverInitializer.java    | 118 --------
 .../web/test/tools/WebdriverUtility.java        | 204 ++++++++++++++
 .../src/test/resources/log4j.xml                |  41 ---
 .../src/test/resources/log4j2-test.xml          |   3 +-
 .../src/test/resources/logging/log4j.xml        |  70 -----
 .../src/test/resources/logging/log4j2-test.xml  |   4 +-
 10 files changed, 473 insertions(+), 376 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index ad2b77f..db11a19 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -30,14 +30,14 @@
   <name>Archiva Web :: Javascript Application Tests</name>
 
   <properties>
-    <webappDirectory>${project.build.directory}/tomcat7x/webapps/archiva</webappDirectory>
-    <container.test.port>0</container.test.port>
-    <tomcat.propertiesPortFilePath>${project.build.directory}/tomcat-port.properties</tomcat.propertiesPortFilePath>
+    <webappDirectory>${project.build.directory}/container/webapps/archiva</webappDirectory>
+    <container.propertiesPortFilePath>${project.build.directory}/container-port.properties</container.propertiesPortFilePath>
     <maxWaitTimeInMs>10000</maxWaitTimeInMs>
-
     <selenium-server.version>3.4.0</selenium-server.version>
     <fluentlenium.version>3.2.0</fluentlenium.version>
     <fluentlenium.festassert.version>0.13.2</fluentlenium.festassert.version>
+    <seleniumHost></seleniumHost>
+    <seleniumPort></seleniumPort>
 
     <browserPath></browserPath>
   </properties>
@@ -67,6 +67,8 @@
         </exclusion>
       </exclusions>
     </dependency>
+
+    <!-- Selenium dependencies -->
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
       <artifactId>selenium-java</artifactId>
@@ -81,39 +83,29 @@
           <groupId>javax.servlet</groupId>
           <artifactId>javax.servlet-api</artifactId>
         </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.seleniumhq.selenium.client-drivers</groupId>
-      <artifactId>selenium-java-client-driver</artifactId>
-      <scope>test</scope>
-      <exclusions>
         <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-io</artifactId>
         </exclusion>
         <exclusion>
-          <groupId>javax.servlet</groupId>
-          <artifactId>javax.servlet-api</artifactId>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-client</artifactId>
         </exclusion>
-      </exclusions>
-    </dependency>
-    <dependency>
-      <groupId>org.seleniumhq.selenium</groupId>
-      <artifactId>selenium-remote-driver</artifactId>
-      <scope>test</scope>
-      <version>${selenium-server.version}</version>
-      <exclusions>
         <exclusion>
-          <groupId>commons-logging</groupId>
-          <artifactId>commons-logging</artifactId>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-util</artifactId>
         </exclusion>
         <exclusion>
-          <groupId>javax.servlet</groupId>
-          <artifactId>javax.servlet-api</artifactId>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-common</artifactId>
         </exclusion>
       </exclusions>
     </dependency>
+
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
       <artifactId>selenium-leg-rc</artifactId>
@@ -125,21 +117,37 @@
           <artifactId>testng</artifactId>
         </exclusion>
         <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+        <exclusion>
           <groupId>javax.servlet</groupId>
           <artifactId>javax.servlet-api</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-io</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-client</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-util</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-common</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-exec</artifactId>
-      <version>1.3</version>
-    </dependency>
-    <dependency>
-      <groupId>org.seleniumhq.selenium</groupId>
-      <artifactId>htmlunit-driver</artifactId>
-      <version>2.26</version>
-    </dependency>
+
+
 
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
@@ -155,6 +163,26 @@
           <groupId>javax.servlet</groupId>
           <artifactId>javax.servlet-api</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-io</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-util</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-client</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-api</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.eclipse.jetty.websocket</groupId>
+          <artifactId>websocket-common</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
 
@@ -179,6 +207,8 @@
       <scope>test</scope>
     </dependency>
 
+    <!-- End of Selenium dependencies -->
+
     <dependency>
       <groupId>xerces</groupId>
       <artifactId>xercesImpl</artifactId>
@@ -233,9 +263,36 @@
       <artifactId>log4j-1.2-api</artifactId>
     </dependency>
 
+
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-io</artifactId>
+      <version>${jettyVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-util</artifactId>
+      <version>${jettyVersion}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty.websocket</groupId>
+      <artifactId>websocket-api</artifactId>
+      <version>${jettyVersion}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.jetty.websocket</groupId>
+      <artifactId>websocket-client</artifactId>
+      <version>${jettyVersion}</version>
+      <scope>test</scope>
+    </dependency>
+
+
   </dependencies>
 
   <build>
+
     <testResources>
       <testResource>
         <directory>src/test/resources</directory>
@@ -264,6 +321,27 @@
       </plugins>
     </pluginManagement>
     <plugins>
+
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>build-helper-maven-plugin</artifactId>
+        <configuration>
+          <portNames>
+            <portName>container.http.port</portName>
+            <portName>container.stop.port</portName>
+          </portNames>
+        </configuration>
+        <executions>
+          <execution>
+            <id>reserve-port</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>reserve-network-port</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
         <executions>
@@ -288,17 +366,19 @@
 
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
+        <artifactId>maven-failsafe-plugin</artifactId>
         <configuration>
           <redirectTestOutputToFile>false</redirectTestOutputToFile>
           <runOrder>alphabetical</runOrder>
+          <includes>
+            <include>**/*Test.java</include>
+          </includes>
         </configuration>
         <executions>
           <execution>
             <id>integration-tests</id>
-            <phase>integration-test</phase>
             <goals>
-              <goal>test</goal>
+              <goal>integration-test</goal>
             </goals>
             <configuration>
               <systemPropertyVariables>
@@ -308,11 +388,19 @@
                 <maxWaitTimeInMs>${maxWaitTimeInMs}</maxWaitTimeInMs>
                 <seleniumHost>${seleniumHost}</seleniumHost>
                 <seleniumPort>${seleniumPort}</seleniumPort>
-                <seleniumRemote>${seleniumRemote}</seleniumRemote>
-                <tomcat.propertiesPortFilePath>${tomcat.propertiesPortFilePath}</tomcat.propertiesPortFilePath>
+                <container.propertiesPortFilePath>${container.propertiesPortFilePath}</container.propertiesPortFilePath>
+                <container.http.port>${container.http.port}</container.http.port>
               </systemPropertyVariables>
             </configuration>
+
           </execution>
+          <execution>
+            <id>verify</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+
         </executions>
       </plugin>
     </plugins>
@@ -402,7 +490,82 @@
               </execution>
             </executions>
           </plugin>
+
+
           <plugin>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-maven-plugin</artifactId>
+            <version>9.4.5.v20170502</version>
+            <configuration>
+              <stopKey>archivastop</stopKey>
+              <stopPort>${container.stop.port}</stopPort>
+              <stopWait>30</stopWait>
+              <httpConnector>
+                <port>${container.http.port}</port>
+              </httpConnector>
+            </configuration>
+            <dependencies>
+              <dependency>
+                <groupId>org.apache.derby</groupId>
+                <artifactId>derby</artifactId>
+                <version>${derbyVersion}</version>
+              </dependency>
+              <dependency>
+                <groupId>javax.mail</groupId>
+                <artifactId>mail</artifactId>
+                <version>${javaxMailVersion}</version>
+              </dependency>
+
+            </dependencies>
+            <executions>
+              <execution>
+                <id>jetty-run</id>
+                <goals>
+                  <goal>deploy-war</goal>
+                </goals>
+                <phase>pre-integration-test</phase>
+                <configuration>
+                  <daemon>true</daemon>
+                  <webApp>
+                    <contextPath>/archiva</contextPath>
+                    <jettyEnvXml>${project.build.testOutputDirectory}/jetty/jetty-env.xml</jettyEnvXml>
+                  </webApp>
+                  <war>${webappDirectory}</war>
+                  <systemProperties>
+                    <systemProperty>
+                      <name>appserver.base</name>
+                      <value>${project.build.directory}/appserver-base</value>
+                    </systemProperty>
+                    <systemProperty>
+                      <name>appserver.home</name>
+                      <value>${project.build.directory}/appserver-base</value>
+                    </systemProperty>
+                    <systemProperty>
+                      <name>derby.system.home</name>
+                      <value>${project.build.directory}</value>
+                    </systemProperty>
+                    <systemProperty>
+                      <name>archiva.devMode</name>
+                      <value>true</value>
+                    </systemProperty>
+                    <systemProperty>
+                      <name>openjpa.Log</name>
+                      <value>${openjpa.Log}</value>
+                    </systemProperty>
+                  </systemProperties>
+                </configuration>
+              </execution>
+              <execution>
+                <id>jetty-shutdown</id>
+                <goals>
+                  <goal>stop</goal>
+                </goals>
+                <phase>post-integration-test</phase>
+              </execution>
+            </executions>
+          </plugin>
+
+<!--          <plugin>
             <groupId>org.apache.tomcat.maven</groupId>
             <artifactId>tomcat7-maven-plugin</artifactId>
             <dependencies>
@@ -426,7 +589,7 @@
                 <phase>pre-integration-test</phase>
                 <configuration>
                   <path>/archiva</path>
-                  <port>${container.test.port}</port>
+                  <port>${container.http.port}</port>
                   <uriEncoding>UTF-8</uriEncoding>
                   <warDirectory>${webappDirectory}</warDirectory>
                   <fork>true</fork>
@@ -439,7 +602,7 @@
                     <openjpa.Log>${openjpa.Log}</openjpa.Log>
                   </systemProperties>
                   <contextFile>${project.build.testOutputDirectory}/archiva.xml</contextFile>
-                  <propertiesPortFilePath>${tomcat.propertiesPortFilePath}</propertiesPortFilePath>
+                  <propertiesPortFilePath>${container.propertiesPortFilePath}</propertiesPortFilePath>
                   <useNaming>true</useNaming>
                 </configuration>
               </execution>
@@ -451,7 +614,7 @@
                 <phase>post-integration-test</phase>
               </execution>
             </executions>
-          </plugin>
+          </plugin>-->
         </plugins>
       </build>
     </profile>
@@ -463,20 +626,10 @@
         </property>
       </activation>
       <properties>
-        <baseUrl>http://localhost:${container.test.port}/archiva/index.html?request_lang=en</baseUrl>
-      </properties>
-    </profile>
-    <profile>
-      <id>start-selenium</id>
-      <activation>
-        <property>
-          <name>!seleniumHost</name>
-        </property>
-      </activation>
-      <properties>
-        <seleniumRemote>false</seleniumRemote>
+        <baseUrl>http://localhost:${container.http.port}/archiva</baseUrl>
       </properties>
     </profile>
+
     <profile>
       <id>htmlunit</id>
       <activation>

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
index 7f83b34..6838cc2 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
@@ -18,10 +18,11 @@ package org.apache.archiva.web.test;
  * under the License.
  */
 
-import junit.framework.Assert;
-import org.apache.archiva.web.test.tools.WebdriverInitializer;
+import org.fluentlenium.configuration.ConfigurationProperties;
+import org.fluentlenium.configuration.FluentConfiguration;
+import org.junit.Assert;
+import org.apache.archiva.web.test.tools.WebdriverUtility;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
 import org.fluentlenium.adapter.junit.FluentTest;
 import org.fluentlenium.core.domain.FluentList;
 import org.fluentlenium.core.domain.FluentWebElement;
@@ -29,11 +30,16 @@ import org.junit.Before;
 import org.junit.Test;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
 
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
@@ -42,90 +48,75 @@ import static org.assertj.core.api.Assertions.assertThat;
 /**
  * @author Olivier Lamy
  */
+@FluentConfiguration(driverLifecycle = ConfigurationProperties.DriverLifecycle.CLASS)
 public class WebDriverBrowseTest
-        extends FluentTest
+    extends FluentTest
 {
 
+    final Logger log = LoggerFactory.getLogger( WebDriverBrowseTest.class );
+
     @Override
     public void takeScreenShot( String fileName )
     {
-        File fileNameHTML = new File( "target", "errorshtmlsnap" );
-        try
-        {
-            // save html to have a minimum feedback if jenkins firefox not up
-            fileNameHTML = new File( fileNameHTML, fileName );
-            FileUtils.writeStringToFile( new File ( new File( "target", "errorshtmlsnap" ) , fileName + ".html"), getDriver().getPageSource() );
-
-        }
-        catch ( IOException e )
-        {
-            e.printStackTrace();
-        }
-        super.takeScreenShot( fileNameHTML.getAbsolutePath() );
-
+        WebdriverUtility.takeScreenShot( fileName, getDriver(), (a)->super.takeScreenShot( a ) );
     }
 
     @Before
     public void init()
     {
 
-        setScreenshotMode( TriggerMode.AUTOMATIC_ON_FAIL);
+        setScreenshotMode( TriggerMode.AUTOMATIC_ON_FAIL );
         setDriverLifecycle( DriverLifecycle.CLASS );
 
     }
 
     @Test
     public void simpletest()
-            throws Exception
+        throws Exception
     {
         Properties p = new Properties();
         p.load( this.getClass().getClassLoader().getResourceAsStream( "test.properties" ) );
 
-        Properties tomcatPortProperties = new Properties();
-        tomcatPortProperties.load(
-                new FileInputStream( new File( System.getProperty( "tomcat.propertiesPortFilePath" ) ) ) );
-
-        int tomcatPort = Integer.parseInt( tomcatPortProperties.getProperty( "tomcat.maven.http.port" ) );
-
-        goTo( "http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en" );
+        String baseUrl = WebdriverUtility.getBaseUrl();
+        String url = baseUrl + "/index.html?request_lang=en";
+        goTo( url );
 
         // wait until topbar-menu-container is feeded
-        await().atMost( 5, TimeUnit.SECONDS ).until( $("#topbar-menu" )).present();
+        await().atMost( 5, TimeUnit.SECONDS ).untilPredicate( ( fl ) -> $( "#topbar-menu" ).present() );
 
         FluentList<FluentWebElement> elements = find( "#create-admin-link-a" );
-
         if ( !elements.isEmpty() && elements.get( 0 ).displayed() )
         {
             WebElement webElement = elements.get( 0 ).getElement();
             Assert.assertEquals( "Create Admin User", webElement.getText() );
 
             webElement.click();
-            await().atMost( 2, TimeUnit.SECONDS ).until($( "#user-create" )).present();
+            await().atMost( 2, TimeUnit.SECONDS ).untilPredicate( ( fl ) -> $( "#user-create" ).present() );
             assertThat( find( "#username" ).value().equals( "admin" ) );
             assertThat( find( "#password" ).value().isEmpty() );
             assertThat( find( "#confirmPassword" ).value().isEmpty() );
             assertThat( find( "#email" ).value().isEmpty() );
 
-            $("#fullname").fill().with( p.getProperty( "ADMIN_FULLNAME" ) );
-            $("#email").fill().with( p.getProperty( "ADMIN_EMAIL" ) );
-            $("#password").fill().with( p.getProperty( "ADMIN_PASSWORD" ) );
-            $("#confirmPassword").fill().with( p.getProperty( "ADMIN_PASSWORD" ) );
+            $( "#fullname" ).fill().with( p.getProperty( "ADMIN_FULLNAME" ) );
+            $( "#email" ).fill().with( p.getProperty( "ADMIN_EMAIL" ) );
+            $( "#password" ).fill().with( p.getProperty( "ADMIN_PASSWORD" ) );
+            $( "#confirmPassword" ).fill().with( p.getProperty( "ADMIN_PASSWORD" ) );
             find( "#user-create-form-register-button" ).click();
 
-            await().atMost( 2, TimeUnit.SECONDS ).until($("#logout-link" )).present();
+            await().atMost( 2, TimeUnit.SECONDS ).untilPredicate( ( fl ) -> $( "#logout-link" ).present() );
 
             FluentList<FluentWebElement> elementss = find( "#menu-find-browse-a" );
             WebElement webElsement = elementss.get( 0 ).getElement();
             webElsement.click();
-            await().atMost( 2, TimeUnit.SECONDS ).until($("#main_browse_result" )).present();
+            await().atMost( 5, TimeUnit.SECONDS ).untilPredicate( ( fl ) -> $( "#main_browse_result" ).present() );
             // give me search page :( not  browse page
 
             takeScreenShot( "search.png" );
 
-            goTo( "http://localhost:" + tomcatPort + "/archiva/index.html#browse?request_lang=en" );
+            goTo( baseUrl + "/index.html#browse?request_lang=en" );
             takeScreenShot( "browse.png" );
             // give me a browse page
-            
+
         }
         else
         {
@@ -137,7 +128,8 @@ public class WebDriverBrowseTest
     }
 
     @Override
-    public WebDriver newWebDriver() {
-        return WebdriverInitializer.newWebDriver();
+    public WebDriver newWebDriver()
+    {
+        return WebdriverUtility.newWebDriver();
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
index 5a020e2..c2980e9 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
@@ -18,53 +18,41 @@ package org.apache.archiva.web.test;
  * under the License.
  */
 
-import junit.framework.Assert;
-import org.apache.archiva.web.test.tools.WebdriverInitializer;
+import org.junit.Assert;
+import org.apache.archiva.web.test.tools.WebdriverUtility;
 import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
 import org.fluentlenium.adapter.junit.FluentTest;
+import org.fluentlenium.configuration.ConfigurationProperties;
+import org.fluentlenium.configuration.FluentConfiguration;
 import org.fluentlenium.core.domain.FluentList;
 import org.fluentlenium.core.domain.FluentWebElement;
 import org.junit.Before;
 import org.junit.Test;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
-import org.openqa.selenium.chrome.ChromeDriver;
-import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.ie.InternetExplorerDriver;
-import org.openqa.selenium.remote.DesiredCapabilities;
-import org.openqa.selenium.remote.RemoteWebDriver;
-import org.openqa.selenium.safari.SafariDriver;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
 import java.nio.file.Paths;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
 
 /**
  * @author Olivier Lamy
  */
+@FluentConfiguration(driverLifecycle = ConfigurationProperties.DriverLifecycle.CLASS)
 public class WebDriverTest
         extends FluentTest
 {
 
-
+    final Logger log = LoggerFactory.getLogger( WebDriver.class );
 
     @Override
-    public void takeScreenShot(String fileName) {
-        try {
-            // save html to have a minimum feedback if jenkins firefox not up
-            File fileNameHTML = new File(fileName + ".html");
-            FileUtils.writeStringToFile(fileNameHTML, getDriver().getPageSource());
-        } catch (IOException e) {
-            System.out.print(e.getMessage());
-            e.printStackTrace();
-        }
-        super.takeScreenShot(fileName);
+    public void takeScreenShot( String fileName )
+    {
+        WebdriverUtility.takeScreenShot( fileName, getDriver(), (a)->super.takeScreenShot( a ) );
     }
 
 
@@ -79,18 +67,12 @@ public class WebDriverTest
     public void simpletest()
             throws Exception {
 
-        Properties tomcatPortProperties = new Properties();
-        tomcatPortProperties.load(
-                new FileInputStream(new File(System.getProperty("tomcat.propertiesPortFilePath"))));
-
-        int tomcatPort = Integer.parseInt(tomcatPortProperties.getProperty("tomcat.maven.http.port"));
-        String url = "http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en";
-        System.err.println("URL: "+url);
+        String url = WebdriverUtility.getBaseUrl()+ "/index.html?request_lang=en";
         goTo(url);
 
         // wait until topbar-menu-container is feeded
-        await().atMost(10, TimeUnit.SECONDS).until($("#topbar-menu")).present();
-
+        //await().atMost(20, TimeUnit.SECONDS).until($("#topbar-menu")).present();
+        await().untilPredicate((fl) ->$("#topbar-menu").present());
         FluentList<FluentWebElement> elements = find("#create-admin-link-a");
 
         if (!elements.isEmpty() && elements.get(0).displayed()) {
@@ -106,6 +88,6 @@ public class WebDriverTest
 
     @Override
     public WebDriver newWebDriver() {
-        return WebdriverInitializer.newWebDriver();
+        return WebdriverUtility.newWebDriver();
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index a8403cd..daec10b 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -19,12 +19,11 @@ package org.apache.archiva.web.test.parent;
  * under the License.
  */
 
-import com.thoughtworks.selenium.DefaultSelenium;
 import com.thoughtworks.selenium.Selenium;
+//import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
 import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
 import org.apache.archiva.web.test.tools.ArchivaSeleniumExecutionRule;
-import org.apache.archiva.web.test.tools.WebdriverInitializer;
-import org.apache.xpath.operations.Bool;
+import org.apache.archiva.web.test.tools.WebdriverUtility;
 import org.junit.Assert;
 import org.junit.Rule;
 
@@ -84,13 +83,7 @@ public abstract class AbstractSeleniumTest
         p = new Properties();
         p.load( this.getClass().getClassLoader().getResourceAsStream( "test.properties" ) );
 
-        Properties tomcatPortProperties = new Properties();
-        tomcatPortProperties.load(
-            new FileInputStream( new File( System.getProperty( "tomcat.propertiesPortFilePath" ) ) ) );
-
-        int tomcatPort = Integer.parseInt( tomcatPortProperties.getProperty( "tomcat.maven.http.port" ) );
-
-        baseUrl = "http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en";
+        baseUrl = WebdriverUtility.getBaseUrl()+"/index.html?request_lang=en";
 
         open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs, remoteSelenium );
         archivaSeleniumExecutionRule.selenium = selenium;
@@ -118,8 +111,9 @@ public abstract class AbstractSeleniumTest
         {
             if ( getSelenium() == null )
             {
-                WebDriver driver = WebdriverInitializer.newWebDriver(browser, seleniumHost, seleniumPort, remoteSelenium);
-                selenium = new WebDriverBackedSelenium(driver, baseUrl);
+                WebDriver driver = WebdriverUtility.newWebDriver(browser, seleniumHost, seleniumPort, remoteSelenium);
+                WebDriverBackedSelenium selenium = new WebDriverBackedSelenium(driver, baseUrl);
+                selenium.getWrappedDriver();
                 selenium.start();
                 selenium.setTimeout( Integer.toString( maxWaitTimeInMs ) );
             }

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java
deleted file mode 100644
index c3ddc1a..0000000
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.archiva.web.test.tools;
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.lang3.StringUtils;
-import org.openqa.selenium.Capabilities;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.chrome.ChromeDriver;
-import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.htmlunit.HtmlUnitDriver;
-import org.openqa.selenium.ie.InternetExplorerDriver;
-import org.openqa.selenium.remote.DesiredCapabilities;
-import org.openqa.selenium.remote.RemoteWebDriver;
-import org.openqa.selenium.safari.SafariDriver;
-
-import java.net.MalformedURLException;
-import java.net.URL;
-
-/**
- * Created by martin_s on 04.06.17.
- */
-public class WebdriverInitializer
-{
-
-    public static WebDriver newWebDriver() {
-        String seleniumBrowser = System.getProperty("selenium.browser");
-        String seleniumHost = System.getProperty("seleniumHost", "localhost");
-        int seleniumPort = Integer.getInteger("seleniumPort", 4444);
-        boolean seleniumRemote = Boolean.parseBoolean(System.getProperty("seleniumRemote","false"));
-        return newWebDriver(seleniumBrowser,seleniumHost, seleniumPort,seleniumRemote);
-    }
-
-    public static WebDriver newWebDriver(String seleniumBrowser, String seleniumHost, int seleniumPort, boolean seleniumRemote) {
-        try {
-
-            if ( StringUtils.contains(seleniumBrowser, "chrome")) {
-                if (seleniumRemote)
-                {
-                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
-                        DesiredCapabilities.chrome()
-                    );
-                } else {
-                    return new ChromeDriver(  );
-                }
-            }
-
-            if (StringUtils.contains(seleniumBrowser, "safari")) {
-                if (seleniumRemote)
-                {
-                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
-                        DesiredCapabilities.safari()
-                    );
-                } else {
-                    return new SafariDriver();
-                }
-            }
-
-            if (StringUtils.contains(seleniumBrowser, "iexplore")) {
-                if (seleniumRemote)
-                {
-                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
-                        DesiredCapabilities.internetExplorer()
-                    );
-                } else {
-                    new InternetExplorerDriver(  );
-                }
-            }
-
-            if (StringUtils.contains( seleniumBrowser, "firefox" ))
-            {
-                if ( seleniumRemote )
-                {
-                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
-                        DesiredCapabilities.firefox()
-                    );
-                }
-                else
-                {
-                    return new FirefoxDriver();
-                }
-            }
-
-            if ( seleniumRemote )
-            {
-                return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
-                    DesiredCapabilities.htmlUnit()
-                );
-            }
-            else
-            {
-                DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();
-                capabilities.setJavascriptEnabled( true );
-                capabilities.setVersion( "firefox-51" );
-                return new HtmlUnitDriver( capabilities  );
-            }
-
-        } catch (MalformedURLException e) {
-            throw new RuntimeException("Initializion of remote driver failed");
-        }
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
new file mode 100644
index 0000000..0011dc6
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
@@ -0,0 +1,204 @@
+package org.apache.archiva.web.test.tools;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.openqa.selenium.Capabilities;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.chrome.ChromeDriver;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.ie.InternetExplorerDriver;
+import org.openqa.selenium.remote.DesiredCapabilities;
+import org.openqa.selenium.remote.RemoteWebDriver;
+import org.openqa.selenium.safari.SafariDriver;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.Properties;
+import java.util.function.Consumer;
+import java.util.function.Function;
+
+/**
+ * Created by martin_s on 04.06.17.
+ */
+public class WebdriverUtility
+{
+
+    static final Logger log = LoggerFactory.getLogger( WebdriverUtility.class );
+
+    public static WebDriver newWebDriver() {
+        String seleniumBrowser = System.getProperty("selenium.browser");
+        String seleniumHost = System.getProperty("seleniumHost", "localhost");
+        int seleniumPort = Integer.getInteger("seleniumPort", 4444);
+        boolean seleniumRemote = Boolean.parseBoolean(System.getProperty("seleniumRemote","false"));
+        return newWebDriver(seleniumBrowser,seleniumHost, seleniumPort,seleniumRemote);
+    }
+
+    public static WebDriver newWebDriver(String seleniumBrowser, String seleniumHost, int seleniumPort, boolean seleniumRemote) {
+        try {
+
+            if ( StringUtils.contains(seleniumBrowser, "chrome")) {
+                if (seleniumRemote)
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.chrome()
+                    );
+                } else {
+                    return new ChromeDriver(  );
+                }
+            }
+
+            if (StringUtils.contains(seleniumBrowser, "safari")) {
+                if (seleniumRemote)
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.safari()
+                    );
+                } else {
+                    return new SafariDriver();
+                }
+            }
+
+            if (StringUtils.contains(seleniumBrowser, "iexplore")) {
+                if (seleniumRemote)
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.internetExplorer()
+                    );
+                } else {
+                    new InternetExplorerDriver(  );
+                }
+            }
+
+            if (StringUtils.contains( seleniumBrowser, "firefox" ))
+            {
+                if ( seleniumRemote )
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.firefox()
+                    );
+                }
+                else
+                {
+                    return new FirefoxDriver();
+                }
+            }
+
+            if ( seleniumRemote )
+            {
+                return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                    DesiredCapabilities.htmlUnit()
+                );
+            }
+            else
+            {
+                DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();
+                capabilities.setJavascriptEnabled( true );
+                capabilities.setVersion( "firefox-51" );
+                return new HtmlUnitDriver( capabilities  );
+            }
+
+        } catch (MalformedURLException e) {
+            throw new RuntimeException("Initializion of remote driver failed");
+        }
+
+    }
+
+    public static String getBaseUrl() {
+
+        if (System.getProperties().containsKey( "baseUrl" )) {
+            return System.getProperty("baseUrl");
+        }
+        int containerPort = 7777;
+        if (System.getProperties().containsKey("container.http.port")) {
+            containerPort = Integer.parseInt(System.getProperty("container.http.port"));
+        } else if (System.getProperties().containsKey("container.propertiesPortFilePath"))
+        {
+            Properties portProperties = new Properties();
+            try (InputStream inputStream = Files.newInputStream(Paths.get(System.getProperty("container.propertiesPortFilePath"))))
+            {
+                portProperties.load(inputStream);
+            }
+            catch ( IOException e )
+            {
+                log.error("Error during property loading with containger.propertiesPortFilePath");
+            }
+            if ( portProperties.containsKey( "tomcat.maven.http.port" ) )
+            {
+                containerPort = Integer.parseInt( portProperties.getProperty( "tomcat.maven.http.port" ) );
+            }
+            else
+            {
+                containerPort = Integer.parseInt( portProperties.getProperty( "container.http.port" ) );
+            }
+        }
+        return "http://localhost:" + containerPort+"/archiva";
+    }
+
+    public static void takeScreenShot( String fileName, WebDriver driver, Consumer<String> screenShotFunction) {
+        try
+        {
+            Path snapDir = Paths.get( "target", "errorshtmlsnap" );
+            if ( !Files.exists( snapDir ) )
+            {
+                Files.createDirectories( snapDir );
+            }
+            Path htmlFile = snapDir.resolve( fileName + ".html" );
+            Path screenShotFile = snapDir.resolve( fileName );
+            String pageSource=null;
+            String encoding="ISO-8859-1";
+            try
+            {
+                pageSource = ( (JavascriptExecutor) driver ).executeScript( "return document.documentElement.outerHTML;" ).toString();
+            } catch (Exception e) {
+                log.info("Could not create html source by javascript");
+                pageSource = driver.getPageSource();
+            }
+            if (pageSource.contains("encoding=\"")) {
+                encoding = pageSource.replaceFirst( ".*encoding=\"([^\"]+)\".*", "$1" );
+            }
+            FileUtils.writeStringToFile( htmlFile.toFile(), pageSource, encoding);
+            try
+            {
+                screenShotFunction.accept( screenShotFile.toAbsolutePath().toString() );
+            }
+            catch ( Exception e )
+            {
+                log.info( "Could not create screenshot: " + e.getMessage() );
+            }
+
+        }
+        catch ( IOException e )
+        {
+            log.info( "Creating screenshot failed " + e.getMessage() );
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j.xml
deleted file mode 100644
index 4957e2d..0000000
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-
-
-  <logger name="org.springframework">
-    <level value="ERROR"/>
-  </logger>
-
-  <root>
-    <priority value ="info" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
index dec6d75..61f9f01 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
@@ -19,7 +19,7 @@
   -->
 
 
-<configuration status="debug">
+<configuration status="info">
   <appenders>
     <Console name="console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
@@ -30,7 +30,6 @@
     <logger name="org.springframework" level="error"/>
     <logger name="com.gargoylesoftware.htmlunit.DefaultCssErrorHandler" level="error" />
     <logger name="com.gargoylesoftware.htmlunit.html.HtmlScript" level="error" />
-    <logger name="org.apache.http.wire" level="debug" />
 
     <root level="info">
       <appender-ref ref="console"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j.xml
deleted file mode 100644
index 8ddcde5..0000000
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-
-<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
-
-<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
-
-  <appender name="console" class="org.apache.log4j.ConsoleAppender">
-    <layout class="org.apache.log4j.PatternLayout">
-      <param name="ConversionPattern" value="%d [%t] %-5p %c %x - %m%n"/>
-    </layout>
-  </appender>
-
-  <logger name="JPOX">
-    <level value="error"/>
-  </logger>
-
-  <logger name="org.apache.commons.configuration.DefaultConfigurationBuilder">
-    <level value="error"/>
-  </logger>
-
-
-  <logger name="org.springframework">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.codehaus.plexus">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.codehaus.redback">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.apache.cxf">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.quartz">
-    <level value="ERROR"/>
-  </logger>
-
-  <logger name="org.apache.archiva">
-    <level value="INFO"/>
-  </logger>
-
-
-  <root>
-    <priority value="ERROR" />
-    <appender-ref ref="console" />
-  </root>
-
-</log4j:configuration>

http://git-wip-us.apache.org/repos/asf/archiva/blob/69c6b594/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j2-test.xml
index e9a65a5..6d550a8 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/logging/log4j2-test.xml
@@ -19,7 +19,7 @@
   -->
 
 
-<configuration status="debug">
+<configuration status="info">
   <appenders>
     <Console name="console" target="SYSTEM_OUT">
       <PatternLayout pattern="%d [%t] %-5p %c %x - %m%n"/>
@@ -39,6 +39,8 @@
 
     <logger name="org.apache.archiva.redback" level="error"/>
 
+    <logger name="org.apache.jackrabbit" level="error" />
+
     <logger name="org.apache.cxf" level="error"/>
 
     <logger name="org.quartz" level="error"/>


[36/50] archiva git commit: Migrating selenium tests

Posted by ma...@apache.org.
Migrating selenium tests


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/0bbedd72
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/0bbedd72
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/0bbedd72

Branch: refs/heads/citest
Commit: 0bbedd7201a85118c52cc0d5bca7d3804bfcf5c2
Parents: 878287b
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun Jun 4 18:20:40 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun Jun 4 18:20:40 2017 +0200

----------------------------------------------------------------------
 .../archiva-web/archiva-webapp-test/pom.xml     | 152 +++++++++++--------
 .../archiva/web/test/WebDriverBrowseTest.java   |  90 ++++-------
 .../apache/archiva/web/test/WebDriverTest.java  |  67 +++-----
 .../web/test/parent/AbstractSeleniumTest.java   |  30 +++-
 .../web/test/tools/WebdriverInitializer.java    | 118 ++++++++++++++
 .../src/test/resources/jetty/jetty-env.xml      |  48 ++++++
 .../src/test/resources/log4j2-test.xml          |   3 +
 .../archiva-web/archiva-webapp/pom.xml          |  12 ++
 .../archiva-webapp/src/test/jetty/jetty-env.xml |  30 ++++
 pom.xml                                         |   2 +-
 10 files changed, 374 insertions(+), 178 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index 1ba04f1..ad2b77f 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -35,9 +35,9 @@
     <tomcat.propertiesPortFilePath>${project.build.directory}/tomcat-port.properties</tomcat.propertiesPortFilePath>
     <maxWaitTimeInMs>10000</maxWaitTimeInMs>
 
-    <seleniumPluginVersion>2.3</seleniumPluginVersion>
-    <selenium-server.version>2.53.1</selenium-server.version>
-    <fluentlenium.version>0.10.2</fluentlenium.version>
+    <selenium-server.version>3.4.0</selenium-server.version>
+    <fluentlenium.version>3.2.0</fluentlenium.version>
+    <fluentlenium.festassert.version>0.13.2</fluentlenium.festassert.version>
 
     <browserPath></browserPath>
   </properties>
@@ -70,7 +70,18 @@
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
       <artifactId>selenium-java</artifactId>
+      <scope>test</scope>
       <version>${selenium-server.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>javax.servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.seleniumhq.selenium.client-drivers</groupId>
@@ -81,12 +92,43 @@
           <groupId>commons-logging</groupId>
           <artifactId>commons-logging</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>javax.servlet-api</artifactId>
+        </exclusion>
       </exclusions>
     </dependency>
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
       <artifactId>selenium-remote-driver</artifactId>
+      <scope>test</scope>
+      <version>${selenium-server.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>javax.servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.seleniumhq.selenium</groupId>
+      <artifactId>selenium-leg-rc</artifactId>
+      <scope>test</scope>
       <version>${selenium-server.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.testng</groupId>
+          <artifactId>testng</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>javax.servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.commons</groupId>
@@ -96,29 +138,52 @@
     <dependency>
       <groupId>org.seleniumhq.selenium</groupId>
       <artifactId>htmlunit-driver</artifactId>
-      <version>2.24</version>
+      <version>2.26</version>
     </dependency>
 
+    <dependency>
+      <groupId>org.seleniumhq.selenium</groupId>
+      <artifactId>selenium-server</artifactId>
+      <scope>test</scope>
+      <version>${selenium-server.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>commons-logging</groupId>
+          <artifactId>commons-logging</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>javax.servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
 
     <dependency>
       <groupId>org.fluentlenium</groupId>
-      <artifactId>fluentlenium-festassert</artifactId>
+      <artifactId>fluentlenium-core</artifactId>
       <version>${fluentlenium.version}</version>
       <scope>test</scope>
     </dependency>
 
     <dependency>
-      <groupId>xerces</groupId>
-      <artifactId>xercesImpl</artifactId>
+      <groupId>org.fluentlenium</groupId>
+      <artifactId>fluentlenium-festassert</artifactId>
+      <version>${fluentlenium.festassert.version}</version>
+      <scope>test</scope>
     </dependency>
 
     <dependency>
       <groupId>org.fluentlenium</groupId>
-      <artifactId>fluentlenium-core</artifactId>
+      <artifactId>fluentlenium-junit</artifactId>
       <version>${fluentlenium.version}</version>
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>xerces</groupId>
+      <artifactId>xercesImpl</artifactId>
+    </dependency>
+
     <!-- Dependency for MavenConnectionTest -->
     <dependency>
       <groupId>jdom</groupId>
@@ -183,37 +248,6 @@
     <pluginManagement>
       <plugins>
         <plugin>
-          <groupId>org.codehaus.mojo</groupId>
-          <artifactId>selenium-maven-plugin</artifactId>
-          <dependencies>
-            <dependency>
-              <groupId>org.seleniumhq.selenium</groupId>
-              <artifactId>selenium-server</artifactId>
-              <version>${selenium-server.version}</version>
-            </dependency>
-            <dependency>
-              <groupId>org.seleniumhq.selenium</groupId>
-              <artifactId>selenium-remote-driver</artifactId>
-              <version>${selenium-server.version}</version>
-            </dependency>
-            <dependency>
-              <groupId>org.seleniumhq.selenium</groupId>
-              <artifactId>selenium-api</artifactId>
-              <version>${selenium-server.version}</version>
-            </dependency>
-            <dependency>
-              <groupId>org.apache.commons</groupId>
-              <artifactId>commons-exec</artifactId>
-              <version>1.3</version>
-            </dependency>
-            <dependency>
-              <groupId>org.seleniumhq.selenium</groupId>
-              <artifactId>htmlunit-driver</artifactId>
-              <version>2.24</version>
-            </dependency>  
-          </dependencies>
-        </plugin>
-        <plugin>
           <groupId>org.apache.rat</groupId>
           <artifactId>apache-rat-plugin</artifactId>
           <configuration>
@@ -274,6 +308,7 @@
                 <maxWaitTimeInMs>${maxWaitTimeInMs}</maxWaitTimeInMs>
                 <seleniumHost>${seleniumHost}</seleniumHost>
                 <seleniumPort>${seleniumPort}</seleniumPort>
+                <seleniumRemote>${seleniumRemote}</seleniumRemote>
                 <tomcat.propertiesPortFilePath>${tomcat.propertiesPortFilePath}</tomcat.propertiesPortFilePath>
               </systemPropertyVariables>
             </configuration>
@@ -439,39 +474,30 @@
         </property>
       </activation>
       <properties>
-        <seleniumHost>localhost</seleniumHost>
-        <seleniumPort>4444</seleniumPort>
+        <seleniumRemote>false</seleniumRemote>
       </properties>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>selenium-maven-plugin</artifactId>
-            <executions>
-              <execution>
-                <phase>pre-integration-test</phase>
-                <goals>
-                  <goal>start-server</goal>
-                </goals>
-                <configuration>
-                  <background>true</background>
-                  <port>${seleniumPort}</port>
-                  <logOutput>true</logOutput>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
-      </build>
     </profile>
     <profile>
-      <id>firefox</id>
+      <id>htmlunit</id>
       <activation>
         <property>
           <name>!browser</name>
         </property>
       </activation>
       <properties>
+        <selenium.browser>*htmlunit</selenium.browser>
+        <excluded.groups/>
+      </properties>
+    </profile>
+    <profile>
+      <id>firefox</id>
+      <activation>
+        <property>
+          <name>browser</name>
+          <value>firefox</value>
+        </property>
+      </activation>
+      <properties>
         <selenium.browser>*firefox</selenium.browser>
         <excluded.groups/>
       </properties>

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
index 4ed311d..7f83b34 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
@@ -19,31 +19,25 @@ package org.apache.archiva.web.test;
  */
 
 import junit.framework.Assert;
+import org.apache.archiva.web.test.tools.WebdriverInitializer;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.fluentlenium.adapter.FluentTest;
+import org.fluentlenium.adapter.junit.FluentTest;
 import org.fluentlenium.core.domain.FluentList;
 import org.fluentlenium.core.domain.FluentWebElement;
-import static org.assertj.core.api.Assertions.assertThat;
+import org.junit.Before;
 import org.junit.Test;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
-import org.openqa.selenium.chrome.ChromeDriver;
-import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.ie.InternetExplorerDriver;
-import org.openqa.selenium.remote.DesiredCapabilities;
-import org.openqa.selenium.remote.RemoteWebDriver;
-import org.openqa.selenium.safari.SafariDriver;
 
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
+
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
-import org.apache.commons.io.FileUtils;
-import org.fluentlenium.core.Fluent;
-import org.junit.Before;
+
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * @author Olivier Lamy
@@ -53,7 +47,7 @@ public class WebDriverBrowseTest
 {
 
     @Override
-    public Fluent takeScreenShot( String fileName )
+    public void takeScreenShot( String fileName )
     {
         File fileNameHTML = new File( "target", "errorshtmlsnap" );
         try
@@ -67,14 +61,17 @@ public class WebDriverBrowseTest
         {
             e.printStackTrace();
         }
-        return super.takeScreenShot( fileNameHTML.getAbsolutePath() );
+        super.takeScreenShot( fileNameHTML.getAbsolutePath() );
 
     }
 
     @Before
     public void init()
     {
-        setSnapshotMode( Mode.TAKE_SNAPSHOT_ON_FAIL );
+
+        setScreenshotMode( TriggerMode.AUTOMATIC_ON_FAIL);
+        setDriverLifecycle( DriverLifecycle.CLASS );
+
     }
 
     @Test
@@ -93,34 +90,34 @@ public class WebDriverBrowseTest
         goTo( "http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en" );
 
         // wait until topbar-menu-container is feeded
-        await().atMost( 5, TimeUnit.SECONDS ).until( "#topbar-menu" ).isPresent();
+        await().atMost( 5, TimeUnit.SECONDS ).until( $("#topbar-menu" )).present();
 
         FluentList<FluentWebElement> elements = find( "#create-admin-link-a" );
 
-        if ( !elements.isEmpty() && elements.get( 0 ).isDisplayed() )
+        if ( !elements.isEmpty() && elements.get( 0 ).displayed() )
         {
             WebElement webElement = elements.get( 0 ).getElement();
             Assert.assertEquals( "Create Admin User", webElement.getText() );
 
             webElement.click();
-            await().atMost( 2, TimeUnit.SECONDS ).until( "#user-create" ).isPresent();
-            assertThat( find( "#username" ).getValue().equals( "admin" ) );
-            assertThat( find( "#password" ).getValue().isEmpty() );
-            assertThat( find( "#confirmPassword" ).getValue().isEmpty() );
-            assertThat( find( "#email" ).getValue().isEmpty() );
-
-            fill( "#fullname" ).with( p.getProperty( "ADMIN_FULLNAME" ) );
-            fill( "#email" ).with( p.getProperty( "ADMIN_EMAIL" ) );
-            fill( "#password" ).with( p.getProperty( "ADMIN_PASSWORD" ) );
-            fill( "#confirmPassword" ).with( p.getProperty( "ADMIN_PASSWORD" ) );
+            await().atMost( 2, TimeUnit.SECONDS ).until($( "#user-create" )).present();
+            assertThat( find( "#username" ).value().equals( "admin" ) );
+            assertThat( find( "#password" ).value().isEmpty() );
+            assertThat( find( "#confirmPassword" ).value().isEmpty() );
+            assertThat( find( "#email" ).value().isEmpty() );
+
+            $("#fullname").fill().with( p.getProperty( "ADMIN_FULLNAME" ) );
+            $("#email").fill().with( p.getProperty( "ADMIN_EMAIL" ) );
+            $("#password").fill().with( p.getProperty( "ADMIN_PASSWORD" ) );
+            $("#confirmPassword").fill().with( p.getProperty( "ADMIN_PASSWORD" ) );
             find( "#user-create-form-register-button" ).click();
 
-            await().atMost( 2, TimeUnit.SECONDS ).until( "#logout-link" ).isPresent();
+            await().atMost( 2, TimeUnit.SECONDS ).until($("#logout-link" )).present();
 
             FluentList<FluentWebElement> elementss = find( "#menu-find-browse-a" );
             WebElement webElsement = elementss.get( 0 ).getElement();
             webElsement.click();
-            await().atMost( 2, TimeUnit.SECONDS ).until( "#main_browse_result" ).isPresent();
+            await().atMost( 2, TimeUnit.SECONDS ).until($("#main_browse_result" )).present();
             // give me search page :( not  browse page
 
             takeScreenShot( "search.png" );
@@ -140,36 +137,7 @@ public class WebDriverBrowseTest
     }
 
     @Override
-    public WebDriver getDefaultDriver() {
-        String seleniumBrowser = System.getProperty("selenium.browser");
-        String seleniumHost = System.getProperty("seleniumHost", "localhost");
-        int seleniumPort = Integer.getInteger("seleniumPort", 4444);
-        try {
-
-            if (StringUtils.contains(seleniumBrowser, "chrome")) {
-                return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                        DesiredCapabilities.chrome()
-                );
-            }
-
-            if (StringUtils.contains(seleniumBrowser, "safari")) {
-                return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                        DesiredCapabilities.safari()
-                );
-            }
-
-            if (StringUtils.contains(seleniumBrowser, "iexplore")) {
-                return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                        DesiredCapabilities.internetExplorer()
-                );
-            }
-
-            return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                    DesiredCapabilities.firefox()
-            );
-        } catch (MalformedURLException e) {
-            throw new RuntimeException("Initializion of remote driver failed");
-        }
-
+    public WebDriver newWebDriver() {
+        return WebdriverInitializer.newWebDriver();
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
index deec6c0..5a020e2 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
@@ -19,10 +19,13 @@ package org.apache.archiva.web.test;
  */
 
 import junit.framework.Assert;
+import org.apache.archiva.web.test.tools.WebdriverInitializer;
+import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.fluentlenium.adapter.FluentTest;
+import org.fluentlenium.adapter.junit.FluentTest;
 import org.fluentlenium.core.domain.FluentList;
 import org.fluentlenium.core.domain.FluentWebElement;
+import org.junit.Before;
 import org.junit.Test;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
@@ -38,21 +41,21 @@ import java.io.FileInputStream;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
+import java.nio.file.Paths;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.commons.io.FileUtils;
-import org.fluentlenium.core.Fluent;
-import org.junit.Before;
-
 /**
  * @author Olivier Lamy
  */
 public class WebDriverTest
-        extends FluentTest {
+        extends FluentTest
+{
+
+
 
     @Override
-    public Fluent takeScreenShot(String fileName) {
+    public void takeScreenShot(String fileName) {
         try {
             // save html to have a minimum feedback if jenkins firefox not up
             File fileNameHTML = new File(fileName + ".html");
@@ -61,13 +64,15 @@ public class WebDriverTest
             System.out.print(e.getMessage());
             e.printStackTrace();
         }
-        return super.takeScreenShot(fileName);
+        super.takeScreenShot(fileName);
     }
 
+
     @Before
     public void init() {
-        setSnapshotMode(Mode.TAKE_SNAPSHOT_ON_FAIL);
-        setSnapshotPath(new File("target", "errorshtmlsnap").getAbsolutePath());
+        setScreenshotMode(TriggerMode.AUTOMATIC_ON_FAIL);
+        setScreenshotPath( Paths.get("target", "errorshtmlsnap").toAbsolutePath().toString());
+        setDriverLifecycle( DriverLifecycle.CLASS );
     }
 
     @Test
@@ -79,15 +84,16 @@ public class WebDriverTest
                 new FileInputStream(new File(System.getProperty("tomcat.propertiesPortFilePath"))));
 
         int tomcatPort = Integer.parseInt(tomcatPortProperties.getProperty("tomcat.maven.http.port"));
-
-        goTo("http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en");
+        String url = "http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en";
+        System.err.println("URL: "+url);
+        goTo(url);
 
         // wait until topbar-menu-container is feeded
-        await().atMost(5, TimeUnit.SECONDS).until("#topbar-menu").isPresent();
+        await().atMost(10, TimeUnit.SECONDS).until($("#topbar-menu")).present();
 
         FluentList<FluentWebElement> elements = find("#create-admin-link-a");
 
-        if (!elements.isEmpty() && elements.get(0).isDisplayed()) {
+        if (!elements.isEmpty() && elements.get(0).displayed()) {
             WebElement webElement = elements.get(0).getElement();
             Assert.assertEquals("Create Admin User", webElement.getText());
         } else {
@@ -99,36 +105,7 @@ public class WebDriverTest
     }
 
     @Override
-    public WebDriver getDefaultDriver() {
-        String seleniumBrowser = System.getProperty("selenium.browser");
-        String seleniumHost = System.getProperty("seleniumHost", "localhost");
-        int seleniumPort = Integer.getInteger("seleniumPort", 4444);
-        try {
-
-            if (StringUtils.contains(seleniumBrowser, "chrome")) {
-                return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                        DesiredCapabilities.chrome()
-                );
-            }
-
-            if (StringUtils.contains(seleniumBrowser, "safari")) {
-                return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                        DesiredCapabilities.safari()
-                );
-            }
-
-            if (StringUtils.contains(seleniumBrowser, "iexplore")) {
-                return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                        DesiredCapabilities.internetExplorer()
-                );
-            }
-
-            return new RemoteWebDriver(new URL("http://" + seleniumHost + ":" + seleniumPort + "/wd/hub"),
-                    DesiredCapabilities.firefox()
-            );
-        } catch (MalformedURLException e) {
-            throw new RuntimeException("Initializion of remote driver failed");
-        }
-
+    public WebDriver newWebDriver() {
+        return WebdriverInitializer.newWebDriver();
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 3a886c7..a8403cd 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -21,7 +21,10 @@ package org.apache.archiva.web.test.parent;
 
 import com.thoughtworks.selenium.DefaultSelenium;
 import com.thoughtworks.selenium.Selenium;
+import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
 import org.apache.archiva.web.test.tools.ArchivaSeleniumExecutionRule;
+import org.apache.archiva.web.test.tools.WebdriverInitializer;
+import org.apache.xpath.operations.Bool;
 import org.junit.Assert;
 import org.junit.Rule;
 
@@ -37,6 +40,9 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import org.apache.commons.io.FileUtils;
+import org.openqa.selenium.WebDriver;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -45,6 +51,7 @@ import org.apache.commons.io.FileUtils;
 
 public abstract class AbstractSeleniumTest
 {
+    private final Logger logger = LoggerFactory.getLogger( getClass() );
 
     @Rule
     public ArchivaSeleniumExecutionRule archivaSeleniumExecutionRule = new ArchivaSeleniumExecutionRule();
@@ -60,6 +67,8 @@ public abstract class AbstractSeleniumTest
 
     public int seleniumPort = Integer.getInteger( "seleniumPort", 4444 );
 
+    public boolean remoteSelenium = Boolean.parseBoolean( System.getProperty( "remoteSelenium", "false" ) );
+
     private Selenium selenium = null;
 
     public Properties p;
@@ -83,7 +92,7 @@ public abstract class AbstractSeleniumTest
 
         baseUrl = "http://localhost:" + tomcatPort + "/archiva/index.html?request_lang=en";
 
-        open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs );
+        open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs, remoteSelenium );
         archivaSeleniumExecutionRule.selenium = selenium;
         assertAdminCreated();
     }
@@ -102,14 +111,15 @@ public abstract class AbstractSeleniumTest
     /**
      * Initialize selenium
      */
-    public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort, int maxWaitTimeInMs )
+    public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort, int maxWaitTimeInMs, boolean remoteSelenium)
         throws Exception
     {
         try
         {
             if ( getSelenium() == null )
             {
-                selenium = new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl );
+                WebDriver driver = WebdriverInitializer.newWebDriver(browser, seleniumHost, seleniumPort, remoteSelenium);
+                selenium = new WebDriverBackedSelenium(driver, baseUrl);
                 selenium.start();
                 selenium.setTimeout( Integer.toString( maxWaitTimeInMs ) );
             }
@@ -125,15 +135,15 @@ public abstract class AbstractSeleniumTest
     public void assertAdminCreated()
         throws Exception
     {
-        initializeArchiva( baseUrl, browser, maxWaitTimeInMs, seleniumHost, seleniumPort );
+        initializeArchiva( baseUrl, browser, maxWaitTimeInMs, seleniumHost, seleniumPort, remoteSelenium );
     }
 
     public void initializeArchiva( String baseUrl, String browser, int maxWaitTimeInMs, String seleniumHost,
-                                   int seleniumPort )
+                                   int seleniumPort, boolean remoteSelenium)
         throws Exception
     {
 
-        open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs );
+        open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs, remoteSelenium);
 
         getSelenium().open( baseUrl );
 
@@ -701,8 +711,12 @@ public abstract class AbstractSeleniumTest
         
         File fileName = new File( targetPath, fileBaseName + ".png" );
 
-        selenium.captureEntirePageScreenshot( fileName.getAbsolutePath(), "background=#FFFFFF" );
-        
+        try
+        {
+            selenium.captureEntirePageScreenshot( fileName.getAbsolutePath(), "background=#FFFFFF" );
+        } catch (UnsupportedOperationException ex) {
+            logger.warn("Could not create screenshot. Not supported by this webdriver. "+selenium.getClass().getName());
+        }
         return fileName.getAbsolutePath();
     }
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java
new file mode 100644
index 0000000..c3ddc1a
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverInitializer.java
@@ -0,0 +1,118 @@
+package org.apache.archiva.web.test.tools;
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.commons.lang3.StringUtils;
+import org.openqa.selenium.Capabilities;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.chrome.ChromeDriver;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.ie.InternetExplorerDriver;
+import org.openqa.selenium.remote.DesiredCapabilities;
+import org.openqa.selenium.remote.RemoteWebDriver;
+import org.openqa.selenium.safari.SafariDriver;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+/**
+ * Created by martin_s on 04.06.17.
+ */
+public class WebdriverInitializer
+{
+
+    public static WebDriver newWebDriver() {
+        String seleniumBrowser = System.getProperty("selenium.browser");
+        String seleniumHost = System.getProperty("seleniumHost", "localhost");
+        int seleniumPort = Integer.getInteger("seleniumPort", 4444);
+        boolean seleniumRemote = Boolean.parseBoolean(System.getProperty("seleniumRemote","false"));
+        return newWebDriver(seleniumBrowser,seleniumHost, seleniumPort,seleniumRemote);
+    }
+
+    public static WebDriver newWebDriver(String seleniumBrowser, String seleniumHost, int seleniumPort, boolean seleniumRemote) {
+        try {
+
+            if ( StringUtils.contains(seleniumBrowser, "chrome")) {
+                if (seleniumRemote)
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.chrome()
+                    );
+                } else {
+                    return new ChromeDriver(  );
+                }
+            }
+
+            if (StringUtils.contains(seleniumBrowser, "safari")) {
+                if (seleniumRemote)
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.safari()
+                    );
+                } else {
+                    return new SafariDriver();
+                }
+            }
+
+            if (StringUtils.contains(seleniumBrowser, "iexplore")) {
+                if (seleniumRemote)
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.internetExplorer()
+                    );
+                } else {
+                    new InternetExplorerDriver(  );
+                }
+            }
+
+            if (StringUtils.contains( seleniumBrowser, "firefox" ))
+            {
+                if ( seleniumRemote )
+                {
+                    return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                        DesiredCapabilities.firefox()
+                    );
+                }
+                else
+                {
+                    return new FirefoxDriver();
+                }
+            }
+
+            if ( seleniumRemote )
+            {
+                return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
+                    DesiredCapabilities.htmlUnit()
+                );
+            }
+            else
+            {
+                DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();
+                capabilities.setJavascriptEnabled( true );
+                capabilities.setVersion( "firefox-51" );
+                return new HtmlUnitDriver( capabilities  );
+            }
+
+        } catch (MalformedURLException e) {
+            throw new RuntimeException("Initializion of remote driver failed");
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml
new file mode 100644
index 0000000..bed63bf
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0"  encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+
+<Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
+  <New id="derbyDs" class="org.eclipse.jetty.plus.jndi.Resource">
+    <Arg></Arg>
+    <Arg>jdbc/users</Arg>
+    <Arg>
+      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
+        <Set name="databaseName">database/users;create=true</Set>
+        <Set name="user">sa</Set>
+        <Set name="password"></Set>
+      </New>
+    </Arg>
+  </New>
+
+
+  <New id="mail" class="org.eclipse.jetty.plus.jndi.Resource">
+    <Arg>mail/Session</Arg>
+    <Arg>
+      <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
+        <Set name="properties">
+          <New class="java.util.Properties">
+            <Put name="mail.smtp.host">localhost</Put>
+          </New>
+        </Set>
+      </New>
+    </Arg>
+  </New>
+</Configure>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
index 9294964..dec6d75 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
@@ -28,6 +28,9 @@
   <loggers>
 
     <logger name="org.springframework" level="error"/>
+    <logger name="com.gargoylesoftware.htmlunit.DefaultCssErrorHandler" level="error" />
+    <logger name="com.gargoylesoftware.htmlunit.html.HtmlScript" level="error" />
+    <logger name="org.apache.http.wire" level="debug" />
 
     <root level="info">
       <appender-ref ref="console"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index 6d101a4..b88e7ba 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -717,6 +717,12 @@
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-rest-services</artifactId>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>javax.servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
@@ -801,6 +807,12 @@
       <artifactId>redback-rest-services</artifactId>
       <classifier>tests</classifier>
       <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>javax.servlet</groupId>
+          <artifactId>javax.servlet-api</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml
new file mode 100644
index 0000000..1668649
--- /dev/null
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0"  encoding="UTF-8"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+
+<Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
+  <New id="derbyDs" class="org.eclipse.jetty.plus.jndi.Resource">
+    <Arg></Arg>
+    <Arg>jdbc/users</Arg>
+    <Arg>
+      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
+        <Set name="databaseName">database/users;create=true</Set>
+        <Set name="user">sa</Set>
+        <Set name="password"></Set>
+      </New>
+    </Arg>
+  </New>
+
+
+  <New id="mail" class="org.eclipse.jetty.plus.jndi.Resource">
+    <Arg>mail/Session</Arg>
+    <Arg>
+      <New class="org.eclipse.jetty.jndi.factories.MailSessionReference">
+        <Set name="properties">
+          <New class="java.util.Properties">
+            <Put name="mail.smtp.host">localhost</Put>
+          </New>
+        </Set>
+      </New>
+    </Arg>
+  </New>
+</Configure>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/0bbedd72/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f4f80dd..8b1bad4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -87,7 +87,7 @@
     <httpclient.core.version>4.4.4</httpclient.core.version>
     <javaxMailVersion>1.4</javaxMailVersion>
     <jettyVersion>9.4.5.v20170502</jettyVersion>
-    <guava.version>16.0.1</guava.version>
+    <guava.version>22.0</guava.version>
     <openjpaVersion>2.4.1</openjpaVersion>
 
     <!-- restore when we will be able to use a derby in memory database -->


[29/50] archiva git commit: Centralizing openjpa log config

Posted by ma...@apache.org.
Centralizing openjpa log config


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/7e6ad27e
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/7e6ad27e
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/7e6ad27e

Branch: refs/heads/citest
Commit: 7e6ad27e07f58b3ce8875c53da89ee4e63cb8ecd
Parents: 46a3845
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun May 21 17:39:07 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun May 21 22:36:03 2017 +0200

----------------------------------------------------------------------
 .../archiva-consumers/archiva-core-consumers/pom.xml           | 1 +
 .../resources/spring-context-cleanup-released-snapshots.xml    | 2 +-
 .../src/test/resources/spring-context-purge-consumer-test.xml  | 2 +-
 .../src/test/resources/spring-context.xml                      | 2 +-
 .../archiva-consumers/archiva-lucene-consumers/pom.xml         | 1 +
 archiva-modules/archiva-base/archiva-indexer/pom.xml           | 1 +
 .../archiva-indexer/src/test/resources/spring-context.xml      | 2 +-
 archiva-modules/archiva-base/archiva-proxy/pom.xml             | 1 +
 .../archiva-proxy/src/test/resources/spring-context.xml        | 2 +-
 .../archiva-repository-admin-default/pom.xml                   | 1 +
 .../src/test/resources/spring-context.xml                      | 2 +-
 .../archiva-scheduler/archiva-scheduler-indexing/pom.xml       | 1 +
 .../src/test/resources/spring-context.xml                      | 2 +-
 .../archiva-web/archiva-rest/archiva-rest-services/pom.xml     | 1 +
 .../src/test/resources/META-INF/spring-context-test.xml        | 2 +-
 archiva-modules/archiva-web/archiva-security/pom.xml           | 1 +
 .../archiva-security/src/test/resources/spring-context.xml     | 2 +-
 archiva-modules/archiva-web/archiva-web-common/pom.xml         | 1 +
 .../src/test/resources/spring-context-test-common.xml          | 2 +-
 .../src/test/resources/spring-context-with-jcr.xml             | 2 +-
 archiva-modules/archiva-web/archiva-webapp-test/pom.xml        | 1 +
 archiva-modules/archiva-web/archiva-webapp/pom.xml             | 1 +
 .../src/main/webapp/WEB-INF/applicationContext.xml             | 2 +-
 archiva-modules/archiva-web/archiva-webdav/pom.xml             | 1 +
 .../test/resources/spring-context-servlet-security-test.xml    | 2 +-
 .../archiva-webdav/src/test/resources/spring-context.xml       | 2 +-
 pom.xml                                                        | 6 ++++--
 27 files changed, 30 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
index ff3eb22..c01a30b 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
@@ -171,6 +171,7 @@
               <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
               <archiva.user.configFileName>${project.build.directory}/archiva.xml</archiva.user.configFileName>
               <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
+              <openjpa.Log>${openjpa.Log}</openjpa.Log>
             </systemPropertyVariables>
           </configuration>
         </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
index 349cd9c..9e36b99 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-cleanup-released-snapshots.xml
@@ -79,7 +79,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
index 63aafa5..379335b 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context-purge-consumer-test.xml
@@ -129,7 +129,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
index fc70ff8..e63eb7a 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/resources/spring-context.xml
@@ -60,7 +60,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
index d71f5e1..6eed0b8 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
@@ -179,6 +179,7 @@
             <systemPropertyVariables>
               <appserver.base>${project.build.directory}/appserver-base</appserver.base>
               <plexus.home>${project.build.directory}/appserver-base</plexus.home>
+              <openjpa.Log>${openjpa.Log}</openjpa.Log>
             </systemPropertyVariables>
           </configuration>
         </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-indexer/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-indexer/pom.xml b/archiva-modules/archiva-base/archiva-indexer/pom.xml
index 4e0a4d0..5695593 100644
--- a/archiva-modules/archiva-base/archiva-indexer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-indexer/pom.xml
@@ -230,6 +230,7 @@
             <redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
             <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
index a071075..e0bf5c4 100644
--- a/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-indexer/src/test/resources/spring-context.xml
@@ -56,7 +56,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-proxy/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml
index a474f97..efe7be3 100644
--- a/archiva-modules/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml
@@ -273,6 +273,7 @@
             <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
             <http.proxyHost />
             <http.proxyPort />
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
index 5815e03..7a57f01 100755
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/resources/spring-context.xml
@@ -99,7 +99,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
index ae8230a..06fe2e4 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
@@ -300,6 +300,7 @@
             <redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
             <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
index 3ae5809..2901cbb 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/test/resources/spring-context.xml
@@ -73,7 +73,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
index 33f967f..5aca8e1 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
@@ -249,6 +249,7 @@
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
             <basedir>${basedir}</basedir>
             <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
index 3f50a72..8c31f0f 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/resources/spring-context.xml
@@ -75,7 +75,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index 4dceb0c..d6b1c98 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -470,6 +470,7 @@
             <org.apache.jackrabbit.maxMemoryPerCache>1</org.apache.jackrabbit.maxMemoryPerCache>
             <!--org.apache.jackrabbit.minMemoryPerCache>1</org.apache.jackrabbit.minMemoryPerCache-->
             <archiva.repositorySessionFactory.id>jcr</archiva.repositorySessionFactory.id>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
index ceea546..49c0748 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
@@ -119,7 +119,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-security/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-security/pom.xml b/archiva-modules/archiva-web/archiva-security/pom.xml
index 064af56..913d6ed 100644
--- a/archiva-modules/archiva-web/archiva-security/pom.xml
+++ b/archiva-modules/archiva-web/archiva-security/pom.xml
@@ -244,6 +244,7 @@
             <redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
             <archiva.repositorySessionFactory.id>file</archiva.repositorySessionFactory.id>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
index 08e98f6..a1c9e04 100644
--- a/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-security/src/test/resources/spring-context.xml
@@ -135,7 +135,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index 4b79066..e44bd69 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -549,6 +549,7 @@
             <archiva.logMissingI18n>true</archiva.logMissingI18n>
             <java.awt.headless>true</java.awt.headless>
             <archiva.repositorySessionFactory.id>test</archiva.repositorySessionFactory.id>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
index 9bc51d7..3e8195d 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
@@ -99,7 +99,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
index 5a11710..1e02fbc 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-with-jcr.xml
@@ -73,7 +73,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index 61eb47a..1ba04f1 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -401,6 +401,7 @@
                     <appserver.home>${project.build.directory}/appserver-base</appserver.home>
                     <derby.system.home>${project.build.directory}</derby.system.home>
                     <archiva.devMode>true</archiva.devMode>
+                    <openjpa.Log>${openjpa.Log}</openjpa.Log>
                   </systemProperties>
                   <contextFile>${project.build.testOutputDirectory}/archiva.xml</contextFile>
                   <propertiesPortFilePath>${tomcat.propertiesPortFilePath}</propertiesPortFilePath>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index 9dc3eb8..6d101a4 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -977,6 +977,7 @@
             <org.apache.sirona.configuration.sirona.properties>${archiva.sirona.configuration}</org.apache.sirona.configuration.sirona.properties>
             <AsyncLoggerConfig.WaitStrategy>Block</AsyncLoggerConfig.WaitStrategy>
             <AsyncLogger.WaitStrategy>Block</AsyncLogger.WaitStrategy>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemProperties>
           <additionalClasspathDirs>
             <additionalClasspathDir>${basedir}/src/test/tomcat</additionalClasspathDir>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
index 49f0301..d6edfc8 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
@@ -306,7 +306,7 @@
         <entry key="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                   value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE"/>
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.DBDictionary" value="(disableSchemaFactoryColumnTypeErrors=true,BitTypeName=CHAR(1),BooleanTypeName=CHAR(1),BooleanRepresentation=STRING_YN)"/>
       </map>
     </property>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index fdf11dd..73a8654 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -324,6 +324,7 @@
             <redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
             <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
+            <openjpa.Log>${openjpa.Log}</openjpa.Log>
           </systemPropertyVariables>
           <forkMode>${webdav.forkMode}</forkMode>
         </configuration>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
index 1619c96..9f38b82 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
@@ -90,7 +90,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
index 66f4661..5601082 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
@@ -91,7 +91,7 @@
         <entry key="openjpa.ConnectionDriverName" value="org.hsqldb.jdbcDriver" />
         <entry key="openjpa.ConnectionUserName" value="sa" />
         <entry key="openjpa.ConnectionPassword" value="" />
-        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE" />
+        <entry key="openjpa.Log" value="${openjpa.Log:DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR}" />
         <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)" />
         <entry key="openjpa.jdbc.MappingDefaults"
                value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7e6ad27e/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9057c53..8aadb88 100644
--- a/pom.xml
+++ b/pom.xml
@@ -70,7 +70,7 @@
     <slf4j.version>1.7.25</slf4j.version>
     <log4j.version>2.8.2</log4j.version>
 
-    <spring.version>4.2.1.RELEASE</spring.version>
+    <spring.version>4.3.8.RELEASE</spring.version>
 
     <javax.jcr.version>2.0</javax.jcr.version>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -103,6 +103,8 @@
     <release.preparationGoals>clean install</release.preparationGoals>
     <springockito.version>1.0.9</springockito.version>
     <mockito.version>1.9.5</mockito.version>
+    
+    <openjpa.Log>DefaultLevel=INFO,Runtime=ERROR,Tool=ERROR,SQL=ERROR,Schema=ERROR,MetaData=ERROR</openjpa.Log>
   </properties>
 
   <dependencyManagement>
@@ -710,7 +712,7 @@
       <dependency>
         <groupId>org.hsqldb</groupId>
         <artifactId>hsqldb</artifactId>
-        <version>2.2.8</version>
+        <version>2.3.2</version>
         <scope>test</scope>
       </dependency>
       <dependency>


[21/50] archiva git commit: update jetty.xml file with 9.4 version

Posted by ma...@apache.org.
update jetty.xml file with 9.4 version

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/6f286273
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/6f286273
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/6f286273

Branch: refs/heads/citest
Commit: 6f286273991823611cca8733e64626a6ee90ae5f
Parents: 2579687
Author: olivier lamy <ol...@apache.org>
Authored: Sat May 13 22:33:49 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Sat May 13 22:33:49 2017 +1000

----------------------------------------------------------------------
 archiva-jetty/src/main/assembly/bin.xml     |  4 --
 archiva-jetty/src/main/conf/jetty.xml       | 58 +++---------------------
 archiva-jetty/src/main/contexts/archiva.xml | 31 -------------
 3 files changed, 7 insertions(+), 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/6f286273/archiva-jetty/src/main/assembly/bin.xml
----------------------------------------------------------------------
diff --git a/archiva-jetty/src/main/assembly/bin.xml b/archiva-jetty/src/main/assembly/bin.xml
index d10f9aa..1e18d9f 100644
--- a/archiva-jetty/src/main/assembly/bin.xml
+++ b/archiva-jetty/src/main/assembly/bin.xml
@@ -106,10 +106,6 @@
         <include>LICENSE</include>
       </includes>
     </fileSet>
-    <fileSet>
-      <directory>src/main/contexts</directory>
-      <outputDirectory>contexts</outputDirectory>
-    </fileSet>
   </fileSets>
   <dependencySets>
     <dependencySet>

http://git-wip-us.apache.org/repos/asf/archiva/blob/6f286273/archiva-jetty/src/main/conf/jetty.xml
----------------------------------------------------------------------
diff --git a/archiva-jetty/src/main/conf/jetty.xml b/archiva-jetty/src/main/conf/jetty.xml
index 63e4719..b7e66d4 100644
--- a/archiva-jetty/src/main/conf/jetty.xml
+++ b/archiva-jetty/src/main/conf/jetty.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure_9_3.dtd">
 <!--
   ~ Licensed to the Apache Software Foundation (ASF) under one
   ~ or more contributor license agreements.  See the NOTICE file
@@ -51,9 +51,6 @@
   <!-- =========================================================== -->
   <!-- =========================================================== -->
 
-  <!-- Use this connector for many frequently idle connections
-       and for threadless continuations.
-  -->
   <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
     <Set name="secureScheme">https</Set>
     <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
@@ -61,7 +58,6 @@
     <Set name="requestHeaderSize">8192</Set>
     <Set name="responseHeaderSize">8192</Set>
     <Set name="headerCacheSize">512</Set>
-
   </New>
 
   <Call name="addConnector">
@@ -84,15 +80,17 @@
     </Arg>
   </Call>
 
-  <!-- =========================================================== -->
-  <!-- Set handler Collection Structure                            -->
-  <!-- =========================================================== -->
   <Set name="handler">
     <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
       <Set name="handlers">
         <Array type="org.eclipse.jetty.server.Handler">
           <Item>
-            <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
+            <New class="org.eclipse.jetty.webapp.WebAppContext">
+              <Set name="contextPath">/</Set>
+              <Set name="war"><SystemProperty name="appserver.base" default="./apps/archiva"/>/apps/archiva</Set>
+              <Set name="extractWAR">false</Set>
+              <Set name="copyWebDir">false</Set>
+            </New>
           </Item>
           <Item>
             <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
@@ -116,34 +114,6 @@
     </Arg>
   </Call>
 
-  <Call name="addBean">
-    <Arg>
-      <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
-        <Set name="contexts">
-          <Ref refid="Contexts" />
-        </Set>
-        <Call id="webappprovider" name="addAppProvider">
-          <Arg>
-            <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
-              <Set name="monitoredDirName"><Property name="jetty.base" default="." />/apps</Set>
-              <Set name="configurationClasses">
-                <Array type="java.lang.String">
-                  <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
-                  <Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
-                  <Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
-                  <Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
-                  <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
-                  <Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item>
-                  <!--Item>org.eclipse.jetty.annotations.AnnotationConfiguration</Item-->
-                  <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
-                </Array>
-              </Set>
-            </New>
-          </Arg>
-        </Call>
-      </New>
-    </Arg>
-  </Call>
 
   <!-- =========================================================== -->
   <!-- extra options                                               -->
@@ -162,24 +132,11 @@
         <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
         <Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item>
         <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
-        <Item>org.eclipse.jetty.webapp.TagLibConfiguration</Item>
       </Array>
     </Arg>
   </Call>
 
 
-  <!-- =========================================================== -->
-  <!-- Configurations for WebAppContexts                           -->
-  <!-- Sequence of configurations to be applied to a webapp.       -->
-  <!-- =========================================================== -->
-  <Array id="plusConfig" type="java.lang.String">
-    <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
-    <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
-    <Item>org.eclipse.jetty.webapp.Configuration</Item>
-    <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
-    <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
-  </Array>
-
   <!-- ARCHIVA CONFIG -->
 
   <New id="validation_mail" class="org.eclipse.jetty.plus.jndi.Resource">
@@ -227,5 +184,4 @@
   </New>
 
 
-
 </Configure>

http://git-wip-us.apache.org/repos/asf/archiva/blob/6f286273/archiva-jetty/src/main/contexts/archiva.xml
----------------------------------------------------------------------
diff --git a/archiva-jetty/src/main/contexts/archiva.xml b/archiva-jetty/src/main/contexts/archiva.xml
deleted file mode 100644
index 93728d8..0000000
--- a/archiva-jetty/src/main/contexts/archiva.xml
+++ /dev/null
@@ -1,31 +0,0 @@
-<?xml version="1.0"  encoding="ISO-8859-1"?>
-<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
-
-<!--
-  ~ Licensed to the Apache Software Foundation (ASF) under one
-  ~ or more contributor license agreements.  See the NOTICE file
-  ~ distributed with this work for additional information
-  ~ regarding copyright ownership.  The ASF licenses this file
-  ~ to you under the Apache License, Version 2.0 (the
-  ~ "License"); you may not use this file except in compliance
-  ~ with the License.  You may obtain a copy of the License at
-  ~
-  ~   http://www.apache.org/licenses/LICENSE-2.0
-  ~
-  ~ Unless required by applicable law or agreed to in writing,
-  ~ software distributed under the License is distributed on an
-  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  ~ KIND, either express or implied.  See the License for the
-  ~ specific language governing permissions and limitations
-  ~ under the License.
-  -->
-
-<Configure class="org.eclipse.jetty.webapp.WebAppContext">
-
-  <Set name="contextPath">/</Set>
-  <Set name="war"><SystemProperty name="jetty.home" default="."/>/apps/archiva</Set>
-
-  <Set name="extractWAR">false</Set>
-  <Set name="copyWebDir">false</Set>
-
-</Configure>
\ No newline at end of file


[32/50] archiva git commit: take of default now jpa, jdo not exists anymore so handle migration

Posted by ma...@apache.org.
take of default now jpa, jdo not exists anymore so handle migration

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/4b6131e8
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/4b6131e8
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/4b6131e8

Branch: refs/heads/citest
Commit: 4b6131e8bab59139d0558ed6d932d683cdfdbcab
Parents: b77921b
Author: olivier lamy <ol...@apache.org>
Authored: Fri May 26 12:04:44 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Fri May 26 12:04:44 2017 +1000

----------------------------------------------------------------------
 .../archiva/configuration/default-archiva.xml   |  2 +-
 .../RedbackRuntimeConfigurationAdmin.java       |  4 +-
 ...DefaultRedbackRuntimeConfigurationAdmin.java |  8 +++
 .../archiva-web/archiva-web-common/pom.xml      | 26 --------
 .../ArchivaLockedAdminEnvironmentCheck.java     | 10 +++
 .../web/security/ArchivaRbacManager.java        |  6 +-
 .../remotedownload/AbstractDownloadTest.java    | 68 +++++++++-----------
 .../remotedownload/DownloadArtifactsTest.java   |  2 +-
 pom.xml                                         | 46 ++-----------
 9 files changed, 62 insertions(+), 110 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml b/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
index 877b6a5..88beda2 100644
--- a/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/src/main/resources/org/apache/archiva/configuration/default-archiva.xml
@@ -144,7 +144,7 @@
 
   <redbackRuntimeConfiguration>
     <userManagerImpls>
-      <userManagerImpl>jdo</userManagerImpl>
+      <userManagerImpl>jpa</userManagerImpl>
     </userManagerImpls>
     <rbacManagerImpls>
       <rbacManagerImpl>cached</rbacManagerImpl>

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/runtime/RedbackRuntimeConfigurationAdmin.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/runtime/RedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/runtime/RedbackRuntimeConfigurationAdmin.java
index 8fae6a6..c124eac 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/runtime/RedbackRuntimeConfigurationAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/src/main/java/org/apache/archiva/admin/model/runtime/RedbackRuntimeConfigurationAdmin.java
@@ -28,9 +28,9 @@ import org.apache.archiva.admin.model.beans.RedbackRuntimeConfiguration;
 public interface RedbackRuntimeConfigurationAdmin
 {
 
-    static final String DEFAULT_RBAC_MANAGER_IMPL = "jdo";
+    String DEFAULT_RBAC_MANAGER_IMPL = "jpa";
 
-    static final String DEFAULT_USER_MANAGER_IMPL = "jdo";
+    String DEFAULT_USER_MANAGER_IMPL = "jpa";
 
     RedbackRuntimeConfiguration getRedbackRuntimeConfiguration()
         throws RepositoryAdminException;

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
index 3ce727c..ebd8a64 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/src/main/java/org/apache/archiva/admin/repository/runtime/DefaultRedbackRuntimeConfigurationAdmin.java
@@ -100,6 +100,10 @@ public class DefaultRedbackRuntimeConfigurationAdmin
                     String[] impls = StringUtils.split( userManagerImpl, ',' );
                     for ( String impl : impls )
                     {
+                        if (StringUtils.equalsIgnoreCase( "jdo", impl ))
+                        {
+                            impl = DEFAULT_USER_MANAGER_IMPL;
+                        }
                         redbackRuntimeConfiguration.getUserManagerImpls().add( impl );
                     }
                 }
@@ -117,6 +121,10 @@ public class DefaultRedbackRuntimeConfigurationAdmin
                     String[] impls = StringUtils.split( rbacManagerImpls, ',' );
                     for ( String impl : impls )
                     {
+                        if (StringUtils.equalsIgnoreCase( "jdo", impl ))
+                        {
+                            impl = DEFAULT_RBAC_MANAGER_IMPL;
+                        }
                         redbackRuntimeConfiguration.getRbacManagerImpls().add( impl );
                     }
                 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index e44bd69..c141971 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -383,32 +383,6 @@
         </exclusion>
       </exclusions>
     </dependency>
-
-    <dependency>
-      <groupId>org.apache.tomcat.embed</groupId>
-      <artifactId>tomcat-embed-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>tomcat-juli</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat.embed</groupId>
-      <artifactId>tomcat-embed-logging-juli</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>tomcat-servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>tomcat-jsp-api</artifactId>
-      <scope>test</scope>
-    </dependency>
     <dependency>
       <groupId>org.assertj</groupId>
       <artifactId>assertj-core</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
index 8c1f4d7..045e21d 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaLockedAdminEnvironmentCheck.java
@@ -29,6 +29,7 @@ import org.apache.archiva.redback.users.User;
 import org.apache.archiva.redback.users.UserManager;
 import org.apache.archiva.redback.users.UserManagerException;
 import org.apache.archiva.redback.users.UserNotFoundException;
+import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.ApplicationContext;
@@ -75,12 +76,21 @@ public class ArchivaLockedAdminEnvironmentCheck
         List<String> userManagerImpls =
             redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration().getUserManagerImpls();
 
+        List<String> updated = new ArrayList<>(  );
         userManagers = new ArrayList<>( userManagerImpls.size() );
 
         for ( String beanId : userManagerImpls )
         {
+            // for migration purpose to help users
+            if ( StringUtils.equalsIgnoreCase( beanId, "jdo" ))
+            {
+                log.info( "jdo is not anymore supported we auto update to jpa" );
+                beanId = "jpa";
+            }
+            updated.add( beanId );
             userManagers.add( applicationContext.getBean( "userManager#" + beanId, UserManager.class ) );
         }
+        redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration().setUserManagerImpls( updated );
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
index 6b2eb9e..a98dc49 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
@@ -31,6 +31,7 @@ import org.apache.archiva.redback.rbac.RbacObjectNotFoundException;
 import org.apache.archiva.redback.rbac.Resource;
 import org.apache.archiva.redback.rbac.Role;
 import org.apache.archiva.redback.rbac.UserAssignment;
+import org.apache.commons.lang.StringUtils;
 import org.springframework.context.ApplicationContext;
 import org.springframework.stereotype.Service;
 
@@ -111,8 +112,11 @@ public class ArchivaRbacManager
 
             for ( String id : rbacManagerIds )
             {
+                if ( StringUtils.equalsIgnoreCase( "jdo", id ))
+                {
+                    id = RedbackRuntimeConfigurationAdmin.DEFAULT_RBAC_MANAGER_IMPL;
+                }
                 RBACManager rbacManager = applicationContext.getBean( "rbacManager#" + id, RBACManager.class );
-
                 rbacManagersPerId.put( id, rbacManager );
             }
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
index f04148c..cf69545 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/AbstractDownloadTest.java
@@ -33,16 +33,18 @@ import org.apache.archiva.rest.api.services.RepositoryGroupService;
 import org.apache.archiva.rest.api.services.SearchService;
 import org.apache.archiva.test.utils.ArchivaBlockJUnit4ClassRunner;
 import org.apache.archiva.webdav.RepositoryServlet;
-import org.apache.catalina.Context;
-import org.apache.catalina.deploy.ApplicationListener;
-import org.apache.catalina.deploy.ApplicationParameter;
-import org.apache.catalina.startup.Tomcat;
 import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.SystemUtils;
 import org.apache.cxf.common.util.Base64Utility;
 import org.apache.cxf.jaxrs.client.JAXRSClientFactory;
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.transport.servlet.CXFServlet;
+import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.session.SessionHandler;
+import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.runner.RunWith;
@@ -73,7 +75,7 @@ public abstract class AbstractDownloadTest
 
     public Server server = null;
 
-    public Tomcat tomcat;
+    ServerConnector serverConnector;
 
     public int port;
 
@@ -109,30 +111,24 @@ public abstract class AbstractDownloadTest
 
         System.setProperty( "redback.admin.creation.file", "target/auto-admin-creation.properties" );
 
-        tomcat = new Tomcat();
-        tomcat.setBaseDir( System.getProperty( "java.io.tmpdir" ) );
-        tomcat.setPort( 0 );
+        server = new Server();
+        serverConnector = new ServerConnector( server, new HttpConnectionFactory() );
+        server.addConnector( serverConnector );
 
-        Context context = tomcat.addContext( "", System.getProperty( "java.io.tmpdir" ) );
-
-        ApplicationParameter applicationParameter = new ApplicationParameter();
-        applicationParameter.setName( "contextConfigLocation" );
-        applicationParameter.setValue( getSpringConfigLocation() );
-        context.addApplicationParameter( applicationParameter );
-
-        context.addApplicationListener( new ApplicationListener( ContextLoaderListener.class.getName(), false ) );
-
-        tomcat.addServlet( context, "cxf", new CXFServlet() );
-        context.addServletMapping( "/" + getRestServicesPath() + "/*" , "cxf" );
-
-        tomcat.addServlet( context, "archivarepo", new RepositoryServlet() );
-        context.addServletMapping( "/repository/*" , "archivarepo" );
-
-        tomcat.start();
-
-        port = tomcat.getConnector().getLocalPort();
+        ServletHolder servletHolder = new ServletHolder( new CXFServlet() );
+        ServletContextHandler context = new ServletContextHandler( ServletContextHandler.SESSIONS );
+        context.setResourceBase( SystemUtils.JAVA_IO_TMPDIR );
+        context.setSessionHandler( new SessionHandler() );
+        context.addServlet( servletHolder, "/" + getRestServicesPath() + "/*" );
+        context.setInitParameter( "contextConfigLocation", getSpringConfigLocation() );
+        context.addEventListener( new ContextLoaderListener() );
 
+        ServletHolder servletHolderRepo = new ServletHolder( new RepositoryServlet() );
+        context.addServlet( servletHolderRepo, "/repository/*" );
 
+        server.setHandler( context );
+        server.start();
+        port = serverConnector.getLocalPort();
         log.info( "start server on port {}", this.port );
 
         User user = new User();
@@ -158,10 +154,6 @@ public abstract class AbstractDownloadTest
         {
             this.server.stop();
         }
-        if (this.tomcat != null)
-        {
-            this.tomcat.stop();
-        }
     }
 
 
@@ -173,7 +165,7 @@ public abstract class AbstractDownloadTest
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
         WebClient.client( service ).header( "Authorization", authorizationHeader );
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L );
         return service;
@@ -187,7 +179,7 @@ public abstract class AbstractDownloadTest
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
         WebClient.client( service ).header( "Authorization", authorizationHeader );
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L );
         return service;
@@ -201,7 +193,7 @@ public abstract class AbstractDownloadTest
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
         WebClient.client( service ).header( "Authorization", authorizationHeader );
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L );
         return service;
@@ -216,7 +208,7 @@ public abstract class AbstractDownloadTest
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
         WebClient.client( service ).header( "Authorization", authorizationHeader );
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L );
         return service;
@@ -230,7 +222,7 @@ public abstract class AbstractDownloadTest
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
         WebClient.client( service ).header( "Authorization", authorizationHeader );
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L );
         return service;
@@ -244,7 +236,7 @@ public abstract class AbstractDownloadTest
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
         WebClient.client( service ).header( "Authorization", authorizationHeader );
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 300000L );
         return service;
@@ -264,7 +256,7 @@ public abstract class AbstractDownloadTest
                                        RoleManagementService.class,
                                        Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         // for debuging purpose
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 3000000L );
@@ -282,7 +274,7 @@ public abstract class AbstractDownloadTest
             JAXRSClientFactory.create( "http://localhost:" + port + "/" + getRestServicesPath() + "/redbackServices/",
                                        UserService.class, Collections.singletonList( new JacksonJaxbJsonProvider() ) );
 
-        WebClient.client(service).header("Referer","http://localhost:"+port);
+        WebClient.client( service ).header( "Referer", "http://localhost:" + port );
 
         // for debuging purpose
         WebClient.getConfig( service ).getHttpConduit().getClient().setReceiveTimeout( 3000000L );

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
index eae4101..c8c753a 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/remotedownload/DownloadArtifactsTest.java
@@ -178,7 +178,7 @@ public class DownloadArtifactsTest
         HttpWagon httpWagon = new HttpWagon();
         httpWagon.connect( new Repository( "foo", "http://localhost:" + port ) );
 
-        httpWagon.get( "/repository/internal/junit/junit/4.9/junit-4.9.jar", file );
+        httpWagon.get( "repository/internal/junit/junit/4.9/junit-4.9.jar", file );
 
         ZipFile zipFile = new ZipFile( file );
         List<String> entries = getZipEntriesNames( zipFile );

http://git-wip-us.apache.org/repos/asf/archiva/blob/4b6131e8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9b76d6d..f4f80dd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -127,36 +127,6 @@
         <scope>test</scope>
       </dependency>
       <dependency>
-        <groupId>org.apache.tomcat.embed</groupId>
-        <artifactId>tomcat-embed-core</artifactId>
-        <version>${tomcat7Version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.tomcat</groupId>
-        <artifactId>tomcat-juli</artifactId>
-        <version>${tomcat7Version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.tomcat</groupId>
-        <artifactId>tomcat-servlet-api</artifactId>
-        <version>${tomcat7Version}</version>
-        <scope>provided</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.tomcat</groupId>
-        <artifactId>tomcat-jsp-api</artifactId>
-        <version>${tomcat7Version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
-        <groupId>org.apache.tomcat.embed</groupId>
-        <artifactId>tomcat-embed-logging-juli</artifactId>
-        <version>${tomcat7Version}</version>
-        <scope>test</scope>
-      </dependency>
-      <dependency>
         <groupId>org.apache.jackrabbit</groupId>
         <artifactId>jackrabbit-webdav</artifactId>
         <version>${jackrabbit.version}</version>
@@ -485,17 +455,6 @@
         <artifactId>spring-utils</artifactId>
         <version>${redback.spring-utils.version}</version>
       </dependency>
-      <dependency>
-        <groupId>org.apache.archiva.redback.components</groupId>
-        <artifactId>spring-jdo2</artifactId>
-        <version>2.2</version>
-        <exclusions>
-          <exclusion>
-            <groupId>geronimo-spec</groupId>
-            <artifactId>geronimo-spec-jta</artifactId>
-          </exclusion>
-        </exclusions>
-      </dependency>
 
       <dependency>
         <groupId>com.lmax</groupId>
@@ -690,6 +649,11 @@
         <version>${tomcat7Version}</version>
       </dependency>
       <dependency>
+        <groupId>org.apache.tomcat</groupId>
+        <artifactId>tomcat-juli</artifactId>
+        <version>${tomcat7Version}</version>
+      </dependency>
+      <dependency>
         <groupId>org.apache.commons</groupId>
         <artifactId>commons-compress</artifactId>
         <version>1.2</version>


[11/50] archiva git commit: Additional improvement for file locks

Posted by ma...@apache.org.
Additional improvement for file locks


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/40816fc3
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/40816fc3
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/40816fc3

Branch: refs/heads/citest
Commit: 40816fc367fce33c4220fbd683dbd8db75fbb781
Parents: f327eb9
Author: Martin Stockhammer <ma...@apache.org>
Authored: Thu Oct 27 12:21:46 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Thu Oct 27 12:21:46 2016 +0200

----------------------------------------------------------------------
 .../common/filelock/DefaultFileLockManager.java   | 18 ++++++++++++++----
 .../filelock/DefaultFileLockManagerTest.java      |  4 ++--
 2 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/40816fc3/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
index 2ce2f18..258366a 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
@@ -198,28 +198,38 @@ public class DefaultFileLockManager
                 }
                 throw new FileLockException( e.getMessage(), e );
             }
-            catch ( Throwable e )
+            catch ( IllegalStateException e )
             {
+                // Ignore this
+                log.debug( "openLock {}:{}", e.getClass(), e.getMessage() );
+            } catch (Throwable t) {
                 if (lock!=null && lock.isValid()) {
                     try {
                         lock.close();
                     } catch (IOException ex) {
                         // Ignore
-                    } finally {
-                        lock = null;
                     }
                 }
-                log.debug( "openLock {}:{}", e.getClass(), e.getMessage() );
+                throw t;
             }
 
         }
 
         Lock current = lockFiles.putIfAbsent( file, lock );
+        if (lock!=null && lock != current) {
+            try {
+                lock.close();
+            } catch (IOException e) {
+                // ignore
+            }
+
+        }
         if ( current != null )
         {
             lock = current;
         }
 
+
         return lock;
 
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/40816fc3/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
index 9618661..19f836d 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
@@ -246,7 +246,7 @@ public class DefaultFileLockManagerTest
         public void thread9()
             throws FileLockException, FileLockTimeoutException, IOException
         {
-            logger.info( "thread7" );
+            logger.info( "thread9" );
             Lock lock = fileLockManager.writeFileLock( this.file );
             try
             {
@@ -274,7 +274,7 @@ public class DefaultFileLockManagerTest
             {
                 fileLockManager.release( lock );
             }
-            logger.info( "thread8 ok" );
+            logger.info( "thread10 ok" );
             success.incrementAndGet();
         }
 


[04/50] archiva git commit: Remove comment

Posted by ma...@apache.org.
Remove comment


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/49323248
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/49323248
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/49323248

Branch: refs/heads/citest
Commit: 49323248e413901a881936be824a03292f9302fe
Parents: 203de64
Author: Martin Stockhammer <ma...@apache.org>
Authored: Tue Oct 25 22:42:39 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Tue Oct 25 22:42:39 2016 +0200

----------------------------------------------------------------------
 .../rest/services/DefaultRedbackRuntimeConfigurationService.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/49323248/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
index 0284bb8..d75d075 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
@@ -220,7 +220,8 @@ public class DefaultRedbackRuntimeConfigurationService
                 }
             }
 
-            //check repositories roles are here !!!
+
+
 
             return Boolean.TRUE;
         }


[45/50] archiva git commit: Adding fixes for chrome WebDriver

Posted by ma...@apache.org.
Adding fixes for chrome WebDriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/2513029e
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/2513029e
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/2513029e

Branch: refs/heads/citest
Commit: 2513029e2e6c3333073c265fa496bc50fb2e405d
Parents: f242578
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Jun 9 23:19:58 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Jun 9 23:19:58 2017 +0200

----------------------------------------------------------------------
 .../archiva/web/test/RepositoryAdminTest.java   |  8 +++---
 .../web/test/parent/AbstractSeleniumTest.java   | 26 ++++++++++++++++++++
 .../web/test/tools/WebdriverUtility.java        |  9 +++++--
 3 files changed, 38 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/2513029e/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
index d9d0da1..6dbf5eb 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
@@ -66,9 +66,11 @@ public class RepositoryAdminTest
         
         el.click();
         wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")));
-        el = wait.until(ExpectedConditions.elementToBeClickable( By.id("menu-proxy-connectors-list-a") ));
-        el.click();
-        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connectors-view-tabs-a-network-proxies-grid")));
+        tryClick(By.id("menu-proxy-connectors-list-a"),
+            ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connectors-view-tabs-a-network-proxies-grid")),
+            "Network proxies not available",
+            3,10
+            );
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("main-content"), "Proxy Connectors"));
         // proxy connect
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));

http://git-wip-us.apache.org/repos/asf/archiva/blob/2513029e/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 2cfe070..7922997 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -620,6 +620,32 @@ public abstract class AbstractSeleniumTest
         }
     }
 
+    public <V> V tryClick(By clickableLocator, Function<? super WebDriver, V> conditions, String message, int attempts, int maxWaitTimeInS) {
+
+        int count = attempts;
+        WebDriverWait wait = new WebDriverWait( getWebDriver(), maxWaitTimeInS );
+        V result = null;
+        Exception ex = null;
+        while(count>0)
+        {
+            try
+            {
+                WebElement el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator ));
+                el.click();
+                result = wait.until( conditions  );
+                count=0;
+                ex = null;
+            } catch (Exception e) {
+                ex = e;
+                count--;
+            }
+        }
+        if (ex!=null) {
+            Assert.fail( message);
+        }
+        return result;
+    }
+
     /**
      * Executes click() on the WebElement <code>el</code> and waits for the conditions.
      * If the condition is not fulfilled in <code>maxWaitTimeInS</code>, the click is executed again

http://git-wip-us.apache.org/repos/asf/archiva/blob/2513029e/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
index 12546c3..a1fbca3 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
@@ -23,6 +23,7 @@ import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.openqa.selenium.*;
 import org.openqa.selenium.chrome.ChromeDriver;
+import org.openqa.selenium.chrome.ChromeOptions;
 import org.openqa.selenium.firefox.FirefoxDriver;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 import org.openqa.selenium.ie.InternetExplorerDriver;
@@ -69,13 +70,17 @@ public class WebdriverUtility
         try {
 
             if ( StringUtils.contains(seleniumBrowser, "chrome")) {
+                ChromeOptions options = new ChromeOptions();
+                options.addArguments("start-maximized");
                 if (seleniumRemote)
                 {
+                    DesiredCapabilities capabilities = DesiredCapabilities.chrome();
+                    capabilities.setCapability( ChromeOptions.CAPABILITY, options );
                     return new RemoteWebDriver( new URL( "http://" + seleniumHost + ":" + seleniumPort + "/wd/hub" ),
-                        DesiredCapabilities.chrome()
+                        capabilities
                     );
                 } else {
-                    return new ChromeDriver(  );
+                    return new ChromeDriver( options );
                 }
             }
 


[05/50] archiva git commit: Add cache reset after configuration save

Posted by ma...@apache.org.
Add cache reset after configuration save


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/593d69f5
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/593d69f5
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/593d69f5

Branch: refs/heads/citest
Commit: 593d69f52eae0b0187a817212c29388968a2add8
Parents: 4932324
Author: Martin Stockhammer <ma...@apache.org>
Authored: Tue Oct 25 22:43:09 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Tue Oct 25 22:43:09 2016 +0200

----------------------------------------------------------------------
 .../archiva/web/security/ArchivaRbacManager.java      | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/593d69f5/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
index 143f3c2..6b2eb9e 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaRbacManager.java
@@ -98,6 +98,8 @@ public class ArchivaRbacManager
             List<String> rbacManagerIds =
                 redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration().getRbacManagerImpls();
 
+            clearCaches();
+
             if ( rbacManagerIds.isEmpty() )
             {
                 rbacManagerIds.add( RedbackRuntimeConfigurationAdmin.DEFAULT_RBAC_MANAGER_IMPL );
@@ -113,6 +115,7 @@ public class ArchivaRbacManager
 
                 rbacManagersPerId.put( id, rbacManager );
             }
+
         }
         catch ( RepositoryAdminException e )
         {
@@ -122,12 +125,23 @@ public class ArchivaRbacManager
         }
     }
 
+    private void clearCaches() {
+        resourcesCache.clear();
+        operationsCache.clear();
+        permissionsCache.clear();
+        rolesCache.clear();
+        userAssignmentsCache.clear();
+        userPermissionsCache.clear();
+        effectiveRoleSetCache.clear();
+    }
+
     protected RBACManager getRbacManagerForWrite()
     {
         for ( RBACManager rbacManager : this.rbacManagersPerId.values() )
         {
             if ( !rbacManager.isReadOnly() )
             {
+                log.debug("Writable Rbac manager {}", rbacManager.getDescriptionKey());
                 return rbacManager;
             }
         }


[10/50] archiva git commit: Add admin user check after system configuration change

Posted by ma...@apache.org.
Add admin user check after system configuration change


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/f327eb9b
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/f327eb9b
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/f327eb9b

Branch: refs/heads/citest
Commit: f327eb9b2493e8250e87847d0b167827bcad16df
Parents: 6dcd84d
Author: Martin Stockhammer <ma...@apache.org>
Authored: Wed Oct 26 23:29:11 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Wed Oct 26 23:29:11 2016 +0200

----------------------------------------------------------------------
 .../js/archiva/admin/features/generaladmin/main.js      | 12 ++++++++++--
 .../archiva-webapp/src/main/webapp/js/archiva/main.js   |  5 +++--
 2 files changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/f327eb9b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/generaladmin/main.js
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/generaladmin/main.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/generaladmin/main.js
index 8d3269e..95ed9f3 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/generaladmin/main.js
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/admin/features/generaladmin/main.js
@@ -1358,7 +1358,15 @@ define("archiva/admin/features/generaladmin/main",["jquery","jquery.ui","i18n","
         self.redbackRuntimeConfiguration().rbacManagerImpls.push(beanId);
       }
 
-
+      var adminAvailableResponseFn = function(adminExists) {
+        $.log("admin exists "+adminExists);
+        if (adminExists) {
+          window.sammyArchivaApplication.runRoute("get","#redbackruntimeconfig");
+        } else {
+          logout();
+          displayWelcome();
+        }
+      }
       $.log("rememberme enabled:"+self.redbackRuntimeConfiguration().findPropertyValue("security.rememberme.enabled"));
       $.ajax("restServices/archivaServices/redbackRuntimeConfigurationService/redbackRuntimeConfiguration",
         {
@@ -1368,7 +1376,7 @@ define("archiva/admin/features/generaladmin/main",["jquery","jquery.ui","i18n","
           dataType: 'json',
           success: function(data) {
             var message=$.i18n.prop('redback-runtime-configuration.updated');
-            window.sammyArchivaApplication.runRoute("get","#redbackruntimeconfig");
+            checkCreateAdminLink(adminAvailableResponseFn);
             displaySuccessMessage(message);
           },
           error: function(data) {

http://git-wip-us.apache.org/repos/asf/archiva/blob/f327eb9b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
index cd3f092..1d7dc71 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
@@ -825,14 +825,15 @@ function(jquery,ui,sammy,tmpl,i18n,jqueryCookie,bootstrap,archivaSearch,jqueryVa
         } else {
           createAdminLink.hide();
         }
-        if(callbackFn){
-          callbackFn()
+        if(callbackFn) {
+          callbackFn(adminExists)
         }
         $.log("adminExists:"+adminExists);
       }
     });
   };
 
+
   // handle url with registration link
   checkUrlParams=function(){
     var validateMeId = $.urlParam('validateMe');


[16/50] archiva git commit: java 8

Posted by ma...@apache.org.
java 8

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/b62cf224
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/b62cf224
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/b62cf224

Branch: refs/heads/citest
Commit: b62cf224f0090ec81549c3dde9e0c020894a5b8e
Parents: 52147ba
Author: olivier lamy <ol...@apache.org>
Authored: Thu May 11 21:39:42 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Thu May 11 21:39:42 2017 +1000

----------------------------------------------------------------------
 .travis.yml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/b62cf224/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index af5cacd..207f1b6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
 language: java
 jdk:
-  - openjdk7
-  - oraclejdk7
+  - openjdk8
   - oraclejdk8
 
 before_install: "mvn clean install -DskipTests=true -B -V -Pci-build"


[09/50] archiva git commit: Add name and cache reset

Posted by ma...@apache.org.
Add name and cache reset


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/6dcd84d2
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/6dcd84d2
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/6dcd84d2

Branch: refs/heads/citest
Commit: 6dcd84d2dbf6c8335bcdb3e5c93e3d55498ef0cd
Parents: 14a667c
Author: Martin Stockhammer <ma...@apache.org>
Authored: Wed Oct 26 23:28:43 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Wed Oct 26 23:28:43 2016 +0200

----------------------------------------------------------------------
 .../archiva/web/security/ArchivaConfigurableUsersManager.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/6dcd84d2/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
index 70f75be..9ea05cb 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/java/org/apache/archiva/web/security/ArchivaConfigurableUsersManager.java
@@ -78,7 +78,7 @@ public class ArchivaConfigurableUsersManager
                 setUserManagerImpl( userManagerImpl );
                 userManagerPerId.put( id, userManagerImpl );
             }
-
+            this.usersCache.clear();
             this.useUsersCache = redbackRuntimeConfigurationAdmin.getRedbackRuntimeConfiguration().isUseUsersCache();
         }
         catch ( RepositoryAdminException e )
@@ -333,7 +333,7 @@ public class ArchivaConfigurableUsersManager
     @Override
     public String getId()
     {
-        return null;
+        return "archiva-configurable";
     }
 
     @Override


[26/50] archiva git commit: bump version to 3.0.0-SNAPSHOT

Posted by ma...@apache.org.
bump version to 3.0.0-SNAPSHOT

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/05331582
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/05331582
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/05331582

Branch: refs/heads/citest
Commit: 053315826d996288174fb65f51e2f0b04ef88cde
Parents: cb032a7
Author: olivier lamy <ol...@apache.org>
Authored: Thu May 18 15:04:58 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Thu May 18 15:04:58 2017 +1000

----------------------------------------------------------------------
 archiva-cli/pom.xml                                                | 2 +-
 archiva-docs/pom.xml                                               | 2 +-
 archiva-jetty/pom.xml                                              | 2 +-
 archiva-modules/archiva-base/archiva-checksum/pom.xml              | 2 +-
 archiva-modules/archiva-base/archiva-common/pom.xml                | 2 +-
 archiva-modules/archiva-base/archiva-configuration/pom.xml         | 2 +-
 .../archiva-base/archiva-consumers/archiva-consumer-api/pom.xml    | 2 +-
 .../archiva-consumers/archiva-consumer-archetype/pom.xml           | 2 +-
 .../archiva-base/archiva-consumers/archiva-core-consumers/pom.xml  | 2 +-
 .../archiva-consumers/archiva-lucene-consumers/pom.xml             | 2 +-
 .../archiva-consumers/archiva-metadata-consumer/pom.xml            | 2 +-
 .../archiva-consumers/archiva-signature-consumers/pom.xml          | 2 +-
 archiva-modules/archiva-base/archiva-consumers/pom.xml             | 2 +-
 archiva-modules/archiva-base/archiva-converter/pom.xml             | 2 +-
 archiva-modules/archiva-base/archiva-filelock/pom.xml              | 2 +-
 archiva-modules/archiva-base/archiva-indexer/pom.xml               | 2 +-
 archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml       | 2 +-
 archiva-modules/archiva-base/archiva-maven2-model/pom.xml          | 2 +-
 archiva-modules/archiva-base/archiva-mock/pom.xml                  | 2 +-
 archiva-modules/archiva-base/archiva-model/pom.xml                 | 2 +-
 archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml         | 2 +-
 archiva-modules/archiva-base/archiva-policies/pom.xml              | 2 +-
 archiva-modules/archiva-base/archiva-proxy-api/pom.xml             | 2 +-
 archiva-modules/archiva-base/archiva-proxy-common/pom.xml          | 2 +-
 archiva-modules/archiva-base/archiva-proxy/pom.xml                 | 2 +-
 .../archiva-repository-admin/archiva-repository-admin-api/pom.xml  | 2 +-
 .../archiva-repository-admin-default/pom.xml                       | 2 +-
 archiva-modules/archiva-base/archiva-repository-admin/pom.xml      | 2 +-
 archiva-modules/archiva-base/archiva-repository-layer/pom.xml      | 2 +-
 archiva-modules/archiva-base/archiva-repository-scanner/pom.xml    | 2 +-
 archiva-modules/archiva-base/archiva-security-common/pom.xml       | 2 +-
 archiva-modules/archiva-base/archiva-test-utils/pom.xml            | 2 +-
 archiva-modules/archiva-base/archiva-transaction/pom.xml           | 2 +-
 archiva-modules/archiva-base/archiva-xml-tools/pom.xml             | 2 +-
 archiva-modules/archiva-base/pom.xml                               | 2 +-
 archiva-modules/archiva-karaf/archiva-features/pom.xml             | 2 +-
 archiva-modules/archiva-karaf/pom.xml                              | 2 +-
 archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml    | 2 +-
 .../archiva-scheduler/archiva-scheduler-indexing/pom.xml           | 2 +-
 .../archiva-scheduler/archiva-scheduler-repository-api/pom.xml     | 2 +-
 .../archiva-scheduler/archiva-scheduler-repository/pom.xml         | 2 +-
 archiva-modules/archiva-scheduler/pom.xml                          | 2 +-
 archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml  | 2 +-
 .../archiva-web/archiva-rest/archiva-rest-services/pom.xml         | 2 +-
 archiva-modules/archiva-web/archiva-rest/pom.xml                   | 2 +-
 archiva-modules/archiva-web/archiva-rss/pom.xml                    | 2 +-
 archiva-modules/archiva-web/archiva-security/pom.xml               | 2 +-
 archiva-modules/archiva-web/archiva-test-mocks/pom.xml             | 2 +-
 archiva-modules/archiva-web/archiva-web-common/pom.xml             | 2 +-
 archiva-modules/archiva-web/archiva-webapp-test/pom.xml            | 2 +-
 archiva-modules/archiva-web/archiva-webapp/pom.xml                 | 2 +-
 archiva-modules/archiva-web/archiva-webdav/pom.xml                 | 2 +-
 archiva-modules/archiva-web/pom.xml                                | 2 +-
 archiva-modules/metadata/metadata-model-maven2/pom.xml             | 2 +-
 archiva-modules/metadata/metadata-model/pom.xml                    | 2 +-
 archiva-modules/metadata/metadata-repository-api/pom.xml           | 2 +-
 archiva-modules/metadata/pom.xml                                   | 2 +-
 archiva-modules/metadata/test-repository/pom.xml                   | 2 +-
 archiva-modules/plugins/audit/pom.xml                              | 2 +-
 archiva-modules/plugins/generic-metadata-support/pom.xml           | 2 +-
 archiva-modules/plugins/maven2-repository/pom.xml                  | 2 +-
 archiva-modules/plugins/metadata-store-cassandra/pom.xml           | 2 +-
 archiva-modules/plugins/metadata-store-file/pom.xml                | 2 +-
 archiva-modules/plugins/metadata-store-jcr/pom.xml                 | 2 +-
 archiva-modules/plugins/pom.xml                                    | 2 +-
 archiva-modules/plugins/problem-reports/pom.xml                    | 2 +-
 archiva-modules/plugins/repository-statistics/pom.xml              | 2 +-
 archiva-modules/plugins/stage-repository-merge/pom.xml             | 2 +-
 archiva-modules/pom.xml                                            | 2 +-
 pom.xml                                                            | 2 +-
 70 files changed, 70 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-cli/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-cli/pom.xml b/archiva-cli/pom.xml
index 24b1cc8..da7b779 100644
--- a/archiva-cli/pom.xml
+++ b/archiva-cli/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-cli</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-docs/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-docs/pom.xml b/archiva-docs/pom.xml
index 0780098..c385c0b 100644
--- a/archiva-docs/pom.xml
+++ b/archiva-docs/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-docs</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-jetty/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-jetty/pom.xml b/archiva-jetty/pom.xml
index e88f8e7..f5cbd3e 100644
--- a/archiva-jetty/pom.xml
+++ b/archiva-jetty/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-jetty</artifactId>
   <packaging>pom</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-checksum/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-checksum/pom.xml b/archiva-modules/archiva-base/archiva-checksum/pom.xml
index 280af2a..a027079 100644
--- a/archiva-modules/archiva-base/archiva-checksum/pom.xml
+++ b/archiva-modules/archiva-base/archiva-checksum/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-checksum</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-common/pom.xml b/archiva-modules/archiva-base/archiva-common/pom.xml
index da59826..a81e4c6 100644
--- a/archiva-modules/archiva-base/archiva-common/pom.xml
+++ b/archiva-modules/archiva-base/archiva-common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-common</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-configuration/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-configuration/pom.xml b/archiva-modules/archiva-base/archiva-configuration/pom.xml
index 64c189a..6eb8923 100644
--- a/archiva-modules/archiva-base/archiva-configuration/pom.xml
+++ b/archiva-modules/archiva-base/archiva-configuration/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-configuration</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml
index 5692181..598ffa1 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-consumers</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-consumer-api</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
index f3bc95f..f8af462 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-consumers</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-consumer-archetype</artifactId>
   <packaging>maven-archetype</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
index 00a8029..ff3eb22 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-consumers</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-core-consumers</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
index 5ae4dee..d71f5e1 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-consumers</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-lucene-consumers</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml
index 0c3c621..099d2b8 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <artifactId>archiva-consumers</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-metadata-consumer</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml
index b8a2af3..88ffcaf 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-signature-consumers/pom.xml
@@ -20,7 +20,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-consumers</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-signature-consumers</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-consumers/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-consumers/pom.xml b/archiva-modules/archiva-base/archiva-consumers/pom.xml
index d8c41ac..f4cfc90 100644
--- a/archiva-modules/archiva-base/archiva-consumers/pom.xml
+++ b/archiva-modules/archiva-base/archiva-consumers/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-consumers</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-converter/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-converter/pom.xml b/archiva-modules/archiva-base/archiva-converter/pom.xml
index cb91320..8d729fb 100644
--- a/archiva-modules/archiva-base/archiva-converter/pom.xml
+++ b/archiva-modules/archiva-base/archiva-converter/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-converter</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-filelock/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/pom.xml b/archiva-modules/archiva-base/archiva-filelock/pom.xml
index ed82887..5829da2 100644
--- a/archiva-modules/archiva-base/archiva-filelock/pom.xml
+++ b/archiva-modules/archiva-base/archiva-filelock/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-filelock</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-indexer/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-indexer/pom.xml b/archiva-modules/archiva-base/archiva-indexer/pom.xml
index 906b92c..992314e 100644
--- a/archiva-modules/archiva-base/archiva-indexer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-indexer/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-indexer</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml b/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml
index 1b4b5dc..84edf97 100644
--- a/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml
+++ b/archiva-modules/archiva-base/archiva-maven2-metadata/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-maven2-metadata</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-maven2-model/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-maven2-model/pom.xml b/archiva-modules/archiva-base/archiva-maven2-model/pom.xml
index 58811e3..0198eb4 100644
--- a/archiva-modules/archiva-base/archiva-maven2-model/pom.xml
+++ b/archiva-modules/archiva-base/archiva-maven2-model/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-maven2-model</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-mock/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-mock/pom.xml b/archiva-modules/archiva-base/archiva-mock/pom.xml
index fac7c8f..229eab4 100644
--- a/archiva-modules/archiva-base/archiva-mock/pom.xml
+++ b/archiva-modules/archiva-base/archiva-mock/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-mock</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-model/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-model/pom.xml b/archiva-modules/archiva-base/archiva-model/pom.xml
index aa1738c..93e3e9a 100755
--- a/archiva-modules/archiva-base/archiva-model/pom.xml
+++ b/archiva-modules/archiva-base/archiva-model/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-model</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml b/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml
index 76e7e8a..fe40f62 100644
--- a/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml
+++ b/archiva-modules/archiva-base/archiva-plexus-bridge/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-plexus-bridge</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-policies/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-policies/pom.xml b/archiva-modules/archiva-base/archiva-policies/pom.xml
index 21194a9..947daa4 100644
--- a/archiva-modules/archiva-base/archiva-policies/pom.xml
+++ b/archiva-modules/archiva-base/archiva-policies/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-policies</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-proxy-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy-api/pom.xml b/archiva-modules/archiva-base/archiva-proxy-api/pom.xml
index 148faff..f0d8ab0 100644
--- a/archiva-modules/archiva-base/archiva-proxy-api/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy-api/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-base</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-proxy-api</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-proxy-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy-common/pom.xml b/archiva-modules/archiva-base/archiva-proxy-common/pom.xml
index 806dd86..5fa20f6 100644
--- a/archiva-modules/archiva-base/archiva-proxy-common/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy-common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-base</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-proxy-common</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-proxy/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml
index d1f41f9..c55a1f3 100644
--- a/archiva-modules/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-proxy</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
index 5223848..a57c21f 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-api/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-repository-admin</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-repository-admin-api</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
index 52e61f0..cd32936 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-repository-admin</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-repository-admin-default</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-repository-admin/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/pom.xml
index 1d9e136..f704734 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-repository-admin</artifactId>
   <name>Archiva Base :: Repository Admin</name>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
index 9d730ff..2bfb418 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-layer/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-repository-layer</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
index 24e9b86..8bb08b9 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <artifactId>archiva-base</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-repository-scanner</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-security-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-security-common/pom.xml b/archiva-modules/archiva-base/archiva-security-common/pom.xml
index 5eb8e58..00823b5 100644
--- a/archiva-modules/archiva-base/archiva-security-common/pom.xml
+++ b/archiva-modules/archiva-base/archiva-security-common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-base</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.archiva</groupId>
   <artifactId>archiva-security-common</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-test-utils/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-test-utils/pom.xml b/archiva-modules/archiva-base/archiva-test-utils/pom.xml
index 43d77c1..bb97001 100644
--- a/archiva-modules/archiva-base/archiva-test-utils/pom.xml
+++ b/archiva-modules/archiva-base/archiva-test-utils/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-base</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-test-utils</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-transaction/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-transaction/pom.xml b/archiva-modules/archiva-base/archiva-transaction/pom.xml
index b8003c5..f15b31f 100644
--- a/archiva-modules/archiva-base/archiva-transaction/pom.xml
+++ b/archiva-modules/archiva-base/archiva-transaction/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-transaction</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/archiva-xml-tools/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-xml-tools/pom.xml b/archiva-modules/archiva-base/archiva-xml-tools/pom.xml
index 4770d76..b91c663 100644
--- a/archiva-modules/archiva-base/archiva-xml-tools/pom.xml
+++ b/archiva-modules/archiva-base/archiva-xml-tools/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-base</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-xml-tools</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-base/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/pom.xml b/archiva-modules/archiva-base/pom.xml
index b6a66a7..e78f79b 100644
--- a/archiva-modules/archiva-base/pom.xml
+++ b/archiva-modules/archiva-base/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-modules</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-base</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-karaf/archiva-features/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-karaf/archiva-features/pom.xml b/archiva-modules/archiva-karaf/archiva-features/pom.xml
index 4ceb5a0..aadfb36 100644
--- a/archiva-modules/archiva-karaf/archiva-features/pom.xml
+++ b/archiva-modules/archiva-karaf/archiva-features/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-karaf</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.apache.archiva.karaf</groupId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-karaf/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-karaf/pom.xml b/archiva-modules/archiva-karaf/pom.xml
index 23e673e..ff50a8d 100644
--- a/archiva-modules/archiva-karaf/pom.xml
+++ b/archiva-modules/archiva-karaf/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-modules</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-karaf</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml
index 224e047..38b1af3 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-api/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-scheduler</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-scheduler-api</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
index 97d855e..d38f7b4 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-scheduler</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-scheduler-indexing</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
index fc2e17b..122542a 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository-api/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-scheduler</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-scheduler-repository-api</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
index a7ce836..881d689 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-scheduler</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-scheduler-repository</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-scheduler/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/pom.xml b/archiva-modules/archiva-scheduler/pom.xml
index 5523468..91eaa58 100644
--- a/archiva-modules/archiva-scheduler/pom.xml
+++ b/archiva-modules/archiva-scheduler/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-modules</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-scheduler</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
index e462bde..cdbae65 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-api/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-rest</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-rest-api</artifactId>
   <!-- DO NOT USE bundle packaging generated documentation is not included in the jar !!! -->

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index 20c7c64..d1a4ce2 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-rest</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-rest-services</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-rest/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/pom.xml b/archiva-modules/archiva-web/archiva-rest/pom.xml
index 7a80c01..f1f4a59 100644
--- a/archiva-modules/archiva-web/archiva-rest/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-rest</artifactId>
   <name>Archiva Web :: REST support</name>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-rss/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rss/pom.xml b/archiva-modules/archiva-web/archiva-rss/pom.xml
index 78f20e3..a7bcf76 100644
--- a/archiva-modules/archiva-web/archiva-rss/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rss/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-web</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-rss</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-security/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-security/pom.xml b/archiva-modules/archiva-web/archiva-security/pom.xml
index a398cb7..064af56 100644
--- a/archiva-modules/archiva-web/archiva-security/pom.xml
+++ b/archiva-modules/archiva-web/archiva-security/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-security</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-test-mocks/pom.xml b/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
index 1f97a69..b25a684 100644
--- a/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
+++ b/archiva-modules/archiva-web/archiva-test-mocks/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-test-mocks</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index 63198f8..c8cd116 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-web-common</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index 21070f8..61eb47a 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-webapp-test</artifactId>
   <packaging>pom</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index 7ae0c65..d9920c8 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-webapp</artifactId>
   <packaging>war</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index 888b3a7..0cee94f 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-webdav</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/archiva-web/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/pom.xml b/archiva-modules/archiva-web/pom.xml
index 8f9099e..0df3ad6 100644
--- a/archiva-modules/archiva-web/pom.xml
+++ b/archiva-modules/archiva-web/pom.xml
@@ -19,7 +19,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-modules</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva-web</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/metadata/metadata-model-maven2/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/metadata-model-maven2/pom.xml b/archiva-modules/metadata/metadata-model-maven2/pom.xml
index b9451f5..ad10ffb 100644
--- a/archiva-modules/metadata/metadata-model-maven2/pom.xml
+++ b/archiva-modules/metadata/metadata-model-maven2/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>metadata</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>metadata-model-maven2</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/metadata/metadata-model/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/metadata-model/pom.xml b/archiva-modules/metadata/metadata-model/pom.xml
index b674762..3ddf056 100644
--- a/archiva-modules/metadata/metadata-model/pom.xml
+++ b/archiva-modules/metadata/metadata-model/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>metadata</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>metadata-model</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/metadata/metadata-repository-api/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/metadata-repository-api/pom.xml b/archiva-modules/metadata/metadata-repository-api/pom.xml
index 49974a0..5cc5078 100644
--- a/archiva-modules/metadata/metadata-repository-api/pom.xml
+++ b/archiva-modules/metadata/metadata-repository-api/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>metadata</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>metadata-repository-api</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/metadata/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/pom.xml b/archiva-modules/metadata/pom.xml
index d15dc46..5ce399d 100644
--- a/archiva-modules/metadata/pom.xml
+++ b/archiva-modules/metadata/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-modules</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>metadata</artifactId>
   <name>Archiva :: Metadata</name>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/metadata/test-repository/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/metadata/test-repository/pom.xml b/archiva-modules/metadata/test-repository/pom.xml
index 78ef855..7313a1c 100644
--- a/archiva-modules/metadata/test-repository/pom.xml
+++ b/archiva-modules/metadata/test-repository/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>metadata</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>test-repository</artifactId>
   <name>Archiva Metadata :: Repository for Testing</name>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/audit/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/audit/pom.xml b/archiva-modules/plugins/audit/pom.xml
index d7d5a58..cf37c0d 100644
--- a/archiva-modules/plugins/audit/pom.xml
+++ b/archiva-modules/plugins/audit/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>audit</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/generic-metadata-support/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/generic-metadata-support/pom.xml b/archiva-modules/plugins/generic-metadata-support/pom.xml
index 3a6054c..64120b4 100644
--- a/archiva-modules/plugins/generic-metadata-support/pom.xml
+++ b/archiva-modules/plugins/generic-metadata-support/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>generic-metadata-support</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/maven2-repository/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/maven2-repository/pom.xml b/archiva-modules/plugins/maven2-repository/pom.xml
index 8065fd9..4c97843 100644
--- a/archiva-modules/plugins/maven2-repository/pom.xml
+++ b/archiva-modules/plugins/maven2-repository/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>plugins</artifactId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>maven2-repository</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/metadata-store-cassandra/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-cassandra/pom.xml b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
index 7333459..3e32549 100644
--- a/archiva-modules/plugins/metadata-store-cassandra/pom.xml
+++ b/archiva-modules/plugins/metadata-store-cassandra/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>metadata-store-cassandra</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/metadata-store-file/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-file/pom.xml b/archiva-modules/plugins/metadata-store-file/pom.xml
index 9ac964d..2fcf7eb 100644
--- a/archiva-modules/plugins/metadata-store-file/pom.xml
+++ b/archiva-modules/plugins/metadata-store-file/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>metadata-store-file</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/metadata-store-jcr/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/metadata-store-jcr/pom.xml b/archiva-modules/plugins/metadata-store-jcr/pom.xml
index f476436..8fa3086 100644
--- a/archiva-modules/plugins/metadata-store-jcr/pom.xml
+++ b/archiva-modules/plugins/metadata-store-jcr/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>metadata-store-jcr</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/pom.xml b/archiva-modules/plugins/pom.xml
index 837dba9..039d7e1 100644
--- a/archiva-modules/plugins/pom.xml
+++ b/archiva-modules/plugins/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>archiva-modules</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>plugins</artifactId>
   <name>Archiva :: Core Plugins</name>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/problem-reports/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/problem-reports/pom.xml b/archiva-modules/plugins/problem-reports/pom.xml
index 989344e..20db52b 100644
--- a/archiva-modules/plugins/problem-reports/pom.xml
+++ b/archiva-modules/plugins/problem-reports/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>problem-reports</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/repository-statistics/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/repository-statistics/pom.xml b/archiva-modules/plugins/repository-statistics/pom.xml
index dc2f40c..2d20aca 100644
--- a/archiva-modules/plugins/repository-statistics/pom.xml
+++ b/archiva-modules/plugins/repository-statistics/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <artifactId>repository-statistics</artifactId>
   <packaging>bundle</packaging>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/plugins/stage-repository-merge/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/plugins/stage-repository-merge/pom.xml b/archiva-modules/plugins/stage-repository-merge/pom.xml
index 3b099e7..d425434 100644
--- a/archiva-modules/plugins/stage-repository-merge/pom.xml
+++ b/archiva-modules/plugins/stage-repository-merge/pom.xml
@@ -22,7 +22,7 @@
   <parent>
     <artifactId>plugins</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <groupId>org.apache.archiva</groupId>
   <artifactId>stage-repository-merge</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/archiva-modules/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/pom.xml b/archiva-modules/pom.xml
index a16b3eb..ad65c36 100644
--- a/archiva-modules/pom.xml
+++ b/archiva-modules/pom.xml
@@ -21,7 +21,7 @@
   <parent>
     <artifactId>archiva</artifactId>
     <groupId>org.apache.archiva</groupId>
-    <version>2.2.4-SNAPSHOT</version>
+    <version>3.0.0-SNAPSHOT</version>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>archiva-modules</artifactId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/05331582/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 98c9f95..92197f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,7 +27,7 @@
   </parent>
 
   <artifactId>archiva</artifactId>
-  <version>2.2.4-SNAPSHOT</version>
+  <version>3.0.0-SNAPSHOT</version>
   <packaging>pom</packaging>
 
   <name>Apache Archiva</name>


[49/50] archiva git commit: Trying to fix chrome issues with the WebDriver

Posted by ma...@apache.org.
Trying to fix chrome issues with the WebDriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/edb7bd34
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/edb7bd34
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/edb7bd34

Branch: refs/heads/citest
Commit: edb7bd346b06f1513cbaa1e637c630e4e90ea0df
Parents: 5aab7ac
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sat Jun 10 11:34:59 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sat Jun 10 11:34:59 2017 +0200

----------------------------------------------------------------------
 .../test/java/org/apache/archiva/web/test/RepositoryAdminTest.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/edb7bd34/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
index 6dbf5eb..c1eccfa 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
@@ -54,7 +54,7 @@ public class RepositoryAdminTest
         tryClick( el,  ExpectedConditions.presenceOfElementLocated( By.id( "managed-repositories-view-a" ) ),
             "Managed Repositories not activated");
         el = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#remote-repositories-content']")));
-        tryClick(el,ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")),
+        tryClick(el,ExpectedConditions.visibilityOfElementLocated(By.xpath("//table[@id='remote-repositories-table']//td[contains(text(),'central')]")),
             "Remote Repositories View not available");
         el = wait.until(ExpectedConditions.elementToBeClickable( By.xpath("//a[@href='#remote-repository-edit']") ));
         el = tryClick(el, ExpectedConditions.visibilityOfElementLocated(By.id("remote-repository-save-button")),


[43/50] archiva git commit: Improving robustness of JS Tests

Posted by ma...@apache.org.
Improving robustness of JS Tests

Fixed timing issues that occurred during javascript updates.


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/85352aae
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/85352aae
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/85352aae

Branch: refs/heads/citest
Commit: 85352aae7d53a6de4f8839987025d1ec643c7f04
Parents: 75f14a9
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Jun 9 21:35:31 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Jun 9 21:35:31 2017 +0200

----------------------------------------------------------------------
 .../archiva/web/test/RepositoryAdminTest.java   | 34 +++++-----
 .../archiva/web/test/WebDriverBrowseTest.java   |  7 ---
 .../apache/archiva/web/test/WebDriverTest.java  |  6 +-
 .../web/test/parent/AbstractArchivaTest.java    | 15 ++---
 .../web/test/parent/AbstractSeleniumTest.java   | 66 ++++++++++++++++----
 .../tools/ArchivaSeleniumExecutionRule.java     |  3 +
 6 files changed, 85 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/85352aae/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
index 0ea8580..d9d0da1 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
@@ -48,30 +48,34 @@ public class RepositoryAdminTest
     public void testManagedRepository()
     {
         login( getAdminUsername(), getAdminPassword() );
-        WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
-        wait.until(ExpectedConditions.elementToBeClickable(By.id("menu-repositories-list-a")));
-        clickLinkWithLocator( "menu-repositories-list-a");
-        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("managed-repositories-view-a")));
-        clickLinkWithXPath( "//a[@href='#remote-repositories-content']");
-        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")));
-        clickLinkWithXPath( "//a[@href='#remote-repository-edit']", false );
-        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repository-save-button")));
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 20);
+        WebElement el;
+        el = wait.until(ExpectedConditions.elementToBeClickable(By.id("menu-repositories-list-a")));
+        tryClick( el,  ExpectedConditions.presenceOfElementLocated( By.id( "managed-repositories-view-a" ) ),
+            "Managed Repositories not activated");
+        el = wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//a[@href='#remote-repositories-content']")));
+        tryClick(el,ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")),
+            "Remote Repositories View not available");
+        el = wait.until(ExpectedConditions.elementToBeClickable( By.xpath("//a[@href='#remote-repository-edit']") ));
+        el = tryClick(el, ExpectedConditions.visibilityOfElementLocated(By.id("remote-repository-save-button")),
+            "Repository Save Button not available");
         
         setFieldValue( "id", "myrepoid" );        
         setFieldValue( "name", "My repo name" );        
         setFieldValue( "url", "http://www.repo.org" );
         
-        clickButtonWithLocator( "remote-repository-save-button");
+        el.click();
         wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")));
-
-        clickLinkWithLocator( "menu-proxy-connectors-list-a");
+        el = wait.until(ExpectedConditions.elementToBeClickable( By.id("menu-proxy-connectors-list-a") ));
+        el.click();
         wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connectors-view-tabs-a-network-proxies-grid")));
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("main-content"), "Proxy Connectors"));
         // proxy connect
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
         assertTextNotPresent( "myrepoid" );
-        clickButtonWithLocator( "proxy-connectors-view-tabs-a-edit");
-        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connector-btn-save")));
+        el = wait.until(ExpectedConditions.elementToBeClickable( By.id("proxy-connectors-view-tabs-a-edit") ));
+        el.click();
+        el = wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connector-btn-save")));
         selectValue( "sourceRepoId", "internal" );
         // Workaround
         // TODO: Check after upgrade of htmlunit, bootstrap or jquery
@@ -80,7 +84,7 @@ public class RepositoryAdminTest
         // End of Workaround
         wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("targetRepoId")));
         selectValue( "targetRepoId", "myrepoid" );
-        clickButtonWithLocator( "proxy-connector-btn-save");
+        el.click();
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("user-messages"),"ProxyConnector added"));
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
         wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "myrepoid" ));
@@ -88,7 +92,7 @@ public class RepositoryAdminTest
         // This is needed here for HTMLUnit Tests. Currently do not know why, wait is not working for the
         // list entries down
         waitPage();
-        WebElement el = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("proxy-connector-edit-order-div")));
+        el = wait.until(ExpectedConditions.presenceOfElementLocated(By.id("proxy-connector-edit-order-div")));
         assertTextPresent( "internal" );
         List<WebElement> repos = el.findElements(By.xpath("./div"));
         Assert.assertTrue("First repo is myrepo", repos.get(0).getText().contains("myrepoid"));

http://git-wip-us.apache.org/repos/asf/archiva/blob/85352aae/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
index 2470494..17b9015 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
@@ -141,13 +141,6 @@ public class WebDriverBrowseTest
         {
             elements = find( By.id("login-link-a"));
             WebElement webElement = elements.get( 0 ).getElement();
-            for(FluentWebElement element : elements) {
-                log.info("Found login link: "+element.getElement().getTagName()+ " "+ element.getElement().getText());
-            }
-            log.info("innerText: "+webElement.getAttribute("innerText"));
-            log.info("value: "+webElement.getAttribute("value"));
-            log.info("innerHTML: "+webElement.getAttribute( "innerHTML" ));
-            log.info("JS: "+((( JavascriptExecutor)getDriver()).executeScript("return $(arguments[0]).text();", webElement)));
             if (getDriver() instanceof HtmlUnitDriver) {
                 Assert.assertEquals( "LOGIN", webElement.getText().toUpperCase() );
             } else

http://git-wip-us.apache.org/repos/asf/archiva/blob/85352aae/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
index a27ee47..0cdce65 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
@@ -51,7 +51,7 @@ public class WebDriverTest
         extends FluentTest
 {
 
-    final Logger log = LoggerFactory.getLogger( WebDriver.class );
+    final Logger log = LoggerFactory.getLogger( WebDriverTest.class );
 
     @Override
     public void takeScreenShot( String fileName )
@@ -100,10 +100,6 @@ public class WebDriverTest
                 log.info("Found login link: "+element.getElement().getTagName()+ " "+ element.getElement().getText());
             }
             WebElement webElement = elements.get(0).getElement();
-            log.info("innerText: "+webElement.getAttribute("innerText"));
-            log.info("value: "+webElement.getAttribute("value"));
-            log.info("innerHTML: "+webElement.getAttribute( "innerHTML" ));
-            log.info("JS: "+(((JavascriptExecutor)getDriver()).executeScript("return $(arguments[0]).text();", webElement)));
             if (getDriver() instanceof HtmlUnitDriver ) {
                 Assert.assertEquals( "LOGIN", webElement.getText().toUpperCase() );
             } else

http://git-wip-us.apache.org/repos/asf/archiva/blob/85352aae/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
index 4409ae3..44907ab 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
@@ -3,6 +3,7 @@ package org.apache.archiva.web.test.parent;
 import org.junit.runner.RunWith;
 import org.junit.runners.BlockJUnit4ClassRunner;
 import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
 import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.WebDriverWait;
 
@@ -101,10 +102,11 @@ public abstract class AbstractArchivaTest
     {
         login( getAdminUsername(), getAdminPassword() );
         WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
-        clickLinkWithLocator( "menu-users-list-a");
-        wait.until(ExpectedConditions.elementToBeClickable(By.id("users-view-tabs-li-user-edit-a")));
-        clickLinkWithLocator( "users-view-tabs-li-user-edit-a");
-        wait.until(ExpectedConditions.elementToBeClickable(By.id("user-create-form-register-button")));
+        WebElement el = wait.until(ExpectedConditions.elementToBeClickable( By.id("menu-users-list-a") ));
+        el = tryClick(el, ExpectedConditions.elementToBeClickable(By.id("users-view-tabs-li-user-edit-a")), "User List not available");
+        el = tryClick(el, ExpectedConditions.elementToBeClickable(By.id("users-view-tabs-li-user-edit-a")),"User Edit View not available");
+        el = tryClick(el, ExpectedConditions.elementToBeClickable(By.id("user-create-form-register-button")),
+            "Register Form not available");
         assertCreateUserPage();
         setFieldValue( "username", userName );
         setFieldValue( "fullname", fullName );
@@ -112,10 +114,9 @@ public abstract class AbstractArchivaTest
         setFieldValue( "password", password );
         setFieldValue( "confirmPassword", confirmPassword );
 
-        clickLinkWithLocator( "user-create-form-register-button");
+        el.click();
 
-        wait.until(ExpectedConditions.presenceOfElementLocated(By.id("users-grid-user-id-" + userName)));
-        assertTextPresent( "User " + userName + " created." );
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("user-messages"),"User " + userName + " created." ));
         assertElementPresent( "users-grid-user-id-" + userName );
 
         if ( valid )

http://git-wip-us.apache.org/repos/asf/archiva/blob/85352aae/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index d6d4a1f..698d6a0 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -19,30 +19,22 @@ package org.apache.archiva.web.test.parent;
  * under the License.
  */
 
-import com.thoughtworks.selenium.Selenium;
-import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
 import org.apache.archiva.web.test.tools.ArchivaSeleniumExecutionRule;
 import org.apache.archiva.web.test.tools.WebdriverUtility;
 import org.junit.Assert;
 import org.junit.Rule;
 
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.nio.file.Files;
 import java.nio.file.Path;
-import java.sql.Time;
 import java.text.SimpleDateFormat;
-import java.util.Arrays;
 import java.util.Date;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
 
-import org.apache.commons.io.FileUtils;
 import org.openqa.selenium.*;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 import org.openqa.selenium.support.ui.ExpectedConditions;
@@ -294,10 +286,7 @@ public abstract class AbstractSeleniumTest
         WebElement passwordField = wait.until(ExpectedConditions.visibilityOf(getWebDriver().findElement(By.id("user-login-form-password"))));
         wait = new WebDriverWait(getWebDriver(),5);
         WebElement button = wait.until(ExpectedConditions.elementToBeClickable(By.id("modal-login-ok")));
-        logger.info("Login form visible");
-        logger.info("Enter username "+username);
         usernameField.sendKeys(username);
-        logger.info("Enter password "+password);
         passwordField.sendKeys(password);
         /*
         if ( rememberMe )
@@ -631,6 +620,59 @@ public abstract class AbstractSeleniumTest
         }
     }
 
+    /**
+     * Executes click() on the WebElement <code>el</code> and waits for the conditions.
+     * If the condition is not fulfilled in <code>maxWaitTimeInS</code>, the click is executed again
+     * and waits again for the condition.
+     * After the number of attempts as given by the parameter an assertion error will be thrown, with
+     * the given <code>message</code>.
+     *
+     * If the click was successful the element is returned that was created by the condition.
+     *
+     * @param el The element where the click is executed
+     * @param conditions The conditions to wait for after the click
+     * @param message The assertion messages
+     * @param attempts Maximum number of click attempts
+     * @param maxWaitTimeInS The time in seconds to wait that the condition is fulfilled.
+     * @param <V> The return type
+     * @return
+     */
+    public <V> V tryClick( WebElement el, Function<? super WebDriver, V> conditions, String message, int attempts, int maxWaitTimeInS)
+    {
+        int count = attempts;
+        WebDriverWait wait = new WebDriverWait( getWebDriver(), maxWaitTimeInS );
+        V result = null;
+        Exception ex = null;
+        while(count>0)
+        {
+            el.click();
+            try
+            {
+                result = wait.until( conditions  );
+                count=0;
+                ex = null;
+            } catch (Exception e) {
+                ex = e;
+                count--;
+            }
+        }
+        if (ex!=null) {
+            Assert.fail( message);
+        }
+        return result;
+    }
+
+    public <V> V tryClick(WebElement el, Function<? super WebDriver, V> conditions, String message, int attempts )
+    {
+        return tryClick( el, conditions, message, attempts, 10 );
+    }
+
+    public <V> V tryClick(WebElement el, Function<? super WebDriver, V> conditions, String message)
+    {
+        return tryClick( el, conditions, message, 3);
+    }
+
+
     public void setFieldValues( Map<String, String> fieldMap )
     {
         Map.Entry<String, String> entry;

http://git-wip-us.apache.org/repos/asf/archiva/blob/85352aae/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
index 16417fa..40260c9 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
@@ -41,12 +41,15 @@ public class ArchivaSeleniumExecutionRule
     {
         try
         {
+            log.info("Test "+method.getDeclaringClass().getName()+"#"+method.getName());
             ( (AbstractSeleniumTest) target ).open();
             method.getMethod().invoke( target );
         }
         catch ( Throwable e )
         {
+
             log.info("Exception thrown in Selenium test: "+e.getClass().getName()+" - "+e.getMessage());
+            log.info("Method "+method.getName());
             String fileName =
                 ( (AbstractSeleniumTest) target ).captureScreenShotOnFailure( e, method.getMethod().getName(),
                                                                               target.getClass().getName() );


[20/50] archiva git commit: fix link

Posted by ma...@apache.org.
fix link

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/25796870
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/25796870
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/25796870

Branch: refs/heads/citest
Commit: 25796870f2475ec4857d05b1c54540a6221a323e
Parents: dc97f3e
Author: olivier lamy <ol...@apache.org>
Authored: Sat May 13 09:05:07 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Sat May 13 09:05:07 2017 +1000

----------------------------------------------------------------------
 archiva-jetty/src/main/conf/jetty.xml | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/25796870/archiva-jetty/src/main/conf/jetty.xml
----------------------------------------------------------------------
diff --git a/archiva-jetty/src/main/conf/jetty.xml b/archiva-jetty/src/main/conf/jetty.xml
index 77a8abb..63e4719 100644
--- a/archiva-jetty/src/main/conf/jetty.xml
+++ b/archiva-jetty/src/main/conf/jetty.xml
@@ -19,13 +19,13 @@
   ~ under the License.
   -->
 
-<!-- =============================================================== -->
-<!-- Configure the Jetty Server                                      -->
-<!--                                                                 -->
-<!-- Documentation of this file format can be found at:              -->
-<!-- http://docs.codehaus.org/display/JETTY/jetty.xml                -->
-<!--                                                                 -->
-<!-- =============================================================== -->
+<!-- ============================================================================= -->
+<!-- Configure the Jetty Server                                                    -->
+<!--                                                                               -->
+<!-- Documentation of this file format can be found at:                            -->
+<!-- https://www.eclipse.org/jetty/documentation/9.4.x/reference-section.html      -->
+<!--                                                                               -->
+<!-- ============================================================================= -->
 
 
 <Configure id="Server" class="org.eclipse.jetty.server.Server">
@@ -49,7 +49,6 @@
   <!-- =========================================================== -->
   <!-- Set connectors                                              -->
   <!-- =========================================================== -->
-  <!-- One of each type!                                           -->
   <!-- =========================================================== -->
 
   <!-- Use this connector for many frequently idle connections


[35/50] archiva git commit: [MRM-1945] Fixing race condition

Posted by ma...@apache.org.
[MRM-1945] Fixing race condition

Do not return used locks anymore. If the lock map contains
an entry already, the retry loop continues.


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/878287b7
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/878287b7
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/878287b7

Branch: refs/heads/citest
Commit: 878287b7b3a8c42a4a78028ca4d7b5204b4a5ab8
Parents: 2d23c4a
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun May 28 22:32:29 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun May 28 22:40:07 2017 +0200

----------------------------------------------------------------------
 .../common/filelock/DefaultFileLockManager.java | 59 ++++++++++++++------
 .../filelock/DefaultFileLockManagerTest.java    | 20 +++++--
 2 files changed, 57 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/878287b7/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
index ee4fb35..dcfeb04 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
@@ -71,6 +71,8 @@ public class DefaultFileLockManager
 
         while ( !acquired )
         {
+            // Make sure that not a bad lock is returned, if a exception was thrown.
+            lock = null;
 
             if ( timeout > 0 )
             {
@@ -88,7 +90,7 @@ public class DefaultFileLockManager
 
             if ( current != null )
             {
-                log.debug( "read lock file exist continue wait" );
+                log.trace( "read lock file exist continue wait" );
                 continue;
             }
 
@@ -97,7 +99,22 @@ public class DefaultFileLockManager
                 lock = new Lock( file, false );
                 createNewFileQuietly( file );
                 lock.openLock( false, timeout > 0 );
-                acquired = true;
+                // We are not returning an existing lock. If the lock is not
+                // exclusive, another thread may release the lock and the client
+                // knows nothing about it.
+                // The only atomic operation is the putIfAbsent operation, so if
+                // this returns null everything is OK, otherwise we should start at
+                // the beginning.
+                current = lockFiles.putIfAbsent( file, lock );
+                if ( current == null )
+                {
+                    // Success
+                    acquired = true;
+                } else {
+                    // We try again
+                    lock.close();
+                    lock=null;
+                }
             }
             catch ( FileNotFoundException e )
             {
@@ -116,14 +133,10 @@ public class DefaultFileLockManager
             }
             catch ( IllegalStateException e )
             {
-                log.debug( "openLock {}:{}", e.getClass(), e.getMessage() );
+                log.trace( "openLock {}:{}", e.getClass(), e.getMessage() );
             }
         }
-        Lock current = lockFiles.putIfAbsent( file, lock );
-        if ( current != null )
-        {
-            lock = current;
-        }
+
         return lock;
 
     }
@@ -149,7 +162,8 @@ public class DefaultFileLockManager
 
         while ( !acquired )
         {
-
+            // Make sure that not a bad lock is returned, if a exception was thrown.
+            lock = null;
             if ( timeout > 0 )
             {
                 long delta = stopWatch.getTime();
@@ -169,14 +183,29 @@ public class DefaultFileLockManager
 
                 if ( current != null )
                 {
-                    log.debug( "write lock file exist continue wait" );
+                    log.trace( "write lock file exist continue wait" );
 
                     continue;
                 }
                 lock = new Lock( file, true );
                 createNewFileQuietly( file );
                 lock.openLock( true, timeout > 0 );
-                acquired = true;
+                // We are not returning an existing lock. If the lock is not
+                // exclusive, another thread may release the lock and the client
+                // knows nothing about it.
+                // The only atomic operation is the putIfAbsent operation, so if
+                // this returns null everything is OK, otherwise we should start at
+                // the beginning.
+                current = lockFiles.putIfAbsent( file, lock );
+                if ( current == null )
+                {
+                    // Success
+                    acquired = true;
+                } else {
+                    // We try again
+                    lock.close();
+                    lock=null;
+                }
             }
             catch ( FileNotFoundException e )
             {
@@ -195,16 +224,10 @@ public class DefaultFileLockManager
             }
             catch ( IllegalStateException e )
             {
-                log.debug( "openLock {}:{}", e.getClass(), e.getMessage() );
+                log.trace( "openLock {}:{}", e.getClass(), e.getMessage() );
             }
         }
 
-        Lock current = lockFiles.putIfAbsent( file, lock );
-        if ( current != null )
-        {
-            lock = current;
-        }
-
         return lock;
 
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/878287b7/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
index 7fa30b5..af189ba 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/test/java/org/apache/archiva/common/filelock/DefaultFileLockManagerTest.java
@@ -144,11 +144,14 @@ public class DefaultFileLockManagerTest {
             try {
                 logger.info("thread3");
                 Lock lock = fileLockManager.readFileLock(this.file);
+                Path outFile = null;
                 try {
+                    outFile = Files.createTempFile("foo", ".jar");
                     Files.copy(Paths.get(lock.getFile().getPath()),
-                            new FileOutputStream(File.createTempFile("foo", ".jar")));
+                            Files.newOutputStream(outFile));
                 } finally {
                     fileLockManager.release(lock);
+                    if (outFile!=null) Files.delete( outFile );
                 }
                 logger.info("thread3 ok");
                 success.incrementAndGet();
@@ -207,10 +210,13 @@ public class DefaultFileLockManagerTest {
             try {
                 logger.info("thread6");
                 Lock lock = fileLockManager.readFileLock(this.file);
+                Path outFile = null;
                 try {
-                    Files.copy(lock.getFile().toPath(), new FileOutputStream(File.createTempFile("foo", ".jar")));
+                    outFile = Files.createTempFile("foo", ".jar");
+                    Files.copy(lock.getFile().toPath(), Files.newOutputStream( outFile ));
                 } finally {
                     fileLockManager.release(lock);
+                    if (outFile!=null) Files.delete( outFile );
                 }
                 logger.info("thread6 ok");
                 success.incrementAndGet();
@@ -248,10 +254,13 @@ public class DefaultFileLockManagerTest {
             try {
                 logger.info("thread8");
                 Lock lock = fileLockManager.readFileLock(this.file);
+                Path outFile = null;
                 try {
-                    Files.copy(lock.getFile().toPath(), new FileOutputStream(File.createTempFile("foo", ".jar")));
+                    outFile = Files.createTempFile("foo", ".jar");
+                    Files.copy(lock.getFile().toPath(), Files.newOutputStream( outFile ));
                 } finally {
                     fileLockManager.release(lock);
+                    if (outFile!=null) Files.delete( outFile );
                 }
                 logger.info("thread8 ok");
                 success.incrementAndGet();
@@ -288,10 +297,13 @@ public class DefaultFileLockManagerTest {
             try {
                 logger.info("thread10");
                 Lock lock = fileLockManager.readFileLock(this.file);
+                Path outFile = null;
                 try {
-                    Files.copy(lock.getFile().toPath(), new FileOutputStream(File.createTempFile("foo", ".jar")));
+                    outFile = Files.createTempFile("foo", ".jar");
+                    Files.copy(lock.getFile().toPath(), Files.newOutputStream( outFile ));
                 } finally {
                     fileLockManager.release(lock);
+                    if (outFile!=null) Files.delete(outFile);
                 }
                 logger.info("thread10 ok");
                 success.incrementAndGet();


[08/50] archiva git commit: Change userManager reference for configuration service

Posted by ma...@apache.org.
Change userManager reference for configuration service


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/14a667c4
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/14a667c4
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/14a667c4

Branch: refs/heads/citest
Commit: 14a667c4a0a171a84d83ee4b2acb608d1041589a
Parents: e6950bb
Author: Martin Stockhammer <ma...@apache.org>
Authored: Wed Oct 26 23:28:01 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Wed Oct 26 23:28:01 2016 +0200

----------------------------------------------------------------------
 .../rest/services/DefaultRedbackRuntimeConfigurationService.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/14a667c4/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
index d75d075..4b3db12 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRedbackRuntimeConfigurationService.java
@@ -67,7 +67,7 @@ public class DefaultRedbackRuntimeConfigurationService
     private RedbackRuntimeConfigurationAdmin redbackRuntimeConfigurationAdmin;
 
     @Inject
-    @Named(value = "userManager#configurable")
+    @Named(value = "userManager#default")
     private UserManager userManager;
 
     @Inject


[42/50] archiva git commit: Fix for older docker versions

Posted by ma...@apache.org.
Fix for older docker versions


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/75f14a95
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/75f14a95
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/75f14a95

Branch: refs/heads/citest
Commit: 75f14a95d9fbe62de9c2529562e8a004d969fcb1
Parents: 8183ff1
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Jun 9 18:26:17 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Jun 9 18:26:17 2017 +0200

----------------------------------------------------------------------
 src/ci/scripts/container_webtest.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/75f14a95/src/ci/scripts/container_webtest.sh
----------------------------------------------------------------------
diff --git a/src/ci/scripts/container_webtest.sh b/src/ci/scripts/container_webtest.sh
index 0b73d84..e06d5d2 100644
--- a/src/ci/scripts/container_webtest.sh
+++ b/src/ci/scripts/container_webtest.sh
@@ -39,6 +39,8 @@ TAG="${CONTAINER_NAME}:${CONTAINER_VERSION}"
 
 START_ARG="$1"
 
+docker -v
+
 function stop_instance() {
   CONT=`docker ps -q --filter=name=${INSTANCE_NAME}`
   if [ "${CONT}" != "" ]; then
@@ -55,7 +57,7 @@ function stop_instance() {
 
 function start_instance() {
   echo "Starting container ${INSTANCE_NAME}"
-  docker run -d --network="${NETWORK_TYPE}" -p "${PORT_MAPPING}" --name "${INSTANCE_NAME}" "${TAG}"
+  docker run -d --net="${NETWORK_TYPE}" -p "${PORT_MAPPING}" --name "${INSTANCE_NAME}" "${TAG}"
 }
 
 function print_usage() {


[12/50] archiva git commit: Reverting locking modifications

Posted by ma...@apache.org.
Reverting locking modifications


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/4c35ccef
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/4c35ccef
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/4c35ccef

Branch: refs/heads/citest
Commit: 4c35ccef7b3cbad1536077febbb8395abac4d70c
Parents: 40816fc
Author: Martin Stockhammer <ma...@apache.org>
Authored: Thu Oct 27 17:36:27 2016 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Thu Oct 27 17:36:27 2016 +0200

----------------------------------------------------------------------
 .../common/filelock/DefaultFileLockManager.java | 39 ++++----------------
 1 file changed, 7 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/4c35ccef/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
index 258366a..ee4fb35 100644
--- a/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
+++ b/archiva-modules/archiva-base/archiva-filelock/src/main/java/org/apache/archiva/common/filelock/DefaultFileLockManager.java
@@ -31,7 +31,6 @@ import java.io.RandomAccessFile;
 import java.nio.channels.ClosedChannelException;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
 
 /**
  * @author Olivier Lamy
@@ -52,6 +51,7 @@ public class DefaultFileLockManager
 
     private int timeout = 0;
 
+
     @Override
     public Lock readFileLock( File file )
         throws FileLockException, FileLockTimeoutException
@@ -162,18 +162,20 @@ public class DefaultFileLockManager
                 }
             }
 
+            Lock current = lockFiles.get( file );
+
             try
             {
-                Lock current = lockFiles.get( file );
+
                 if ( current != null )
                 {
                     log.debug( "write lock file exist continue wait" );
 
                     continue;
                 }
-                lock = new Lock(file, true);
-                createNewFileQuietly(file);
-                lock.openLock(true, timeout > 0);
+                lock = new Lock( file, true );
+                createNewFileQuietly( file );
+                lock.openLock( true, timeout > 0 );
                 acquired = true;
             }
             catch ( FileNotFoundException e )
@@ -189,47 +191,20 @@ public class DefaultFileLockManager
             }
             catch ( IOException e )
             {
-                if (lock!=null && lock.isValid()) {
-                    try {
-                        lock.close();
-                    } catch (IOException ex) {
-                        // Ignore
-                    }
-                }
                 throw new FileLockException( e.getMessage(), e );
             }
             catch ( IllegalStateException e )
             {
-                // Ignore this
                 log.debug( "openLock {}:{}", e.getClass(), e.getMessage() );
-            } catch (Throwable t) {
-                if (lock!=null && lock.isValid()) {
-                    try {
-                        lock.close();
-                    } catch (IOException ex) {
-                        // Ignore
-                    }
-                }
-                throw t;
             }
-
         }
 
         Lock current = lockFiles.putIfAbsent( file, lock );
-        if (lock!=null && lock != current) {
-            try {
-                lock.close();
-            } catch (IOException e) {
-                // ignore
-            }
-
-        }
         if ( current != null )
         {
             lock = current;
         }
 
-
         return lock;
 
 


[17/50] archiva git commit: no openjdk8

Posted by ma...@apache.org.
no openjdk8

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/3c036f32
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/3c036f32
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/3c036f32

Branch: refs/heads/citest
Commit: 3c036f325b442deea22f8e6e8d76f056fca1147c
Parents: b62cf22
Author: olivier lamy <ol...@apache.org>
Authored: Thu May 11 21:41:17 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Thu May 11 21:41:17 2017 +1000

----------------------------------------------------------------------
 .travis.yml | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/3c036f32/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 207f1b6..e8ce223 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,6 +1,5 @@
 language: java
 jdk:
-  - openjdk8
   - oraclejdk8
 
 before_install: "mvn clean install -DskipTests=true -B -V -Pci-build"


[14/50] archiva git commit: Use JPA as default and only database backend

Posted by ma...@apache.org.
Use JPA as default and only database backend

Remove the JDO dependencies and set the JPA implementation as only
database alternative and default implementation. Uses the same database
as JDO before.


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/dd311845
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/dd311845
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/dd311845

Branch: refs/heads/citest
Commit: dd311845e13f46062251744f7cc2cfd21e2e5cf4
Parents: dfcef53
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Dec 30 15:35:19 2016 +0100
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Dec 30 15:35:19 2016 +0100

----------------------------------------------------------------------
 .../archiva-base/archiva-indexer/pom.xml        |  5 ++
 .../archiva-base/archiva-proxy/pom.xml          |  6 ++
 .../archiva-repository-admin-default/pom.xml    |  6 ++
 .../archiva-scheduler-indexing/pom.xml          |  6 ++
 .../archiva-rest/archiva-rest-services/pom.xml  | 12 ++++
 .../RedbackRuntimeConfigurationServiceTest.java |  8 +--
 .../resources/META-INF/spring-context-test.xml  |  2 +-
 .../archiva-web/archiva-web-common/pom.xml      | 12 ++++
 .../main/resources/META-INF/spring-context.xml  |  2 +-
 .../archiva/web/rss/SecuritySystemStub.java     |  4 +-
 .../spring-context-artifacts-download.xml       |  1 -
 .../resources/spring-context-test-common.xml    |  2 +-
 .../main/resources/META-INF/spring-context.xml  |  2 +-
 .../main/webapp/WEB-INF/applicationContext.xml  | 59 +++++++++-----------
 .../src/main/webapp/WEB-INF/web.xml             |  6 --
 .../src/test/tomcat/log4j2-test.xml             |  9 ++-
 .../src/test/tomcat/tomcat-context-archiva.xml  |  7 +--
 .../archiva-web/archiva-webdav/pom.xml          |  5 ++
 .../spring-context-servlet-security-test.xml    |  2 +-
 .../src/test/resources/spring-context.xml       |  2 +-
 pom.xml                                         | 11 ++++
 21 files changed, 110 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-base/archiva-indexer/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-indexer/pom.xml b/archiva-modules/archiva-base/archiva-indexer/pom.xml
index 6996bdd..99b4bc2 100644
--- a/archiva-modules/archiva-base/archiva-indexer/pom.xml
+++ b/archiva-modules/archiva-base/archiva-indexer/pom.xml
@@ -168,6 +168,11 @@
       <artifactId>xercesImpl</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <pluginManagement>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-base/archiva-proxy/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml
index 0cc6cb7..c5ccbdf 100644
--- a/archiva-modules/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml
@@ -209,6 +209,12 @@
       <artifactId>assertj-core</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
   <build>
     <plugins>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
index 1bca20b..cfee935 100644
--- a/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
+++ b/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
@@ -235,6 +235,12 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
index f1c74ae..bad98fc 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
@@ -177,6 +177,12 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index 39bafe6..3436e6a 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -315,6 +315,12 @@
       <scope>test</scope>
       <version>${redback.version}</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.archiva.redback</groupId>
+      <artifactId>redback-keys-jpa</artifactId>
+      <scope>test</scope>
+      <version>${redback.version}</version>
+    </dependency>
 
     <dependency>
       <groupId>org.apache.archiva</groupId>
@@ -323,6 +329,12 @@
     </dependency>
 
     <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
       <scope>test</scope>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RedbackRuntimeConfigurationServiceTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RedbackRuntimeConfigurationServiceTest.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RedbackRuntimeConfigurationServiceTest.java
index 42d99a5..bddb302 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RedbackRuntimeConfigurationServiceTest.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/java/org/apache/archiva/rest/services/RedbackRuntimeConfigurationServiceTest.java
@@ -40,7 +40,7 @@ public class RedbackRuntimeConfigurationServiceTest
     {
         RedbackRuntimeConfiguration redbackRuntimeConfiguration =
             getRedbackRuntimeConfigurationService().getRedbackRuntimeConfiguration();
-        assertEquals( "jdo", redbackRuntimeConfiguration.getUserManagerImpls().get( 0 ) );
+        assertEquals( "jpa", redbackRuntimeConfiguration.getUserManagerImpls().get( 0 ) );
     }
 
     @Test
@@ -49,7 +49,7 @@ public class RedbackRuntimeConfigurationServiceTest
     {
         RedbackRuntimeConfiguration redbackRuntimeConfiguration =
             getRedbackRuntimeConfigurationService().getRedbackRuntimeConfiguration();
-        assertEquals( "jdo", redbackRuntimeConfiguration.getUserManagerImpls().get( 0 ) );
+        assertEquals( "jpa", redbackRuntimeConfiguration.getUserManagerImpls().get( 0 ) );
 
         redbackRuntimeConfiguration.setUserManagerImpls( Arrays.asList( "foo" ) );
 
@@ -68,7 +68,7 @@ public class RedbackRuntimeConfigurationServiceTest
         RedbackRuntimeConfigurationService service = getRedbackRuntimeConfigurationService();
         List<UserManagerImplementationInformation> infos = service.getUserManagerImplementationInformations();
         assertThat( infos ).isNotNull().isNotEmpty().contains(
-            new UserManagerImplementationInformation( "jdo", null, false ) );
+            new UserManagerImplementationInformation( "jpa", null, false ) );
 
     }
 
@@ -79,7 +79,7 @@ public class RedbackRuntimeConfigurationServiceTest
         RedbackRuntimeConfigurationService service = getRedbackRuntimeConfigurationService();
         List<RBACManagerImplementationInformation> infos = service.getRbacManagerImplementationInformations();
         assertThat( infos ).isNotNull().isNotEmpty().contains(
-            new RBACManagerImplementationInformation( "jdo", null, false ) );
+            new RBACManagerImplementationInformation( "jpa", null, false ) );
 
     }
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
index 951ced8..27d764d 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
@@ -32,7 +32,7 @@
 
   <context:annotation-config/>
   <context:component-scan
-      base-package="org.apache.archiva.rest.services.utils"/>
+      base-package="org.apache.archiva.redback.keys,org.apache.archiva.rest.services.utils"/>
 
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index a51aa0e..971da5c 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -340,6 +340,12 @@
 
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
+      <artifactId>redback-keys-jpa</artifactId>
+      <scope>test</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-rest-services</artifactId>
       <scope>test</scope>
     </dependency>
@@ -414,6 +420,12 @@
       <scope>test</scope>
     </dependency>
 
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-web-common/src/main/resources/META-INF/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/META-INF/spring-context.xml
index f3f50bf..1a981c7 100755
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/META-INF/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/META-INF/spring-context.xml
@@ -34,7 +34,7 @@
        default-lazy-init="true">
 
   <context:annotation-config/>
-  <context:component-scan base-package="org.apache.archiva.web.startup, org.apache.archiva.web.runtime, org.apache.archiva.web.api,, org.apache.archiva.web.security"/>
+  <context:component-scan base-package="org.apache.archiva.redback.keys,org.apache.archiva.web.startup, org.apache.archiva.web.runtime, org.apache.archiva.web.api,, org.apache.archiva.web.security"/>
 
   <util:properties id="archivaRuntimeProperties" location="classpath:application.properties" />
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
index 16c84f2..eda8af6 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
@@ -36,7 +36,7 @@ import org.apache.archiva.redback.users.UserManagerException;
 import org.apache.archiva.redback.users.UserManagerListener;
 import org.apache.archiva.redback.users.UserNotFoundException;
 import org.apache.archiva.redback.users.UserQuery;
-import org.apache.archiva.redback.users.jdo.JdoUser;
+import org.apache.archiva.redback.users.jpa.model.JpaUser;
 
 import java.util.ArrayList;
 import java.util.Date;
@@ -74,7 +74,7 @@ public class SecuritySystemStub
         {
             result = new AuthenticationResult( true, source.getUsername(), null );
 
-            User user = new JdoUser();
+            User user = new JpaUser();
             user.setUsername( source.getUsername() );
             user.setPassword( users.get( source.getUsername() ) );
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
index 08974cf..570eeb5 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-artifacts-download.xml
@@ -30,7 +30,6 @@
 
   <context:property-placeholder system-properties-mode="OVERRIDE"/>
 
-
   <bean name="commons-configuration" class="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry">
     <property name="properties">
       <value>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
index 2937490..9bc51d7 100644
--- a/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/src/test/resources/spring-context-test-common.xml
@@ -29,7 +29,7 @@
 
   <context:annotation-config/>
   <context:component-scan
-      base-package="org.apache.archiva.rest.services.utils"/>
+      base-package="org.apache.archiva.redback.keys,org.apache.archiva.rest.services.utils"/>
 
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
index 3c5ad2e..b0b3840 100755
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/resources/META-INF/spring-context.xml
@@ -49,7 +49,7 @@
 
 
 
-  <jee:jndi-lookup id="dataSource" jndi-name="java:/comp/env/jdbc/redbackjpa" />
+  <jee:jndi-lookup id="dataSource" jndi-name="java:/comp/env/jdbc/users" />
   <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
     <property name="dataSource" ref="dataSource" />
     <property name="jpaVendorAdapter" >

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
index e113705..49f0301 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/applicationContext.xml
@@ -21,6 +21,7 @@
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:task="http://www.springframework.org/schema/task" xmlns:util="http://www.springframework.org/schema/util"
+       xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
            http://www.springframework.org/schema/context
@@ -28,7 +29,8 @@
            http://www.springframework.org/schema/task
            http://www.springframework.org/schema/task/spring-task-3.0.xsd
            http://www.springframework.org/schema/util
-           http://www.springframework.org/schema/util/spring-util.xsd">
+           http://www.springframework.org/schema/util/spring-util.xsd
+           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
 
   <context:property-placeholder location="classpath:application.properties" />
 
@@ -108,37 +110,6 @@
   </bean>
   <!-- END SNIPPET: configuration-files-list -->
 
-  <bean name="jdoFactory#users" class="org.apache.archiva.redback.components.jdo.DataSourceConfigurableJdoFactory">
-    <property name="connectionFactoryName" value="java:comp/env/jdbc/users"/>
-    <property name="shutdownConnectionFactoryName" value="java:comp/env/jdbc/usersShutdown"/>
-    <property name="persistenceManagerFactoryClass" value="org.jpox.PersistenceManagerFactoryImpl"/>
-    <property name="otherProperties">
-      <props>
-        <prop key="org.jpox.autoCreateSchema">true</prop>
-        <prop key="org.jpox.validateTables">false</prop>
-        <prop key="org.jpox.validateConstraints">false</prop>
-        <prop key="org.jpox.validateColumns">false</prop>
-        <prop key="org.jpox.autoStartMechanism">None</prop>
-        <prop key="org.jpox.transactionIsolation">READ_COMMITTED</prop>
-        <prop key="org.jpox.poid.transactionIsolation">READ_COMMITTED</prop>
-        <prop key="org.jpox.rdbms.dateTimezone">JDK_DEFAULT_TIMEZONE</prop>
-        <!-- NEEDED FOR MYSQL UTF-8 Databases -->
-        <prop key="org.jpox.rdbms.stringDefaultLength">255</prop>
-
-        <!-- NEEDED FOR POSTGRES, But causes problems in other JDBC implementations.
-        <prop key="org.jpox.identifier.case">PreserveCase</prop>
-        -->
-
-        <!-- cache activation -->
-        <prop key="org.jpox.cache.level2">true</prop>
-        <prop key="org.jpox.cache.level2.type">ehcacheclassbased</prop>
-        <prop key="org.jpox.cache.level2.cacheName">defaultJpox</prop>
-        <prop key="org.jpox.cache.level2.configurationFile">/ehcache.xml</prop>
-      </props>
-    </property>
-  </bean>
-
-
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">
       <props>
@@ -324,4 +295,28 @@
   </bean>
   -->
 
+  <bean name="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
+    <property name="jpaVendorAdapter" >
+      <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter" />
+    </property>
+    <property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
+    <property name="jpaPropertyMap">
+      <map>
+        <entry key="openjpa.jdbc.SynchronizeMappings" value="buildSchema(ForeignKeys=true)"/>
+        <entry key="openjpa.jdbc.SchemaFactory" value="native(ForeignKeys=true)" />
+        <entry key="openjpa.jdbc.MappingDefaults"
+                  value="ForeignKeyDeleteAction=restrict,JoinForeignKeyDeleteAction=restrict"/>
+        <entry key="openjpa.Log" value="DefaultLevel=TRACE, Runtime=TRACE, Tool=INFO, SQL=TRACE"/>
+        <entry key="openjpa.jdbc.DBDictionary" value="(disableSchemaFactoryColumnTypeErrors=true,BitTypeName=CHAR(1),BooleanTypeName=CHAR(1),BooleanRepresentation=STRING_YN)"/>
+      </map>
+    </property>
+
+  </bean>
+
+  <bean name="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager" >
+    <property name="entityManagerFactory" ref="entityManagerFactory" />
+  </bean>
+
+  <tx:annotation-driven />
+
 </beans>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
index 83714e2..e1ac74b 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
@@ -144,12 +144,6 @@
     <res-sharing-scope>Shareable</res-sharing-scope>
   </resource-ref>
   <resource-ref>
-    <res-ref-name>jdbc/redbackjpa</res-ref-name>
-    <res-type>javax.sql.DataSource</res-type>
-    <res-auth>Container</res-auth>
-    <res-sharing-scope>Shareable</res-sharing-scope>
-  </resource-ref>
-  <resource-ref>
     <res-ref-name>mail/Session</res-ref-name>
     <res-type>javax.mail.Session</res-type>
     <res-auth>Container</res-auth>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml
index e4e860f..5566891 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/log4j2-test.xml
@@ -26,12 +26,14 @@
   </properties>
 
   <appenders>
-    <Console name="console" target="SYSTEM_OUT">
+    <Console name="console" target="SYSTEM_OUT" level="info">
       <!--PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/-->
       <PatternLayout pattern="%highlight{%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n}" />
     </Console>
     <RollingRandomAccessFile name="rolling" fileName="${logsDirectory}/archiva.log"
-                     filePattern="${logsDirectory}/archiva-%d{MM-dd-yyyy}.log" immediateFlush="false" append="true">
+                     filePattern="${logsDirectory}/archiva-%d{MM-dd-yyyy}.log"
+
+                             immediateFlush="true" append="true">
       <PatternLayout>
         <pattern>%d [%t] %-5p %c %x - %m%n</pattern>
       </PatternLayout>
@@ -82,6 +84,9 @@
 
     <logger name="org.apache.archiva.redback.components.registry.commons.CommonsConfigurationRegistry" level="debug"/>
 
+    <logger name="org.apache.archiva.redback.components.taskqueue.DefaultTaskQueue" level="info" />
+
+    <logger name="org.apache.archiva" level="debug" />
     <!--
     <logger name="org.apache.archiva.scheduler.indexing" level="debug"/>
     -->

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
index 3f51102..9e57694 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/tomcat/tomcat-context-archiva.xml
@@ -24,12 +24,7 @@
             driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
             url="jdbc:derby:${appserver.base}/database/users;create=true"
   />
-  <Resource name="jdbc/redbackjpa" auth="Container" type="javax.sql.DataSource"
-            username="sa"
-            password=""
-            driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
-            url="jdbc:derby:${appserver.base}/database/jpausers;create=true"
-  />
+
   <Resource name="mail/Session" auth="Container"
           type="javax.mail.Session"
           mail.smtp.host="localhost"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index e34e512..ec877a2 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -151,6 +151,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.archiva.redback</groupId>
+      <artifactId>redback-keys-jpa</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.archiva.redback</groupId>
       <artifactId>redback-users-memory</artifactId>
       <scope>test</scope>
     </dependency>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
index f747bdb..1619c96 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context-servlet-security-test.xml
@@ -31,7 +31,7 @@
 
   <context:annotation-config/>
   <context:component-scan
-      base-package="org.apache.archiva.webdav,org.apache.archiva.metadata.repository,org.apache.archiva.webdav.util,org.apache.archiva.common.plexusbridge"/>
+      base-package="org.apache.archiva.redback.keys,org.apache.archiva.webdav,org.apache.archiva.metadata.repository,org.apache.archiva.webdav.util,org.apache.archiva.common.plexusbridge"/>
 
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
index fe8f0b8..66f4661 100644
--- a/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/src/test/resources/spring-context.xml
@@ -30,7 +30,7 @@
   <context:property-placeholder system-properties-mode="OVERRIDE"/>
 
   <context:annotation-config/>
-  <context:component-scan base-package="org.apache.archiva.webdav,org.apache.archiva.metadata.repository"/>
+  <context:component-scan base-package="org.apache.archiva.redback.keys,org.apache.archiva.webdav,org.apache.archiva.metadata.repository"/>
 
   <bean name="scheduler" class="org.apache.archiva.redback.components.scheduler.DefaultScheduler">
     <property name="properties">

http://git-wip-us.apache.org/repos/asf/archiva/blob/dd311845/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 107668b..733184c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1031,6 +1031,17 @@
       </dependency>
       <dependency>
         <groupId>org.apache.archiva.redback</groupId>
+        <artifactId>redback-keys-jpa</artifactId>
+        <version>${redback.version}</version>
+        <exclusions>
+          <exclusion>
+            <groupId>commons-logging</groupId>
+            <artifactId>commons-logging</artifactId>
+          </exclusion>
+        </exclusions>
+      </dependency>
+      <dependency>
+        <groupId>org.apache.archiva.redback</groupId>
         <artifactId>redback-rbac-model</artifactId>
         <version>${redback.version}</version>
         <exclusions>


[48/50] archiva git commit: Trying another fix for a chrome error

Posted by ma...@apache.org.
Trying another fix for a chrome error


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/5aab7ac1
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/5aab7ac1
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/5aab7ac1

Branch: refs/heads/citest
Commit: 5aab7ac1b972bd9859e6df8f17f49b91070d1b59
Parents: 0643a0f
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sat Jun 10 01:25:53 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sat Jun 10 01:25:53 2017 +0200

----------------------------------------------------------------------
 .../apache/archiva/web/test/parent/AbstractSeleniumTest.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/5aab7ac1/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index df0c09d..8e4a340 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -623,6 +623,7 @@ public abstract class AbstractSeleniumTest
 
     public <V> V tryClick(By clickableLocator, Function<? super WebDriver, V> conditions, String message, int attempts, int maxWaitTimeInS) {
 
+        getWebDriver().manage().window().maximize();
         int count = attempts;
         WebDriverWait wait = new WebDriverWait( getWebDriver(), maxWaitTimeInS );
         V result = null;
@@ -634,9 +635,7 @@ public abstract class AbstractSeleniumTest
             {
                 el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator ));
                 Actions actions = new Actions(getWebDriver());
-                actions.moveToElement(el);
-                actions.perform();
-                el.click();
+                actions.moveToElement(el).click().perform();
                 result = wait.until( conditions  );
                 return result;
             } catch (Exception e) {


[46/50] archiva git commit: Additional fix for chrome WebDriver

Posted by ma...@apache.org.
Additional fix for chrome WebDriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/aab52dc4
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/aab52dc4
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/aab52dc4

Branch: refs/heads/citest
Commit: aab52dc461840f4de98081a76016ec700bc49223
Parents: 2513029
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Jun 9 23:39:38 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Jun 9 23:39:38 2017 +0200

----------------------------------------------------------------------
 .../web/test/parent/AbstractSeleniumTest.java   | 28 ++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/aab52dc4/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 7922997..40d3f98 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -639,6 +639,14 @@ public abstract class AbstractSeleniumTest
                 ex = e;
                 count--;
             }
+            try
+            {
+                Thread.currentThread().sleep(500);
+            }
+            catch ( InterruptedException e )
+            {
+                // Ignore
+            }
         }
         if (ex!=null) {
             Assert.fail( message);
@@ -671,16 +679,32 @@ public abstract class AbstractSeleniumTest
         Exception ex = null;
         while(count>0)
         {
+            if (count<attempts) {
+                try
+                {
+                    result = conditions.apply( getWebDriver() );
+                    return result;
+                } catch (Exception e) {
+                    // Ignore
+                }
+            }
             el.click();
             try
             {
                 result = wait.until( conditions  );
-                count=0;
-                ex = null;
+                return result;
             } catch (Exception e) {
                 ex = e;
                 count--;
             }
+            try
+            {
+                Thread.currentThread().sleep(500);
+            }
+            catch ( InterruptedException e )
+            {
+                // Ignore
+            }
         }
         if (ex!=null) {
             Assert.fail( message);


[23/50] archiva git commit: [MRM-1941] Java 8 upgrade

Posted by ma...@apache.org.
[MRM-1941] Java 8 upgrade

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/661634ca
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/661634ca
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/661634ca

Branch: refs/heads/citest
Commit: 661634ca2098a56658fcfb994b429d3f5bf609d5
Parents: 7dae8bd
Author: olivier lamy <ol...@apache.org>
Authored: Thu May 18 13:52:51 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Thu May 18 13:52:51 2017 +1000

----------------------------------------------------------------------
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/661634ca/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8063b48..1eb52ba 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-parent</artifactId>
-    <version>18</version>
+    <version>19-SNAPSHOT</version>
   </parent>
 
   <artifactId>archiva</artifactId>
@@ -1935,7 +1935,7 @@
             <artifactId>modernizer-maven-plugin</artifactId>
             <version>1.1.0</version>
             <configuration>
-              <javaVersion>1.7</javaVersion>
+              <javaVersion>1.8</javaVersion>
             </configuration>
             <executions>
               <execution>


[47/50] archiva git commit: Trying additional fix for chrome WebDriver

Posted by ma...@apache.org.
Trying additional fix for chrome WebDriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/0643a0fb
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/0643a0fb
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/0643a0fb

Branch: refs/heads/citest
Commit: 0643a0fb3f08fe80f2a5317569dc17108ca1d6ca
Parents: aab52dc
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sat Jun 10 00:20:04 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sat Jun 10 00:20:04 2017 +0200

----------------------------------------------------------------------
 .../web/test/parent/AbstractSeleniumTest.java       | 16 +++++++++++++---
 src/ci/docker/webtest/Dockerfile                    |  4 ++--
 src/ci/scripts/container_webtest.sh                 |  3 +++
 3 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/0643a0fb/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 40d3f98..df0c09d 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -37,6 +37,7 @@ import java.util.function.Function;
 
 import org.openqa.selenium.*;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.interactions.Actions;
 import org.openqa.selenium.support.ui.ExpectedConditions;
 import org.openqa.selenium.support.ui.FluentWait;
 import org.openqa.selenium.support.ui.Select;
@@ -626,16 +627,24 @@ public abstract class AbstractSeleniumTest
         WebDriverWait wait = new WebDriverWait( getWebDriver(), maxWaitTimeInS );
         V result = null;
         Exception ex = null;
+        WebElement el = null;
         while(count>0)
         {
             try
             {
-                WebElement el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator ));
+                el = wait.until(ExpectedConditions.elementToBeClickable( clickableLocator ));
+                Actions actions = new Actions(getWebDriver());
+                actions.moveToElement(el);
+                actions.perform();
                 el.click();
                 result = wait.until( conditions  );
-                count=0;
-                ex = null;
+                return result;
             } catch (Exception e) {
+                logger.info("Error: {}, {}, {}",count,e.getClass().getName(), e.getMessage());
+                if (el!=null) {
+                    Point elLoc = el.getLocation();
+                    logger.info("Location: x={} y={}", elLoc.getX(), elLoc.getY());
+                }
                 ex = e;
                 count--;
             }
@@ -694,6 +703,7 @@ public abstract class AbstractSeleniumTest
                 result = wait.until( conditions  );
                 return result;
             } catch (Exception e) {
+                logger.info("Error: {}, {}",count, e.getMessage());
                 ex = e;
                 count--;
             }

http://git-wip-us.apache.org/repos/asf/archiva/blob/0643a0fb/src/ci/docker/webtest/Dockerfile
----------------------------------------------------------------------
diff --git a/src/ci/docker/webtest/Dockerfile b/src/ci/docker/webtest/Dockerfile
index b4c416f..8a7c2d0 100644
--- a/src/ci/docker/webtest/Dockerfile
+++ b/src/ci/docker/webtest/Dockerfile
@@ -65,8 +65,8 @@ COPY chrome_launcher.sh /usr/bin/google-chrome
 RUN chmod +x /opt/bin/entry_point.sh
 RUN chmod +x /usr/bin/google-chrome
 
-ENV SCREEN_WIDTH 1360
-ENV SCREEN_HEIGHT 1020
+ENV SCREEN_WIDTH 1600
+ENV SCREEN_HEIGHT 1200
 ENV SCREEN_DEPTH 24
 ENV X_START_NUM=3
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/0643a0fb/src/ci/scripts/container_webtest.sh
----------------------------------------------------------------------
diff --git a/src/ci/scripts/container_webtest.sh b/src/ci/scripts/container_webtest.sh
index e06d5d2..fbd2c1a 100644
--- a/src/ci/scripts/container_webtest.sh
+++ b/src/ci/scripts/container_webtest.sh
@@ -33,6 +33,9 @@ INSTANCE_NAME="archiva-webtest"
 PORT_MAPPING="4444:4444"
 NETWORK_TYPE="host"
 
+export SCREEN_WIDTH="1600"
+export SCREEN_HEIGHT="1200"
+
 HERE=`dirname $0`
 
 TAG="${CONTAINER_NAME}:${CONTAINER_VERSION}"


[50/50] archiva git commit: Reset citest to current master state

Posted by ma...@apache.org.
Reset citest to current master state


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/d915440a
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/d915440a
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/d915440a

Branch: refs/heads/citest
Commit: d915440a8c1fff3ad94b23dac61c8bc6176f41c9
Parents: edb7bd3 3453798
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sat Jun 10 13:24:21 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sat Jun 10 13:24:21 2017 +0200

----------------------------------------------------------------------

----------------------------------------------------------------------



[44/50] archiva git commit: Fixing maven config for remote selenium server

Posted by ma...@apache.org.
Fixing maven config for remote selenium server


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/f242578b
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/f242578b
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/f242578b

Branch: refs/heads/citest
Commit: f242578be0635b7487976c6c0187acb4f70a0b27
Parents: 85352aa
Author: Martin Stockhammer <ma...@apache.org>
Authored: Fri Jun 9 22:24:54 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Fri Jun 9 22:24:54 2017 +0200

----------------------------------------------------------------------
 .../archiva-web/archiva-webapp-test/pom.xml     | 39 +++++++++++++++++++-
 .../web/test/parent/AbstractSeleniumTest.java   |  4 +-
 .../web/test/tools/WebdriverUtility.java        |  4 ++
 3 files changed, 43 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/f242578b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index a5239a6..40eb946 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -36,8 +36,7 @@
     <selenium-server.version>3.4.0</selenium-server.version>
     <fluentlenium.version>3.2.0</fluentlenium.version>
     <fluentlenium.festassert.version>0.13.2</fluentlenium.festassert.version>
-    <seleniumHost></seleniumHost>
-    <seleniumPort></seleniumPort>
+
 
     <browserPath></browserPath>
   </properties>
@@ -434,6 +433,7 @@
                 <maxWaitTimeInMs>${maxWaitTimeInMs}</maxWaitTimeInMs>
                 <seleniumHost>${seleniumHost}</seleniumHost>
                 <seleniumPort>${seleniumPort}</seleniumPort>
+                <seleniumRemote>${seleniumRemote}</seleniumRemote>
                 <container.propertiesPortFilePath>${container.propertiesPortFilePath}</container.propertiesPortFilePath>
                 <container.http.port>${container.http.port}</container.http.port>
               </systemPropertyVariables>
@@ -676,6 +676,41 @@
       </properties>
     </profile>
 
+
+    <profile>
+      <id>seleniumHost</id>
+      <activation>
+        <property>
+          <name>!seleniumHost</name>
+        </property>
+      </activation>
+      <properties>
+        <seleniumHost>localhost</seleniumHost>
+      </properties>
+    </profile>
+    <profile>
+      <id>seleniumPort</id>
+      <activation>
+        <property>
+          <name>!seleniumPort</name>
+        </property>
+      </activation>
+      <properties>
+        <seleniumPort></seleniumPort>
+      </properties>
+    </profile>
+    <profile>
+      <id>seleniumRemote</id>
+      <activation>
+        <property>
+          <name>!seleniumRemote</name>
+        </property>
+      </activation>
+      <properties>
+        <seleniumRemote>false</seleniumRemote>
+      </properties>
+    </profile>
+
     <profile>
       <id>htmlunit</id>
       <activation>

http://git-wip-us.apache.org/repos/asf/archiva/blob/f242578b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 698d6a0..2cfe070 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -59,7 +59,7 @@ public abstract class AbstractSeleniumTest
     public String browser = System.getProperty( "browser" );
 
     public String baseUrl =
-        "http://localhost:" + System.getProperty( "tomcat.maven.http.port" ) + "/archiva/index.html?request_lang=en";
+        "http://localhost:" + System.getProperty( "container.http.port" ) + "/archiva/index.html?request_lang=en";
 
     public int maxWaitTimeInMs = Integer.getInteger( "maxWaitTimeInMs" );
 
@@ -67,7 +67,7 @@ public abstract class AbstractSeleniumTest
 
     public int seleniumPort = Integer.getInteger( "seleniumPort", 4444 );
 
-    public boolean remoteSelenium = Boolean.parseBoolean( System.getProperty( "remoteSelenium", "false" ) );
+    public boolean remoteSelenium = Boolean.parseBoolean( System.getProperty( "seleniumRemote", "false" ) );
 
     WebDriver webDriver = null;
 

http://git-wip-us.apache.org/repos/asf/archiva/blob/f242578b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
index 0f3af86..12546c3 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
@@ -62,6 +62,10 @@ public class WebdriverUtility
     }
 
     public static WebDriver newWebDriver(String seleniumBrowser, String seleniumHost, int seleniumPort, boolean seleniumRemote) {
+        log.info("WebDriver {}, {}, {}, {}", seleniumBrowser, seleniumHost, seleniumPort, seleniumRemote);
+        if (seleniumRemote && StringUtils.isEmpty( seleniumHost )) {
+            throw new IllegalArgumentException( "seleniumHost must be set, when seleniumRemote=true" );
+        }
         try {
 
             if ( StringUtils.contains(seleniumBrowser, "chrome")) {


[22/50] archiva git commit: use last parent for test module

Posted by ma...@apache.org.
use last parent for test module

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/7dae8bd5
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/7dae8bd5
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/7dae8bd5

Branch: refs/heads/citest
Commit: 7dae8bd546de9d7a75d0d4209044dfbdfb02ab29
Parents: 04e6ad1
Author: olivier lamy <ol...@apache.org>
Authored: Mon May 15 10:28:01 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Mon May 15 10:28:01 2017 +1000

----------------------------------------------------------------------
 archiva-modules/archiva-web/archiva-webapp-test/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/7dae8bd5/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index ecff6b4..21070f8 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -23,7 +23,7 @@
   <parent>
     <groupId>org.apache.archiva</groupId>
     <artifactId>archiva-web</artifactId>
-    <version>2.2.3-SNAPSHOT</version>
+    <version>2.2.4-SNAPSHOT</version>
   </parent>
   <artifactId>archiva-webapp-test</artifactId>
   <packaging>pom</packaging>


[34/50] archiva git commit: Script for workspace cleanup on ciserver

Posted by ma...@apache.org.
Script for workspace cleanup on ciserver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/2d23c4a7
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/2d23c4a7
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/2d23c4a7

Branch: refs/heads/citest
Commit: 2d23c4a7f038ad3a0cb8b2135b8aa695e0395514
Parents: 0e73c44
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun May 28 22:08:32 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun May 28 22:40:07 2017 +0200

----------------------------------------------------------------------
 src/ci/scripts/prepareWorkspace.sh | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/2d23c4a7/src/ci/scripts/prepareWorkspace.sh
----------------------------------------------------------------------
diff --git a/src/ci/scripts/prepareWorkspace.sh b/src/ci/scripts/prepareWorkspace.sh
new file mode 100644
index 0000000..725f3e3
--- /dev/null
+++ b/src/ci/scripts/prepareWorkspace.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+#
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#
+#  Author: Martin Stockhammer <ma...@apache.org>
+#  Date:   2017-05-24
+#
+#  Removes directories that are not used anymore.
+##
+ATTIC_DIRS=""
+
+for i in ${ATTIC_DIRS}; do
+ if [ "X${i}" != "X" -a -d ${i} ]; then
+   echo "Deleting directory ${i}"
+   rm -rf ${i}
+ fi
+done


[40/50] archiva git commit: Migrating additional tests to WebDriver

Posted by ma...@apache.org.
Migrating additional tests to WebDriver

LoginTest, ArchivaAdminTest, RepositoryAdminTest are migrated to WebDriver tests
with FluentWait usage.


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/d31ce651
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/d31ce651
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/d31ce651

Branch: refs/heads/citest
Commit: d31ce651b1d684bfa8cf404d76b8342fdcd0a468
Parents: 7b8d3bb
Author: Martin Stockhammer <ma...@apache.org>
Authored: Thu Jun 8 23:25:16 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Thu Jun 8 23:25:16 2017 +0200

----------------------------------------------------------------------
 .../archiva/web/test/ArchivaAdminTest.java      |   2 +-
 .../org/apache/archiva/web/test/LoginTest.java  |  25 +--
 .../archiva/web/test/RepositoryAdminTest.java   |  41 +++--
 .../archiva/web/test/WebDriverBrowseTest.java   |   2 +-
 .../apache/archiva/web/test/WebDriverTest.java  |   2 +-
 .../web/test/parent/AbstractArchivaTest.java    |   2 +-
 .../web/test/parent/AbstractSeleniumTest.java   | 180 +++++++------------
 .../tools/ArchivaSeleniumExecutionRule.java     |   2 -
 .../web/test/tools/WebdriverUtility.java        |  15 +-
 .../src/test/resources/jetty/jetty-env.xml      |   1 -
 .../main/webapp/js/templates/archiva/menu.html  |   2 +-
 11 files changed, 119 insertions(+), 155 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
index 8be57aa..5a9d156 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/ArchivaAdminTest.java
@@ -29,7 +29,7 @@ public class ArchivaAdminTest
     @Test
     public void testHome()
     {
-        getSelenium().open( baseUrl );
+        getWebDriver().get( baseUrl );
         assertPage( "Apache Archiva" );
     }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
index 24f1a09..f984428 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
@@ -23,6 +23,8 @@ import org.apache.archiva.web.test.parent.AbstractArchivaTest;
 import org.junit.Assert;
 import org.junit.Test;
 import org.openqa.selenium.By;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
 
 /**
  * Based on LoginTest of Emmanuel Venisse test.
@@ -41,8 +43,9 @@ public class LoginTest
     {
         goToLoginPage();
         setFieldValue( "user-login-form-username", "badUsername" );
-        clickLinkWithLocator( "modal-login-ok", true );
-        assertTextPresent( "This field is required." );
+        clickLinkWithLocator( "modal-login-ok", false );
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 2);
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("modal-login"), "This field is required."));
 
     }
 
@@ -52,8 +55,9 @@ public class LoginTest
         goToLoginPage();
         setFieldValue( "user-login-form-username", getProperty( "ADMIN_USERNAME" ) );
         setFieldValue( "user-login-form-password", "badPassword" );
-        clickLinkWithLocator( "modal-login-ok", true );
-        assertTextPresent( "You have entered an incorrect username and/or password" );
+        clickLinkWithLocator( "modal-login-ok", false );
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 2);
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("modal-login"), "You have entered an incorrect username and/or password"));
     }
 
     @Test
@@ -61,9 +65,9 @@ public class LoginTest
     {
         goToLoginPage();
         setFieldValue( "user-login-form-password", "password" );
-        waitPage();
-        clickLinkWithLocator( "modal-login-ok", true );
-        assertTextPresent( "This field is required." );
+        clickLinkWithLocator( "modal-login-ok", false);
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 2);
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("modal-login"), "This field is required."));
     }
 
     @Test
@@ -73,8 +77,9 @@ public class LoginTest
         setFieldValue( "user-login-form-username", getProperty( "ADMIN_USERNAME" ) );
         Assert.assertTrue(getWebDriver().findElement( By.id("modal-login-ok") ).isDisplayed());
         Assert.assertTrue(getWebDriver().findElement( By.id("modal-login-ok") ).isEnabled());
-        clickLinkWithLocator( "modal-login-ok", true );
-        assertTextPresent( "This field is required." );
+        clickLinkWithLocator( "modal-login-ok", false );
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 2);
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("modal-login"), "This field is required."));
     }
 
     @Test
@@ -83,7 +88,7 @@ public class LoginTest
         goToLoginPage();
         setFieldValue( "user-login-form-username", getProperty( "ADMIN_USERNAME" ) );
         setFieldValue( "user-login-form-password", getProperty( "ADMIN_PASSWORD" ) );
-        clickLinkWithLocator( "modal-login-ok", true );
+        clickLinkWithLocator( "modal-login-ok");
 
         assertUserLoggedIn( getProperty( "ADMIN_USERNAME" ) );
     }

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
index b519bd9..4728e40 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
@@ -22,8 +22,12 @@ package org.apache.archiva.web.test;
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
 import org.junit.Assert;
 import org.junit.Test;
+import org.openqa.selenium.By;
 import org.openqa.selenium.JavascriptExecutor;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
 
 /**
  * Based on LoginTest of Emmanuel Venisse test.
@@ -41,36 +45,41 @@ public class RepositoryAdminTest
     public void testManagedRepository()
     {
         login( getAdminUsername(), getAdminPassword() );
-        clickLinkWithLocator( "menu-repositories-list-a", true );
-        // add custom repo
-        assertTextPresent( "Repositories Administration" );
-        clickLinkWithXPath( "//a[@href='#remote-repositories-content']", true );
-        
-        clickLinkWithXPath( "//a[@href='#remote-repository-edit']", true );
+        clickLinkWithLocator( "menu-repositories-list-a");
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("managed-repositories-view-a")));
+        clickLinkWithXPath( "//a[@href='#remote-repositories-content']");
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")));
+        clickLinkWithXPath( "//a[@href='#remote-repository-edit']", false );
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repository-save-button")));
         
         setFieldValue( "id", "myrepoid" );        
         setFieldValue( "name", "My repo name" );        
         setFieldValue( "url", "http://www.repo.org" );
         
-        clickButtonWithLocator( "remote-repository-save-button", true );
-       
-        clickLinkWithLocator( "menu-proxy-connectors-list-a", true );
-        
+        clickButtonWithLocator( "remote-repository-save-button");
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("remote-repositories-view-a")));
+
+        clickLinkWithLocator( "menu-proxy-connectors-list-a");
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connectors-view-tabs-a-network-proxies-grid")));
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("main-content"), "Proxy Connectors"));
         // proxy connect
-        assertTextPresent( "Proxy Connectors" );
-        assertTextPresent( "central" );
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
         assertTextNotPresent( "myrepoid" );
-        clickButtonWithLocator( "proxy-connectors-view-tabs-a-edit", true );
+        clickButtonWithLocator( "proxy-connectors-view-tabs-a-edit");
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("proxy-connector-btn-save")));
         selectValue( "sourceRepoId", "internal" );
         // Workaround
         // TODO: Check after upgrade of htmlunit, bootstrap or jquery
         // TODO: Check whats wrong here
         ( (JavascriptExecutor) getWebDriver() ).executeScript( "$('#targetRepoId').show();" );
         // End of Workaround
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("targetRepoId")));
         selectValue( "targetRepoId", "myrepoid" );
-        clickButtonWithLocator( "proxy-connector-btn-save", true);
-        assertTextPresent( "central" );
-        assertTextPresent( "myrepoid" );
+        clickButtonWithLocator( "proxy-connector-btn-save");
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("user-messages"),"ProxyConnector added"));
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "central" ));
+        wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id("proxy-connectors-view"), "myrepoid" ));
         clickLinkWithXPath( "//i[contains(concat(' ',normalize-space(@class),' '),' icon-resize-vertical ')]/../..", true );
         assertTextPresent( "internal" );
         // order test

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
index 7c7b718..2470494 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
@@ -64,7 +64,7 @@ public class WebDriverBrowseTest
     public void takeScreenShot( String fileName )
     {
         log.info("Taking screenshot "+fileName);
-        WebdriverUtility.takeScreenShot( fileName, getDriver(), (a)->super.takeScreenShot( a ) );
+        WebdriverUtility.takeScreenShot( fileName, getDriver() );
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
index bb01a89..a27ee47 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
@@ -57,7 +57,7 @@ public class WebDriverTest
     public void takeScreenShot( String fileName )
     {
         log.info("Taking screenshot "+fileName);
-        WebdriverUtility.takeScreenShot( fileName, getDriver(), (a)->super.takeScreenShot( a ) );
+        WebdriverUtility.takeScreenShot( fileName, getDriver());
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
index d05cbcc..54a20d5 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
@@ -169,7 +169,7 @@ public abstract class AbstractArchivaTest
 
     public void goToHomePage()
     {
-        getSelenium().open( baseUrl );
+        getWebDriver().get( baseUrl );
     }
 
     protected void logout()

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index 763bcc3..2245910 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -29,6 +29,9 @@ import org.junit.Rule;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.sql.Time;
 import java.text.SimpleDateFormat;
 import java.util.Arrays;
 import java.util.Date;
@@ -37,14 +40,15 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
 import org.apache.commons.io.FileUtils;
-import org.openqa.selenium.By;
-import org.openqa.selenium.JavascriptExecutor;
-import org.openqa.selenium.NoSuchElementException;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
+import org.openqa.selenium.*;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.FluentWait;
 import org.openqa.selenium.support.ui.Select;
+import org.openqa.selenium.support.ui.WebDriverWait;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -73,8 +77,6 @@ public abstract class AbstractSeleniumTest
 
     public boolean remoteSelenium = Boolean.parseBoolean( System.getProperty( "remoteSelenium", "false" ) );
 
-    private Selenium selenium = null;
-
     WebDriver webDriver = null;
 
     public Properties p;
@@ -93,7 +95,6 @@ public abstract class AbstractSeleniumTest
         baseUrl = WebdriverUtility.getBaseUrl()+"/index.html?request_lang=en";
 
         open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs, remoteSelenium );
-        archivaSeleniumExecutionRule.selenium = selenium;
         assertAdminCreated();
     }
 
@@ -102,10 +103,7 @@ public abstract class AbstractSeleniumTest
      */
     public void close()
     {
-        if ( getSelenium() != null )
-        {
-            getSelenium().stop();
-        }
+        getWebDriver().close();
     }
 
     /**
@@ -116,13 +114,11 @@ public abstract class AbstractSeleniumTest
     {
         try
         {
-            if ( getSelenium() == null )
+            if ( getWebDriver() == null )
             {
                 WebDriver driver = WebdriverUtility.newWebDriver(browser, seleniumHost, seleniumPort, remoteSelenium);
-                WebDriverBackedSelenium selenium = new WebDriverBackedSelenium(driver, baseUrl);
                 // selenium.start();
-                selenium.setTimeout( Integer.toString( maxWaitTimeInMs ) );
-                this.selenium = selenium;
+                // selenium.setTimeout( Integer.toString( maxWaitTimeInMs ) );
                 this.webDriver = driver;
             }
         }
@@ -147,9 +143,15 @@ public abstract class AbstractSeleniumTest
 
         open( baseUrl, browser, seleniumHost, seleniumPort, maxWaitTimeInMs, remoteSelenium);
 
-        getSelenium().open( baseUrl );
+        getWebDriver().get(baseUrl);
+        WebDriverWait wait = new WebDriverWait(getWebDriver(),30);
+        wait.until(ExpectedConditions.presenceOfElementLocated(By.id("topbar-menu")));
+
+        FluentWait fluentWait = new FluentWait(getWebDriver()).withTimeout(10, TimeUnit.SECONDS);
+        fluentWait.until( ExpectedConditions.or(
+                    ExpectedConditions.visibilityOfElementLocated(By.id("create-admin-link")),
+                            ExpectedConditions.visibilityOfElementLocated(By.id("login-link-a"))));
 
-        waitPage();
 
         // if not admin user created create one
         if ( isElementVisible( "create-admin-link" ) )
@@ -157,7 +159,9 @@ public abstract class AbstractSeleniumTest
             Assert.assertFalse( isElementVisible( "login-link-a" ) );
             Assert.assertFalse( isElementVisible( "register-link-a" ) );
             // skygo need to set to true for passing is that work as expected ?
-            clickLinkWithLocator( "create-admin-link-a", true );
+            clickLinkWithLocator( "create-admin-link-a");
+            wait = new WebDriverWait(getWebDriver(), 5);
+            wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("user-create")));
             assertCreateAdmin();
             String fullname = getProperty( "ADMIN_FULLNAME" );
             String username = getAdminUsername();
@@ -165,16 +169,10 @@ public abstract class AbstractSeleniumTest
             String password = getProperty( "ADMIN_PASSWORD" );
             submitAdminData( fullname, mail, password );
             assertUserLoggedIn( username );
-            clickLinkWithLocator( "logout-link-a" );
+            clickLinkWithLocator( "logout-link-a" , false);
         }
         else
         {
-            try
-            {
-                Assert.assertNotNull( getWebDriver().findElement( By.id( "login-link-a" ) ) );
-            } catch (NoSuchElementException e) {
-                logger.info("ASSERT: login-link-a not found!");
-            }
             Assert.assertTrue( isElementVisible( "login-link-a" ) );
             Assert.assertTrue( isElementVisible( "register-link-a" ) );
             login( getAdminUsername(), getAdminPassword() );
@@ -182,11 +180,6 @@ public abstract class AbstractSeleniumTest
 
     }
 
-    public Selenium getSelenium()
-    {
-        return selenium;
-    }
-
     public WebDriver getWebDriver() {
         return this.webDriver;
     }
@@ -214,7 +207,7 @@ public abstract class AbstractSeleniumTest
         setFieldValue( "email", email );
         setFieldValue( "password", password );
         setFieldValue( "confirmPassword", password );
-        clickButtonWithLocator( "user-create-form-register-button" );
+        clickButtonWithLocator( "user-create-form-register-button" , false);
     }
 
     public void login( String username, String password )
@@ -239,20 +232,22 @@ public abstract class AbstractSeleniumTest
     // Go to Login Page
     public void goToLoginPage()
     {
-        getSelenium().open( baseUrl );
-        waitPage();
-        getWebDriver().manage().window().maximize();
+        logger.info("Goto login page");
+        getWebDriver().get( baseUrl );
+        WebDriverWait wait = new WebDriverWait(getWebDriver(),30);
+        wait.until(ExpectedConditions.presenceOfElementLocated(By.id("topbar-menu")));
+        wait.until(ExpectedConditions.or(ExpectedConditions.visibilityOfElementLocated(By.id("logout-link")),
+                ExpectedConditions.visibilityOfElementLocated(By.id("login-link-a"))));
+
         // are we already logged in ?
         if ( isElementVisible( "logout-link" ) ) //isElementPresent( "logoutLink" ) )
         {
+            logger.info("Logging out ");
             // so logout
             clickLinkWithLocator( "logout-link-a", false );
-            clickLinkWithLocator( "login-link-a" );
-        }
-        else if ( isElementVisible( "login-link-a" ) )
-        {
-            clickLinkWithLocator( "login-link-a", true );
         }
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("login-link-a")));
+        clickLinkWithLocator( "login-link-a", false );
         // This is a workaround for bug with HTMLUnit. The display attribute of the
         // login dialog is not changed via the click.
         // TODO: Check after changing jquery, bootstrap or htmlunit version
@@ -261,7 +256,8 @@ public abstract class AbstractSeleniumTest
             ( (JavascriptExecutor) getWebDriver() ).executeScript( "$('#modal-login').show();" );
         }
         // END OF WORKAROUND
-
+        wait = new WebDriverWait(getWebDriver(),20);
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("modal-login")));
         assertLoginModal();
     }
 
@@ -270,8 +266,8 @@ public abstract class AbstractSeleniumTest
     {
         assertElementPresent( "user-login-form" );
         Assert.assertTrue( isElementVisible( "register-link" ) );
-        assertElementPresent( "user-login-form-username" );
-        assertElementPresent( "user-login-form-password" );
+        Assert.assertTrue( isElementVisible("user-login-form-username" ));
+        Assert.assertTrue( isElementVisible("user-login-form-password" ));
         assertButtonWithIdPresent( "modal-login-ok" );
         Assert.assertTrue( isElementVisible( "modal-login-ok" ));
     }
@@ -290,19 +286,26 @@ public abstract class AbstractSeleniumTest
     public void submitLoginPage( String username, String password, boolean rememberMe, boolean validUsernamePassword,
                                  String assertReturnPage )
     {
-        clickLinkWithLocator( "login-link-a", true );
-        // TODO: Check whats wrong here
-        ( (JavascriptExecutor) getWebDriver() ).executeScript( "$('#modal-login').show();" );
-
-        setFieldValue( "user-login-form-username", username );
-        setFieldValue( "user-login-form-password", password );
+        logger.info("Activating login form");
+        // clickLinkWithLocator( "login-link-a", false);
+        WebDriverWait wait = new WebDriverWait(getWebDriver(),5);
+        WebElement usernameField = wait.until(ExpectedConditions.visibilityOf(getWebDriver().findElement(By.id("user-login-form-username"))));
+        wait = new WebDriverWait(getWebDriver(),5);
+        WebElement passwordField = wait.until(ExpectedConditions.visibilityOf(getWebDriver().findElement(By.id("user-login-form-password"))));
+        wait = new WebDriverWait(getWebDriver(),5);
+        WebElement button = wait.until(ExpectedConditions.elementToBeClickable(By.id("modal-login-ok")));
+        logger.info("Login form visible");
+        logger.info("Enter username "+username);
+        usernameField.sendKeys(username);
+        logger.info("Enter password "+password);
+        passwordField.sendKeys(password);
         /*
         if ( rememberMe )
         {
             checkField( "rememberMe" );
         }*/
 
-        clickButtonWithLocator( "modal-login-ok" );
+        button.click();
         if ( validUsernamePassword )
         {
             assertUserLoggedIn( username );
@@ -327,8 +330,9 @@ public abstract class AbstractSeleniumTest
 
     protected void assertUserLoggedIn( String username )
     {
+        WebDriverWait wait = new WebDriverWait(getWebDriver(), 10);
+        wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("logout-link")));
         Assert.assertFalse( isElementVisible( "login-link" ) );
-        Assert.assertTrue( isElementVisible( "logout-link" ) );
         Assert.assertFalse( isElementVisible( "register-link" ) );
         Assert.assertFalse( isElementVisible( "create-admin-link" ) );
     }
@@ -375,26 +379,10 @@ public abstract class AbstractSeleniumTest
         Assert.assertTrue( "'" + text + "' isn't present.", getWebDriver().getPageSource().contains( text ) );
     }
 
-    /**
-     * one of text args must be in the page so use en and fr text (olamy use en locale :-) )
-     *
-     * @param texts
-     */
-    public void assertTextPresent( String... texts )
-    {
-        boolean present = false;
-        StringBuilder sb = new StringBuilder();
-        for ( String text : texts )
-        {
-            present = present || getSelenium().isTextPresent( text );
-            sb.append( " " + text + " " );
-        }
-        Assert.assertTrue( "'one of the following test " + sb.toString() + "' isn't present.", present );
-    }
 
     public void assertTextNotPresent( String text )
     {
-        Assert.assertFalse( "'" + text + "' is present.", getSelenium().isTextPresent( text ) );
+        Assert.assertFalse( "'" + text + "' is present.", isTextPresent( text ) );
     }
 
     public void assertElementPresent( String elementLocator )
@@ -446,14 +434,11 @@ public abstract class AbstractSeleniumTest
         assertElementNotPresent( "/¯img[@alt='" + alt + "']" );
     }
 
-    public void assertCellValueFromTable( String expected, String tableElement, int row, int column )
-    {
-        Assert.assertEquals( expected, getCellValueFromTable( tableElement, row, column ) );
-    }
+
 
     public boolean isTextPresent( String text )
     {
-        return getSelenium().isTextPresent( text );
+        return getWebDriver().getPageSource().contains(text);
     }
 
     public boolean isLinkPresent( String text )
@@ -509,10 +494,6 @@ public abstract class AbstractSeleniumTest
         return findElement(fieldName ).getAttribute( "value" );
     }
 
-    public String getCellValueFromTable( String tableElement, int row, int column )
-    {
-        return getSelenium().getTable( tableElement + "." + row + "." + column );
-    }
 
     public void selectValue( String locator, String value )
     {
@@ -568,7 +549,7 @@ public abstract class AbstractSeleniumTest
 
     public void clickButtonWithValue( String text )
     {
-        clickButtonWithValue( text, true );
+        clickButtonWithValue( text, false );
     }
 
     public void clickButtonWithValue( String text, boolean wait )
@@ -602,7 +583,7 @@ public abstract class AbstractSeleniumTest
 
     public void clickLinkWithText( String text )
     {
-        clickLinkWithText( text, true );
+        clickLinkWithText( text, false );
     }
 
     public void clickLinkWithText( String text, boolean wait )
@@ -612,7 +593,7 @@ public abstract class AbstractSeleniumTest
 
     public void clickLinkWithXPath( String xpath )
     {
-        clickLinkWithXPath( xpath, true );
+        clickLinkWithXPath( xpath, false );
     }
 
     public void clickLinkWithXPath( String xpath, boolean wait )
@@ -622,7 +603,7 @@ public abstract class AbstractSeleniumTest
 
     public void clickLinkWithLocator( String locator )
     {
-        clickLinkWithLocator( locator, true );
+        clickLinkWithLocator( locator, false );
     }
 
     public void clickLinkWithLocator( String locator, boolean wait )
@@ -637,7 +618,7 @@ public abstract class AbstractSeleniumTest
 
     public void clickButtonWithLocator( String locator )
     {
-        clickButtonWithLocator( locator, true );
+        clickButtonWithLocator( locator, false );
     }
 
     public void clickButtonWithLocator( String locator, boolean wait )
@@ -720,42 +701,11 @@ public abstract class AbstractSeleniumTest
         }
 
         targetPath.mkdirs();
-        Selenium selenium = getSelenium();
-        if (selenium!=null)
+        if (getWebDriver()!=null)
         {
             String fileBaseName = methodName + "_" + className + ".java_" + lineNumber + "-" + time;
             File fileName = new File( targetPath, fileBaseName + ".png" );
-            selenium.windowMaximize();
-
-            if (selenium instanceof WebDriverBackedSelenium)
-            {
-                WebdriverUtility.takeScreenShot( fileName.getName(), ( (WebDriverBackedSelenium) selenium ).getWrappedDriver(),
-                    (a)->selenium.captureEntirePageScreenshot( a, "background=#FFFFFF" )
-                    );
-            } else
-            {
-
-                try
-                {
-                    // save html to have a minimum feedback if jenkins firefox not up
-                    File fileNameHTML = new File( new File( "target", "errorshtmlsnap" ), fileBaseName + ".html" );
-                    FileUtils.writeStringToFile( fileNameHTML, selenium.getHtmlSource() );
-                }
-                catch ( IOException e )
-                {
-                    System.out.print( e.getMessage() );
-                    e.printStackTrace();
-                }
-
-
-                try
-                {
-                }
-                catch ( UnsupportedOperationException ex )
-                {
-                    logger.warn( "Could not create screenshot. Not supported by this webdriver. " + selenium.getClass().getName() );
-                }
-            }
+            Path screenshot = WebdriverUtility.takeScreenShot( fileName.getName(), getWebDriver());
             return fileName.getAbsolutePath();
         } else {
             return "";

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
index 779ebd6..16417fa 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
@@ -36,8 +36,6 @@ public class ArchivaSeleniumExecutionRule
 
     final Logger log = LoggerFactory.getLogger( ArchivaSeleniumExecutionRule.class );
 
-    // FIXME cerate a separate TestRule for open and close calls ?
-    public Selenium selenium;
 
     public Statement apply( Statement base, FrameworkMethod method, Object target )
     {

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
index 177c1fc..0f3af86 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
@@ -21,9 +21,7 @@ package org.apache.archiva.web.test.tools;
 import com.gargoylesoftware.htmlunit.WebClient;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
-import org.openqa.selenium.Capabilities;
-import org.openqa.selenium.JavascriptExecutor;
-import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.*;
 import org.openqa.selenium.chrome.ChromeDriver;
 import org.openqa.selenium.firefox.FirefoxDriver;
 import org.openqa.selenium.htmlunit.HtmlUnitDriver;
@@ -174,16 +172,18 @@ public class WebdriverUtility
         return "http://localhost:" + containerPort+"/archiva";
     }
 
-    public static void takeScreenShot( String fileName, WebDriver driver, Consumer<String> screenShotFunction) {
+    public static Path takeScreenShot( String fileName, WebDriver driver) {
+        Path result = null;
         try
         {
             Path snapDir = Paths.get( "target", "errorshtmlsnap" );
+            Path screenShotDir = Paths.get("target","screenshots");
             if ( !Files.exists( snapDir ) )
             {
                 Files.createDirectories( snapDir );
             }
             Path htmlFile = snapDir.resolve( fileName + ".html" );
-            Path screenShotFile = snapDir.resolve( fileName );
+            Path screenShotFile = screenShotDir.resolve( fileName );
             String pageSource=null;
             String encoding="ISO-8859-1";
             try
@@ -199,7 +199,9 @@ public class WebdriverUtility
             FileUtils.writeStringToFile( htmlFile.toFile(), pageSource, encoding);
             try
             {
-                screenShotFunction.accept( screenShotFile.toAbsolutePath().toString() );
+                File scrs = ((TakesScreenshot)driver).getScreenshotAs( OutputType.FILE );
+                result = scrs.toPath();
+                Files.copy(result, screenShotFile);
             }
             catch ( Exception e )
             {
@@ -211,5 +213,6 @@ public class WebdriverUtility
         {
             log.info( "Creating screenshot failed " + e.getMessage() );
         }
+        return result;
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml
index bed63bf..6d67520 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/jetty/jetty-env.xml
@@ -17,7 +17,6 @@
   ~ specific language governing permissions and limitations
   ~ under the License.
   -->
-<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
 
 <Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">
   <New id="derbyDs" class="org.eclipse.jetty.plus.jndi.Resource">

http://git-wip-us.apache.org/repos/asf/archiva/blob/d31ce651/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
index 30bb261..df8c42e 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
@@ -88,7 +88,7 @@
               </a>
             </li>
             <li id="login-link" style="display: none">
-              <a onclick="loginBox(); return false;" id="login-link-a">
+              <a onclick="loginBox();" id="login-link-a">
                 <span class="btn btn-success label force-upper-case">${$.i18n.prop('login')}</span>
               </a>
             </li>


[25/50] archiva git commit: use last redback 2.7 SNAPSHOT

Posted by ma...@apache.org.
use last redback 2.7 SNAPSHOT

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/cb032a7d
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/cb032a7d
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/cb032a7d

Branch: refs/heads/citest
Commit: cb032a7d04ba4f764c36de2b4b9edf23222d5fa3
Parents: 84a1846
Author: olivier lamy <ol...@apache.org>
Authored: Thu May 18 13:58:30 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Thu May 18 13:58:53 2017 +1000

----------------------------------------------------------------------
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/cb032a7d/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c32d69c..98c9f95 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,7 +61,7 @@
     <maven-model-converter.version>2.1</maven-model-converter.version>
     <maven.indexer.version>5.1.1</maven.indexer.version>
     <wagon.version>2.9</wagon.version>
-    <redback.version>2.6</redback.version>
+    <redback.version>2.7-SNAPSHOT</redback.version>
     <redback.cache.version>2.2</redback.cache.version>
     <redback.quartz.version>2.1</redback.quartz.version>
     <redback.registry.version>2.4</redback.registry.version>


[24/50] archiva git commit: Merge branch 'feature/jetty_9.4'

Posted by ma...@apache.org.
Merge branch 'feature/jetty_9.4'


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/84a18468
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/84a18468
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/84a18468

Branch: refs/heads/citest
Commit: 84a1846854922ad3b7254f94840bf845fcbaaa56
Parents: 661634c 6f28627
Author: olivier lamy <ol...@apache.org>
Authored: Thu May 18 13:53:17 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Thu May 18 13:53:17 2017 +1000

----------------------------------------------------------------------
 .travis.yml                                     |   2 -
 archiva-jetty/src/main/assembly/bin.xml         |   4 -
 archiva-jetty/src/main/conf/jetty.xml           | 337 +++++--------------
 archiva-jetty/src/main/contexts/archiva.xml     |  31 --
 .../src/test/resources/log4j2-test.xml          |  41 +++
 .../archiva/proxy/HttpProxyTransferTest.java    |   8 +-
 .../indexing/DownloadRemoteIndexTaskTest.java   |  18 +-
 .../src/test/resources/log4j2-test.xml          |   4 +-
 .../archiva-rest/archiva-rest-services/pom.xml  |  22 +-
 .../rest/services/DefaultPluginsServices.java   |  44 +--
 .../src/test/resources/log4j2-test.xml          |   9 +-
 .../archiva-web/archiva-security/pom.xml        |   2 +-
 .../archiva-web/archiva-web-common/pom.xml      |  12 +-
 .../remotedownload/DownloadArtifactsTest.java   |  16 +-
 .../RemoteRepositoryConnectivityCheckTest.java  |  13 +-
 .../src/test/resources/log4j2-test.xml          |  14 +-
 .../src/main/webapp/WEB-INF/web.xml             |   2 +-
 .../archiva-web/archiva-webdav/pom.xml          |   5 +
 ...bstractRepositoryServletProxiedTestCase.java |   8 +-
 .../webdav/ArchivaDavSessionProviderTest.java   |  63 ++--
 .../src/test/resources/log4j2-test.xml          |   3 +-
 pom.xml                                         |   9 +-
 22 files changed, 262 insertions(+), 405 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/84a18468/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/84a18468/archiva-modules/archiva-web/archiva-security/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/84a18468/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/84a18468/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/84a18468/pom.xml
----------------------------------------------------------------------


[28/50] archiva git commit: Removing duplicate dependency

Posted by ma...@apache.org.
Removing duplicate dependency


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/46a38451
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/46a38451
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/46a38451

Branch: refs/heads/citest
Commit: 46a38451bcb027f9651f12fb1ad9a887cf2c0291
Parents: acc02bf
Author: Martin Stockhammer <ma...@apache.org>
Authored: Sun May 21 16:19:44 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sun May 21 16:19:44 2017 +0200

----------------------------------------------------------------------
 .../archiva-web/archiva-rest/archiva-rest-services/pom.xml     | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/46a38451/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index 456e3a1..4dceb0c 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -329,12 +329,6 @@
     </dependency>
 
     <dependency>
-      <groupId>org.hsqldb</groupId>
-      <artifactId>hsqldb</artifactId>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
       <groupId>org.apache.jackrabbit</groupId>
       <artifactId>jackrabbit-core</artifactId>
       <scope>test</scope>


[19/50] archiva git commit: jetty.xml ready, do not force encoding in encoding servlet

Posted by ma...@apache.org.
jetty.xml ready, do not force encoding in encoding servlet

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/dc97f3ef
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/dc97f3ef
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/dc97f3ef

Branch: refs/heads/citest
Commit: dc97f3ef8cf530e8d72057038f9138b0eec9213d
Parents: e9376ee
Author: olivier lamy <ol...@apache.org>
Authored: Sat May 13 09:02:07 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Sat May 13 09:02:07 2017 +1000

----------------------------------------------------------------------
 archiva-jetty/src/main/conf/jetty.xml           | 336 ++++++-------------
 .../indexing/DownloadRemoteIndexTaskTest.java   |   7 +-
 .../src/main/webapp/WEB-INF/web.xml             |   2 +-
 3 files changed, 111 insertions(+), 234 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/dc97f3ef/archiva-jetty/src/main/conf/jetty.xml
----------------------------------------------------------------------
diff --git a/archiva-jetty/src/main/conf/jetty.xml b/archiva-jetty/src/main/conf/jetty.xml
index 2881f23..77a8abb 100644
--- a/archiva-jetty/src/main/conf/jetty.xml
+++ b/archiva-jetty/src/main/conf/jetty.xml
@@ -30,215 +30,126 @@
 
 <Configure id="Server" class="org.eclipse.jetty.server.Server">
 
-    <!-- =========================================================== -->
-    <!-- Server Thread Pool                                          -->
-    <!-- =========================================================== -->
-    <Set name="ThreadPool">
-      <!-- Default bounded blocking threadpool 
-      -->
-      <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
-        <Set name="minThreads">10</Set>
-        <Set name="maxThreads">250</Set>
-      </New>
 
-      <!-- Optional Java 5 bounded threadpool with job queue 
-      <New class="org.eclipse.jetty.util.thread.ExecutorThreadPool">
-        <Set name="corePoolSize">250</Set>
-        <Set name="maximumPoolSize">250</Set>
-      </New>
-      -->
-    </Set>
+  <Arg name="threadpool">
+    <New id="threadpool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
+      <Arg name="minThreads" type="int">10</Arg>
+      <Arg name="maxThreads" type="int">200</Arg>
+      <Arg name="idleTimeout" type="int">60000</Arg>
+      <Set name="detailedDump">false</Set>
+    </New>
+  </Arg>
 
-    <!-- =========================================================== -->
-    <!-- Set connectors                                              -->
-    <!-- =========================================================== -->
-    <!-- One of each type!                                           -->
-    <!-- =========================================================== -->
+  <Call name="addBean">
+    <Arg>
+      <New class="org.eclipse.jetty.util.thread.ScheduledExecutorScheduler"/>
+    </Arg>
+  </Call>
 
-    <!-- Use this connector for many frequently idle connections
-         and for threadless continuations.
-    -->    
-    <Call name="addConnector">
-      <Arg>
-          <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
-            <Set name="host"><SystemProperty name="jetty.host"/></Set>
-            <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
-            <Set name="maxIdleTime">30000</Set>
-            <Set name="Acceptors">2</Set>
-            <Set name="statsOn">false</Set>
-            <Set name="confidentialPort">8443</Set>
-            <Set name="lowResourcesConnections">5000</Set>
-            <Set name="lowResourcesMaxIdleTime">5000</Set>
-          </New>
-      </Arg>
-    </Call>
+  <!-- =========================================================== -->
+  <!-- Set connectors                                              -->
+  <!-- =========================================================== -->
+  <!-- One of each type!                                           -->
+  <!-- =========================================================== -->
 
-    <!-- Use this connector if NIO is not available. 
-    <Call name="addConnector">
-      <Arg>
-          <New class="org.mortbay.jetty.bio.SocketConnector">
-            <Set name="port">8081</Set>
-            <Set name="maxIdleTime">50000</Set>
-            <Set name="lowResourceMaxIdleTime">1500</Set>
-          </New>
-      </Arg>
-    </Call>
-    -->
+  <!-- Use this connector for many frequently idle connections
+       and for threadless continuations.
+  -->
+  <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
+    <Set name="secureScheme">https</Set>
+    <Set name="securePort"><Property name="jetty.secure.port" default="8443" /></Set>
+    <Set name="outputBufferSize">32768</Set>
+    <Set name="requestHeaderSize">8192</Set>
+    <Set name="responseHeaderSize">8192</Set>
+    <Set name="headerCacheSize">512</Set>
 
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    <!-- To add a HTTPS SSL listener                                     -->
-    <!-- see jetty-ssl.xml to add an ssl connector. use                  -->
-    <!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml             -->
-    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-    
-    <!-- =========================================================== -->
-    <!-- Set up global session ID manager                            -->
-    <!-- =========================================================== -->
-    <!--
-    <Set name="sessionIdManager">
-      <New class="org.mortbay.jetty.servlet.HashSessionIdManager">
-        <Set name="workerName">node1</Set>
-      </New>
-    </Set>
-    -->
+  </New>
 
-    <!-- =========================================================== -->
-    <!-- Set handler Collection Structure                            --> 
-    <!-- =========================================================== -->
-    <Set name="handler">
-      <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
-        <Set name="handlers">
-         <Array type="org.eclipse.jetty.server.Handler">
-           <Item>
-             <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
-           </Item>
-           <Item>
-             <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
-           </Item>
-           <Item>
-             <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
-           </Item>
-         </Array>
-        </Set>
+  <Call name="addConnector">
+    <Arg>
+      <New class="org.eclipse.jetty.server.ServerConnector">
+        <Arg name="server"><Ref refid="Server" /></Arg>
+        <Arg name="factories">
+          <Array type="org.eclipse.jetty.server.ConnectionFactory">
+            <Item>
+              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+                <Arg name="config"><Ref refid="httpConfig" /></Arg>
+              </New>
+            </Item>
+          </Array>
+        </Arg>
+        <Set name="host"><Property name="jetty.host" /></Set>
+        <Set name="port"><Property name="jetty.port" default="8080" /></Set>
+        <Set name="idleTimeout">30000</Set>
       </New>
-    </Set>
-    
-    <!-- =========================================================== -->
-    <!-- Configure the context deployer                              -->
-    <!-- A context deployer will deploy contexts described in        -->
-    <!-- configuration files discovered in a directory.              -->
-    <!-- The configuration directory can be scanned for hot          -->
-    <!-- deployments at the configured scanInterval.                 -->
-    <!--                                                             -->
-    <!-- This deployer is configured to deploy contexts configured   -->
-    <!-- in the $JETTY_HOME/contexts directory                       -->
-    <!--                                                             -->
-    <!-- =========================================================== -->
-    <Call name="addLifeCycle">
-      <Arg>
-        <New class="org.eclipse.jetty.deploy.ContextDeployer">
-          <Set name="contexts"><Ref id="Contexts"/></Set>
-          <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
-          <Set name="scanInterval">1</Set>
-        </New>
-      </Arg>
-    </Call>
-
-    <!-- =========================================================== -->
-    <!-- Configure the webapp deployer.                              -->
-    <!-- A webapp  deployer will deploy standard webapps discovered  -->
-    <!-- in a directory at startup, without the need for additional  -->
-    <!-- configuration files.    It does not support hot deploy or   -->
-    <!-- non standard contexts (see ContextDeployer above).          -->
-    <!--                                                             -->
-    <!-- This deployer is configured to deploy webapps from the      -->
-    <!-- $JETTY_HOME/webapps directory                               -->
-    <!--                                                             -->
-    <!-- Normally only one type of deployer need be used.            -->
-    <!--                                                             -->
-    <!-- =========================================================== -->
-    <Call name="addLifeCycle">
-      <Arg>
-        <New class="org.eclipse.jetty.deploy.WebAppDeployer">
-          <Set name="contexts"><Ref id="Contexts"/></Set>
-          <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/apps</Set>
-            <Set name="parentLoaderPriority">false</Set>
-            <Set name="extract">true</Set>
-            <Set name="allowDuplicates">false</Set>
-        </New>
-      </Arg>
-    </Call>
+    </Arg>
+  </Call>
 
-    <!-- =========================================================== -->
-    <!-- Configure Request Log                                       -->
-    <!-- Request logs  may be configured for the entire server here, -->
-    <!-- or they can be configured for a specific web app in a       -->
-    <!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
-    <!-- for an example).                                            -->
-    <!-- =========================================================== -->
-    <Ref id="RequestLog">
-      <Set name="requestLog">
-        <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
-          <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/request-yyyy_mm_dd.log</Set>
-          <Set name="filenameDateFormat">yyyyMMdd</Set>
-          <Set name="retainDays">90</Set>
-          <Set name="append">true</Set>
-          <Set name="extended">true</Set>
-          <Set name="logCookies">false</Set>
-          <Set name="LogTimeZone">GMT</Set>
-        </New>
+  <!-- =========================================================== -->
+  <!-- Set handler Collection Structure                            -->
+  <!-- =========================================================== -->
+  <Set name="handler">
+    <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
+      <Set name="handlers">
+        <Array type="org.eclipse.jetty.server.Handler">
+          <Item>
+            <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
+          </Item>
+          <Item>
+            <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
+          </Item>
+        </Array>
       </Set>
-    </Ref>
+    </New>
+  </Set>
 
-    <!-- =========================================================== -->
-    <!-- extra options                                               -->
-    <!-- =========================================================== -->
-    <Set name="stopAtShutdown">true</Set>
-    <Set name="sendServerVersion">true</Set>
-    <Set name="sendDateHeader">true</Set>
-    <Set name="gracefulShutdown">1000</Set>
+  <Call name="setRequestLog">
+    <Arg>
+      <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
+        <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/request-yyyy_mm_dd.log</Set>
+        <Set name="filenameDateFormat">yyyyMMdd</Set>
+        <Set name="retainDays">90</Set>
+        <Set name="append">true</Set>
+        <Set name="extended">true</Set>
+        <Set name="logCookies">false</Set>
+        <Set name="LogTimeZone">GMT</Set>
+      </New>
+    </Arg>
+  </Call>
 
+  <Call name="addBean">
+    <Arg>
+      <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
+        <Set name="contexts">
+          <Ref refid="Contexts" />
+        </Set>
+        <Call id="webappprovider" name="addAppProvider">
+          <Arg>
+            <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
+              <Set name="monitoredDirName"><Property name="jetty.base" default="." />/apps</Set>
+              <Set name="configurationClasses">
+                <Array type="java.lang.String">
+                  <Item>org.eclipse.jetty.webapp.WebInfConfiguration</Item>
+                  <Item>org.eclipse.jetty.webapp.WebXmlConfiguration</Item>
+                  <Item>org.eclipse.jetty.webapp.MetaInfConfiguration</Item>
+                  <Item>org.eclipse.jetty.webapp.FragmentConfiguration</Item>
+                  <Item>org.eclipse.jetty.plus.webapp.EnvConfiguration</Item>
+                  <Item>org.eclipse.jetty.plus.webapp.PlusConfiguration</Item>
+                  <!--Item>org.eclipse.jetty.annotations.AnnotationConfiguration</Item-->
+                  <Item>org.eclipse.jetty.webapp.JettyWebXmlConfiguration</Item>
+                </Array>
+              </Set>
+            </New>
+          </Arg>
+        </Call>
+      </New>
+    </Arg>
+  </Call>
 
- 
- <!-- =========================================================== -->
-  <!-- JNDI java:comp/env                                          -->
-  <!-- To use JNDI with Jetty, you will need to tell your          -->
-  <!-- WebAppContext to process the naming related items in        -->
-  <!-- web.xml. For an example of how to do that, see the test     -->
-  <!-- webapp below. More information can be found at              -->
-  <!-- http://docs.codehaus.org/display/JETTY/Jetty+Wiki           -->
   <!-- =========================================================== -->
-
-
-  <!-- Configuring <resource-ref> and <resource-env-ref>s          -->
-  <!--                                                             -->
-  <!-- The following are examples of setting up a resource that   -->
-  <!-- can be referenced in a web.xml file as a <resource-ref> or  -->
-  <!-- a <resource-env-ref>. The first argument is the name of the -->
-  <!-- resource relative to java:comp/env and must be the SAME as  -->
-  <!-- the <res-ref-name> or <resource-env-ref-name> in web.xml.   -->
-  <!-- The second argument is the construction of the resource     -->
-  <!-- object. Any object at all can be configured.                -->
-
-
-  <!-- These examples set up a javax.sql.DataSource around an      -->
-  <!-- XADataSource that is provided by the Derby relational db.   -->
-  <!-- The DataSource wrapper that is registered in JNDI is        -->
-  <!--  provided by Atomikos, and works with the Atomikos          -->
-  <!-- transaction manager configured further below. To use these  -->
-  <!-- examples, download Atomikos http://www.atomikos.com and     -->
-  <!-- Derby http://db.apache.org/derby                            -->
-
-
-  <!-- Configuring Transactions                                    -->
-  <!--                                                             -->
-  <!-- The following is a example of a setting up a JTA            -->
-  <!-- transaction manager that can be referenced by looking up    -->
-  <!-- java:comp/UserTransaction. Note that this is just an        -->
-  <!-- example and if you uncomment it, you will need to download  -->
-  <!-- the atomikos jar (see http://www.atomikos.com/download.html)-->
-  <!-- You can configure any transaction manager that implements   -->
-  <!-- javax.transaction.UserTransaction.                          -->
+  <!-- extra options                                               -->
+  <!-- =========================================================== -->
+  <Set name="stopAtShutdown">true</Set>
 
 
   <Call name="setAttribute">
@@ -287,30 +198,6 @@
     </Arg>
   </New>
 
-  <!-- Users / Security Database -->
-  <!--
-  <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
-    <Arg>jdbc/users</Arg>
-    <Arg>
-      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
-        <Set name="user">sa</Set>
-        <Set name="createDatabase">create</Set>
-      </New>
-    </Arg>
-  </New>
-
-  <New id="usersShutdown" class="org.eclipse.jetty.plus.jndi.Resource">
-    <Arg>jdbc/usersShutdown</Arg>
-    <Arg>
-      <New class="org.apache.derby.jdbc.EmbeddedDataSource">
-        <Set name="DatabaseName"><SystemProperty name="appserver.base" default=".."/>/data/databases/users</Set>
-        <Set name="user">sa</Set>
-        <Set name="shutdownDatabase">shutdown</Set>
-      </New>
-    </Arg>
-  </New>
-  -->
   <New id="users" class="org.eclipse.jetty.plus.jndi.Resource">
     <Arg>jdbc/users</Arg>
     <Arg>
@@ -341,14 +228,5 @@
   </New>
 
 
-  <!--
-  <New id="ArchivaWebAppContext" class="org.eclipse.jetty.webapp.WebAppContext">
-    <Arg><Ref id="Handlers"/></Arg>
-    <Arg><SystemProperty name="jetty.home" default="."/>/apps/archiva</Arg>
-    <Arg>/</Arg>
-    <Set name="extractWAR">false</Set>
-    <Set name="throwUnavailableOnStartupException">true</Set>
-  </New>
-  -->
 
 </Configure>

http://git-wip-us.apache.org/repos/asf/archiva/blob/dc97f3ef/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
index 09fdf5a..7e95b4f 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/src/test/java/org/apache/archiva/scheduler/indexing/DownloadRemoteIndexTaskTest.java
@@ -18,11 +18,11 @@ package org.apache.archiva.scheduler.indexing;
  * under the License.
  */
 
-import junit.framework.TestCase;
 import org.apache.archiva.admin.model.beans.RemoteRepository;
 import org.apache.archiva.admin.model.remote.RemoteRepositoryAdmin;
 import org.apache.archiva.common.plexusbridge.PlexusSisuBridge;
 import org.apache.archiva.common.utils.FileUtil;
+import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
 import org.apache.lucene.search.BooleanClause;
 import org.apache.lucene.search.BooleanQuery;
 import org.apache.maven.index.FlatSearchRequest;
@@ -30,14 +30,12 @@ import org.apache.maven.index.FlatSearchResponse;
 import org.apache.maven.index.MAVEN;
 import org.apache.maven.index.NexusIndexer;
 import org.apache.maven.index.expr.StringSearchExpression;
-import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.HttpConnectionFactory;
 import org.eclipse.jetty.server.Server;
 import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.servlet.DefaultServlet;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
-import static org.assertj.core.api.Assertions.assertThat;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
@@ -52,7 +50,8 @@ import java.io.File;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.concurrent.TimeUnit;
-import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
+
+import static org.assertj.core.api.Assertions.assertThat;
 
 /**
  * @author Olivier Lamy

http://git-wip-us.apache.org/repos/asf/archiva/blob/dc97f3ef/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
index e1ac74b..72d2deb 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/WEB-INF/web.xml
@@ -51,7 +51,7 @@
     </init-param>
     <init-param>
       <param-name>forceEncoding</param-name>
-      <param-value>true</param-value>
+      <param-value>false</param-value>
     </init-param>
   </filter>
 


[39/50] archiva git commit: Changing tests to WebDriver

Posted by ma...@apache.org.
Changing tests to WebDriver


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/7b8d3bb3
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/7b8d3bb3
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/7b8d3bb3

Branch: refs/heads/citest
Commit: 7b8d3bb3803c72cf08dd344e4e605207721a65a1
Parents: 422af34
Author: Martin Stockhammer <ma...@apache.org>
Authored: Thu Jun 8 07:02:29 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Thu Jun 8 07:02:29 2017 +0200

----------------------------------------------------------------------
 .../archiva-web/archiva-webapp-test/pom.xml     |  46 ++++
 .../org/apache/archiva/web/test/LoginTest.java  |   5 +
 .../archiva/web/test/RepositoryAdminTest.java   |  18 +-
 .../archiva/web/test/WebDriverBrowseTest.java   |  35 +++-
 .../apache/archiva/web/test/WebDriverTest.java  |  33 ++-
 .../web/test/parent/AbstractArchivaTest.java    |   3 +-
 .../web/test/parent/AbstractSeleniumTest.java   | 208 ++++++++++++-------
 .../tools/ArchivaSeleniumExecutionRule.java     |   7 +
 .../web/test/tools/WebdriverUtility.java        |  15 +-
 .../src/test/resources/log4j2-test.xml          |   4 +
 .../archiva-web/archiva-webapp/pom.xml          | 137 ++++++++++++
 .../main/webapp/js/templates/archiva/menu.html  |   2 +-
 .../archiva-webapp/src/test/jetty/jetty-env.xml |  18 ++
 .../archiva-web/archiva-webdav/pom.xml          |   8 +-
 pom.xml                                         |   1 +
 15 files changed, 445 insertions(+), 95 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
index db11a19..a5239a6 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/pom.xml
@@ -103,6 +103,23 @@
           <groupId>org.eclipse.jetty.websocket</groupId>
           <artifactId>websocket-common</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>net.sourceforge.htmlunit</groupId>
+          <artifactId>neko-htmlunit</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>net.sourceforge.htmlunit</groupId>
+          <artifactId>htmlunit-core-js</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>net.sourceforge.cssparser</groupId>
+          <artifactId>cssparser</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.seleniumhq.selenium</groupId>
+          <artifactId>htmlunit-driver</artifactId>
+        </exclusion>
+
       </exclusions>
     </dependency>
 
@@ -183,6 +200,19 @@
           <groupId>org.eclipse.jetty.websocket</groupId>
           <artifactId>websocket-common</artifactId>
         </exclusion>
+        <exclusion>
+          <groupId>net.sourceforge.htmlunit</groupId>
+          <artifactId>neko-htmlunit</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>net.sourceforge.htmlunit</groupId>
+          <artifactId>htmlunit-core-js</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>net.sourceforge.cssparser</groupId>
+          <artifactId>cssparser</artifactId>
+        </exclusion>
+
       </exclusions>
     </dependency>
 
@@ -289,6 +319,21 @@
     </dependency>
 
 
+    <dependency>
+      <groupId>org.seleniumhq.selenium</groupId>
+      <artifactId>htmlunit-driver</artifactId>
+      <version>${htmlUnitVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>net.sourceforge.htmlunit</groupId>
+      <artifactId>htmlunit</artifactId>
+      <version>${htmlUnitVersion}</version>
+      <scope>test</scope>
+    </dependency>
+
+
+
+
   </dependencies>
 
   <build>
@@ -367,6 +412,7 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-failsafe-plugin</artifactId>
+        <version>2.20</version>
         <configuration>
           <redirectTestOutputToFile>false</redirectTestOutputToFile>
           <runOrder>alphabetical</runOrder>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
index d0f50fb..24f1a09 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/LoginTest.java
@@ -20,7 +20,9 @@ package org.apache.archiva.web.test;
  */
 
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
+import org.junit.Assert;
 import org.junit.Test;
+import org.openqa.selenium.By;
 
 /**
  * Based on LoginTest of Emmanuel Venisse test.
@@ -59,6 +61,7 @@ public class LoginTest
     {
         goToLoginPage();
         setFieldValue( "user-login-form-password", "password" );
+        waitPage();
         clickLinkWithLocator( "modal-login-ok", true );
         assertTextPresent( "This field is required." );
     }
@@ -68,6 +71,8 @@ public class LoginTest
     {
         goToLoginPage();
         setFieldValue( "user-login-form-username", getProperty( "ADMIN_USERNAME" ) );
+        Assert.assertTrue(getWebDriver().findElement( By.id("modal-login-ok") ).isDisplayed());
+        Assert.assertTrue(getWebDriver().findElement( By.id("modal-login-ok") ).isEnabled());
         clickLinkWithLocator( "modal-login-ok", true );
         assertTextPresent( "This field is required." );
     }

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
index 7bdca22..b519bd9 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/RepositoryAdminTest.java
@@ -22,6 +22,8 @@ package org.apache.archiva.web.test;
 import org.apache.archiva.web.test.parent.AbstractArchivaTest;
 import org.junit.Assert;
 import org.junit.Test;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 
 /**
  * Based on LoginTest of Emmanuel Venisse test.
@@ -40,9 +42,8 @@ public class RepositoryAdminTest
     {
         login( getAdminUsername(), getAdminPassword() );
         clickLinkWithLocator( "menu-repositories-list-a", true );
-        
         // add custom repo
-        assertTextPresent( "Repositories Administration " );
+        assertTextPresent( "Repositories Administration" );
         clickLinkWithXPath( "//a[@href='#remote-repositories-content']", true );
         
         clickLinkWithXPath( "//a[@href='#remote-repository-edit']", true );
@@ -60,16 +61,21 @@ public class RepositoryAdminTest
         assertTextPresent( "central" );
         assertTextNotPresent( "myrepoid" );
         clickButtonWithLocator( "proxy-connectors-view-tabs-a-edit", true );
-        getSelenium().select( "sourceRepoId", "internal" );
-        getSelenium().select( "targetRepoId", "myrepoid" );
+        selectValue( "sourceRepoId", "internal" );
+        // Workaround
+        // TODO: Check after upgrade of htmlunit, bootstrap or jquery
+        // TODO: Check whats wrong here
+        ( (JavascriptExecutor) getWebDriver() ).executeScript( "$('#targetRepoId').show();" );
+        // End of Workaround
+        selectValue( "targetRepoId", "myrepoid" );
         clickButtonWithLocator( "proxy-connector-btn-save", true);
         assertTextPresent( "central" );
         assertTextPresent( "myrepoid" );
         clickLinkWithXPath( "//i[contains(concat(' ',normalize-space(@class),' '),' icon-resize-vertical ')]/../..", true );
         assertTextPresent( "internal" );
         // order test
-        Assert.assertTrue( "First repo is myrepo",getSelenium().getText("xpath=//div[@id='proxy-connector-edit-order-div']/div[1]" ).contains( "myrepoid" ));
-        Assert.assertTrue( "Second repo is central",getSelenium().getText("xpath=//div[@id='proxy-connector-edit-order-div']/div[2]" ).contains( "central" ));
+        Assert.assertTrue( "First repo is myrepo",findElement("//div[@id='proxy-connector-edit-order-div']/div[1]").getText().contains("myrepoid"));
+        Assert.assertTrue( "Second repo is central",findElement("//div[@id='proxy-connector-edit-order-div']/div[2]" ).getText().contains( "central" ));
              
         // works until this point
         /*getSelenium().mouseDown( "xpath=//div[@id='proxy-connector-edit-order-div']/div[1]" );

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
index 6838cc2..7c7b718 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverBrowseTest.java
@@ -18,6 +18,8 @@ package org.apache.archiva.web.test;
  * under the License.
  */
 
+import com.gargoylesoftware.htmlunit.javascript.background.JavaScriptExecutor;
+import org.fluentlenium.adapter.junit.After;
 import org.fluentlenium.configuration.ConfigurationProperties;
 import org.fluentlenium.configuration.FluentConfiguration;
 import org.junit.Assert;
@@ -28,8 +30,11 @@ import org.fluentlenium.core.domain.FluentList;
 import org.fluentlenium.core.domain.FluentWebElement;
 import org.junit.Before;
 import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -58,9 +63,22 @@ public class WebDriverBrowseTest
     @Override
     public void takeScreenShot( String fileName )
     {
+        log.info("Taking screenshot "+fileName);
         WebdriverUtility.takeScreenShot( fileName, getDriver(), (a)->super.takeScreenShot( a ) );
     }
 
+    @Override
+    protected void failed( String testName )
+    {
+        takeScreenShot( testName + ".png" );
+    }
+
+    @Override
+    public boolean canTakeScreenShot()
+    {
+        return true;
+    }
+
     @Before
     public void init()
     {
@@ -68,6 +86,7 @@ public class WebDriverBrowseTest
         setScreenshotMode( TriggerMode.AUTOMATIC_ON_FAIL );
         setDriverLifecycle( DriverLifecycle.CLASS );
 
+
     }
 
     @Test
@@ -120,9 +139,21 @@ public class WebDriverBrowseTest
         }
         else
         {
-            elements = find( "#login-link-a" );
+            elements = find( By.id("login-link-a"));
             WebElement webElement = elements.get( 0 ).getElement();
-            Assert.assertEquals( "LOGIN", webElement.getText() );
+            for(FluentWebElement element : elements) {
+                log.info("Found login link: "+element.getElement().getTagName()+ " "+ element.getElement().getText());
+            }
+            log.info("innerText: "+webElement.getAttribute("innerText"));
+            log.info("value: "+webElement.getAttribute("value"));
+            log.info("innerHTML: "+webElement.getAttribute( "innerHTML" ));
+            log.info("JS: "+((( JavascriptExecutor)getDriver()).executeScript("return $(arguments[0]).text();", webElement)));
+            if (getDriver() instanceof HtmlUnitDriver) {
+                Assert.assertEquals( "LOGIN", webElement.getText().toUpperCase() );
+            } else
+            {
+                Assert.assertEquals( "LOGIN", webElement.getText() );
+            }
         }
 
     }

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
index c2980e9..bb01a89 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/WebDriverTest.java
@@ -18,6 +18,7 @@ package org.apache.archiva.web.test;
  * under the License.
  */
 
+import org.fluentlenium.adapter.junit.After;
 import org.junit.Assert;
 import org.apache.archiva.web.test.tools.WebdriverUtility;
 import org.apache.commons.io.FileUtils;
@@ -28,8 +29,11 @@ import org.fluentlenium.core.domain.FluentList;
 import org.fluentlenium.core.domain.FluentWebElement;
 import org.junit.Before;
 import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -52,9 +56,21 @@ public class WebDriverTest
     @Override
     public void takeScreenShot( String fileName )
     {
+        log.info("Taking screenshot "+fileName);
         WebdriverUtility.takeScreenShot( fileName, getDriver(), (a)->super.takeScreenShot( a ) );
     }
 
+    @Override
+    protected void failed( String testName )
+    {
+        takeScreenShot( testName + ".png" );
+    }
+
+    @Override
+    public boolean canTakeScreenShot()
+    {
+        return true;
+    }
 
     @Before
     public void init() {
@@ -79,9 +95,22 @@ public class WebDriverTest
             WebElement webElement = elements.get(0).getElement();
             Assert.assertEquals("Create Admin User", webElement.getText());
         } else {
-            elements = find("#login-link-a");
+            elements = find( By.id("login-link-a"));
+            for(FluentWebElement element : elements) {
+                log.info("Found login link: "+element.getElement().getTagName()+ " "+ element.getElement().getText());
+            }
             WebElement webElement = elements.get(0).getElement();
-            Assert.assertEquals("LOGIN", webElement.getText());
+            log.info("innerText: "+webElement.getAttribute("innerText"));
+            log.info("value: "+webElement.getAttribute("value"));
+            log.info("innerHTML: "+webElement.getAttribute( "innerHTML" ));
+            log.info("JS: "+(((JavascriptExecutor)getDriver()).executeScript("return $(arguments[0]).text();", webElement)));
+            if (getDriver() instanceof HtmlUnitDriver ) {
+                Assert.assertEquals( "LOGIN", webElement.getText().toUpperCase() );
+            } else
+            {
+                Assert.assertEquals( "LOGIN", webElement.getText() );
+            }
+
         }
 
     }

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
index c4c343d..d05cbcc 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractArchivaTest.java
@@ -174,7 +174,8 @@ public abstract class AbstractArchivaTest
 
     protected void logout()
     {
-        clickLinkWithText( "Logout" );
+        clickLinkWithLocator( "logout-link-a" );
+        waitPage();
         assertTextNotPresent( "Current User:" );
         assertLinkNotVisible( "Edit Details" );
         assertLinkNotVisible( "Logout" );

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
index daec10b..763bcc3 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java
@@ -20,7 +20,6 @@ package org.apache.archiva.web.test.parent;
  */
 
 import com.thoughtworks.selenium.Selenium;
-//import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
 import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium;
 import org.apache.archiva.web.test.tools.ArchivaSeleniumExecutionRule;
 import org.apache.archiva.web.test.tools.WebdriverUtility;
@@ -39,7 +38,13 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
 import org.apache.commons.io.FileUtils;
+import org.openqa.selenium.By;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.NoSuchElementException;
 import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.htmlunit.HtmlUnitDriver;
+import org.openqa.selenium.support.ui.Select;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -70,6 +75,8 @@ public abstract class AbstractSeleniumTest
 
     private Selenium selenium = null;
 
+    WebDriver webDriver = null;
+
     public Properties p;
 
     /**
@@ -113,9 +120,10 @@ public abstract class AbstractSeleniumTest
             {
                 WebDriver driver = WebdriverUtility.newWebDriver(browser, seleniumHost, seleniumPort, remoteSelenium);
                 WebDriverBackedSelenium selenium = new WebDriverBackedSelenium(driver, baseUrl);
-                selenium.getWrappedDriver();
-                selenium.start();
+                // selenium.start();
                 selenium.setTimeout( Integer.toString( maxWaitTimeInMs ) );
+                this.selenium = selenium;
+                this.webDriver = driver;
             }
         }
         catch ( Exception e )
@@ -146,8 +154,8 @@ public abstract class AbstractSeleniumTest
         // if not admin user created create one
         if ( isElementVisible( "create-admin-link" ) )
         {
-            Assert.assertFalse( getSelenium().isVisible( "login-link-a" ) );
-            Assert.assertFalse( getSelenium().isVisible( "register-link-a" ) );
+            Assert.assertFalse( isElementVisible( "login-link-a" ) );
+            Assert.assertFalse( isElementVisible( "register-link-a" ) );
             // skygo need to set to true for passing is that work as expected ?
             clickLinkWithLocator( "create-admin-link-a", true );
             assertCreateAdmin();
@@ -161,8 +169,14 @@ public abstract class AbstractSeleniumTest
         }
         else
         {
-            Assert.assertTrue( getSelenium().isVisible( "login-link-a" ) );
-            Assert.assertTrue( getSelenium().isVisible( "register-link-a" ) );
+            try
+            {
+                Assert.assertNotNull( getWebDriver().findElement( By.id( "login-link-a" ) ) );
+            } catch (NoSuchElementException e) {
+                logger.info("ASSERT: login-link-a not found!");
+            }
+            Assert.assertTrue( isElementVisible( "login-link-a" ) );
+            Assert.assertTrue( isElementVisible( "register-link-a" ) );
             login( getAdminUsername(), getAdminPassword() );
         }
 
@@ -173,6 +187,10 @@ public abstract class AbstractSeleniumTest
         return selenium;
     }
 
+    public WebDriver getWebDriver() {
+        return this.webDriver;
+    }
+
     protected String getProperty( String key )
     {
         return p.getProperty( key );
@@ -223,6 +241,7 @@ public abstract class AbstractSeleniumTest
     {
         getSelenium().open( baseUrl );
         waitPage();
+        getWebDriver().manage().window().maximize();
         // are we already logged in ?
         if ( isElementVisible( "logout-link" ) ) //isElementPresent( "logoutLink" ) )
         {
@@ -232,8 +251,17 @@ public abstract class AbstractSeleniumTest
         }
         else if ( isElementVisible( "login-link-a" ) )
         {
-            clickLinkWithLocator( "login-link-a" );
+            clickLinkWithLocator( "login-link-a", true );
         }
+        // This is a workaround for bug with HTMLUnit. The display attribute of the
+        // login dialog is not changed via the click.
+        // TODO: Check after changing jquery, bootstrap or htmlunit version
+        if (getWebDriver() instanceof HtmlUnitDriver)
+        {
+            ( (JavascriptExecutor) getWebDriver() ).executeScript( "$('#modal-login').show();" );
+        }
+        // END OF WORKAROUND
+
         assertLoginModal();
     }
 
@@ -245,6 +273,7 @@ public abstract class AbstractSeleniumTest
         assertElementPresent( "user-login-form-username" );
         assertElementPresent( "user-login-form-password" );
         assertButtonWithIdPresent( "modal-login-ok" );
+        Assert.assertTrue( isElementVisible( "modal-login-ok" ));
     }
 
 
@@ -261,7 +290,10 @@ public abstract class AbstractSeleniumTest
     public void submitLoginPage( String username, String password, boolean rememberMe, boolean validUsernamePassword,
                                  String assertReturnPage )
     {
-        clickLinkWithLocator( "login-link-a", false );
+        clickLinkWithLocator( "login-link-a", true );
+        // TODO: Check whats wrong here
+        ( (JavascriptExecutor) getWebDriver() ).executeScript( "$('#modal-login').show();" );
+
         setFieldValue( "user-login-form-username", username );
         setFieldValue( "user-login-form-password", password );
         /*
@@ -314,7 +346,7 @@ public abstract class AbstractSeleniumTest
     public void assertFieldValue( String fieldValue, String fieldName )
     {
         assertElementPresent( fieldName );
-        Assert.assertEquals( fieldValue, getSelenium().getValue( fieldName ) );
+        Assert.assertEquals( fieldValue, findElement(fieldName ).getAttribute( "value") );
     }
 
     public void assertPage( String title )
@@ -325,22 +357,22 @@ public abstract class AbstractSeleniumTest
     public String getTitle()
     {
         // Collapse spaces
-        return getSelenium().getTitle().replaceAll( "[ \n\r]+", " " );
+        return getWebDriver().getTitle().replaceAll( "[ \n\r]+", " " );
     }
 
     public String getHtmlContent()
     {
-        return getSelenium().getHtmlSource();
+        return getWebDriver().getPageSource();
     }
 
     public String getText( String locator )
     {
-        return getSelenium().getText( locator );
+        return findElement(locator ).getText();
     }
 
     public void assertTextPresent( String text )
     {
-        Assert.assertTrue( "'" + text + "' isn't present.", getSelenium().isTextPresent( text ) );
+        Assert.assertTrue( "'" + text + "' isn't present.", getWebDriver().getPageSource().contains( text ) );
     }
 
     /**
@@ -377,22 +409,22 @@ public abstract class AbstractSeleniumTest
 
     public void assertLinkPresent( String text )
     {
-        Assert.assertTrue( "The link '" + text + "' isn't present.", isElementPresent( "link=" + text ) );
+        Assert.assertTrue( "The link '" + text + "' isn't present.", isElementPresent( "//*[text()='" + text+"']//ancestor::a"  ) );
     }
 
     public void assertLinkNotPresent( String text )
     {
-        Assert.assertFalse( "The link('" + text + "' is present.", isElementPresent( "link=" + text ) );
+        Assert.assertFalse( "The link('" + text + "' is present.", isElementPresent( "//*[text()='" + text+"']//ancestor::a" ) );
     }
 
     public void assertLinkNotVisible( String text )
     {
-        Assert.assertFalse( "The link('" + text + "' is visible.", isElementVisible( "link=" + text ) );
+        Assert.assertFalse( "The link('" + text + "' is visible.", isElementVisible( "//*[text()='" + text+"']//ancestor::a"  ) );
     }
 
     public void assertLinkVisible( String text )
     {
-        Assert.assertTrue( "The link('" + text + "' is not visible.", isElementVisible( "link=" + text ) );
+        Assert.assertTrue( "The link('" + text + "' is not visible.", isElementVisible( "//*[text()='" + text+"']//ancestor::a" ) );
     }
 
     public void assertImgWithAlt( String alt )
@@ -426,17 +458,26 @@ public abstract class AbstractSeleniumTest
 
     public boolean isLinkPresent( String text )
     {
-        return isElementPresent( "link=" + text );
+        return isElementPresent( "//*[text()='" + text +"']//ancestor::a" );
     }
 
     public boolean isElementPresent( String locator )
     {
-        return getSelenium().isElementPresent( locator );
+        try
+        {
+            return findElement(locator ) != null;
+        } catch (Exception e) {
+            return false;
+        }
     }
 
-    public boolean isElementVisible( String locator )
+    public boolean isElementVisible(String locator )
     {
-        return getSelenium().isVisible( locator );
+        try {
+            return findElement(locator).isDisplayed();
+        } catch (Exception e) {
+            return false;
+        }
     }
 
 
@@ -465,7 +506,7 @@ public abstract class AbstractSeleniumTest
 
     public String getFieldValue( String fieldName )
     {
-        return getSelenium().getValue( fieldName );
+        return findElement(fieldName ).getAttribute( "value" );
     }
 
     public String getCellValueFromTable( String tableElement, int row, int column )
@@ -475,25 +516,19 @@ public abstract class AbstractSeleniumTest
 
     public void selectValue( String locator, String value )
     {
-        getSelenium().select( locator, "label=" + value );
+        WebElement element = findElement(locator );
+        Select select = new Select(element);
+        select.selectByValue( value );
     }
 
-
-    public void assertOptionPresent( String selectField, String[] options )
-    {
-        assertElementPresent( selectField );
-        String[] optionsPresent = getSelenium().getSelectOptions( selectField );
-        List<String> expected = Arrays.asList( options );
-        List<String> present = Arrays.asList( optionsPresent );
-        Assert.assertTrue( "Options expected are not included in present options", present.containsAll( expected ) );
+    public WebElement findElement(String locator) {
+        if (locator.startsWith("/")) {
+            return getWebDriver().findElement( By.xpath( locator ) );
+        } else {
+            return getWebDriver().findElement( By.id(locator) );
+        }
     }
 
-    public void assertSelectedValue( String value, String fieldName )
-    {
-        assertElementPresent( fieldName );
-        String optionsPresent = getSelenium().getSelectedLabel( value );
-        Assert.assertEquals( optionsPresent, value );
-    }
 
     public void submit()
     {
@@ -572,7 +607,7 @@ public abstract class AbstractSeleniumTest
 
     public void clickLinkWithText( String text, boolean wait )
     {
-        clickLinkWithLocator( "link=" + text, wait );
+        clickLinkWithLocator( "//*[text()='" + text +"']//ancestor::a", wait );
     }
 
     public void clickLinkWithXPath( String xpath )
@@ -582,7 +617,7 @@ public abstract class AbstractSeleniumTest
 
     public void clickLinkWithXPath( String xpath, boolean wait )
     {
-        clickLinkWithLocator( "xpath=" + xpath, wait );
+        clickLinkWithLocator( xpath, wait );
     }
 
     public void clickLinkWithLocator( String locator )
@@ -593,7 +628,7 @@ public abstract class AbstractSeleniumTest
     public void clickLinkWithLocator( String locator, boolean wait )
     {
         assertElementPresent( locator );
-        getSelenium().click( locator );
+        findElement(locator).click();
         if ( wait )
         {
             waitPage();
@@ -608,7 +643,7 @@ public abstract class AbstractSeleniumTest
     public void clickButtonWithLocator( String locator, boolean wait )
     {
         assertElementPresent( locator );
-        getSelenium().click( locator );
+        findElement(locator ).click();
         if ( wait )
         {
             waitPage();
@@ -623,50 +658,49 @@ public abstract class AbstractSeleniumTest
         {
             entry = entries.next();
 
-            getSelenium().type( entry.getKey(), entry.getValue() );
+            setFieldValue( entry.getKey(), entry.getValue() );
         }
     }
 
     public void setFieldValue( String fieldName, String value )
     {
-        getSelenium().type( fieldName, value );
+        findElement(fieldName ).sendKeys( value );
     }
 
     public void checkField( String locator )
     {
-        getSelenium().check( locator );
+        WebElement element = findElement(locator );
+        if (!element.isSelected()) {
+            element.click();
+        }
     }
 
     public void uncheckField( String locator )
     {
-        getSelenium().uncheck( locator );
+        WebElement element = findElement(locator );
+        if (element.isSelected()) {
+            element.click();
+        }
     }
 
     public boolean isChecked( String locator )
     {
-        return getSelenium().isChecked( locator );
+        return findElement(locator ).isSelected();
     }
 
     public void assertIsChecked( String locator )
     {
-        Assert.assertTrue( getSelenium().isChecked( locator ) );
+
+        Assert.assertTrue( isChecked( locator ));
     }
 
     public void assertIsNotChecked( String locator )
     {
-        Assert.assertFalse( getSelenium().isChecked( locator ) );
-    }
 
-    public void assertXpathCount( String locator, int expectedCount )
-    {
-        int count = getSelenium().getXpathCount( locator ).intValue();
-        Assert.assertEquals( count, expectedCount );
+        Assert.assertFalse( isChecked( locator ) );
     }
 
-    public void assertElementValue( String locator, String expectedValue )
-    {
-        Assert.assertEquals( getSelenium().getValue( locator ), expectedValue );
-    }
+
 
     public String captureScreenShotOnFailure( Throwable failure, String methodName, String className )
     {
@@ -687,31 +721,45 @@ public abstract class AbstractSeleniumTest
 
         targetPath.mkdirs();
         Selenium selenium = getSelenium();
-        String fileBaseName = methodName + "_" + className + ".java_" + lineNumber + "-" + time;
-
-        selenium.windowMaximize();
-        
-        try
-        {
-            // save html to have a minimum feedback if jenkins firefox not up
-            File fileNameHTML = new File( new File( "target", "errorshtmlsnap" ) , fileBaseName + ".html" );
-            FileUtils.writeStringToFile( fileNameHTML, selenium.getHtmlSource() );
-        }
-        catch ( IOException e )
+        if (selenium!=null)
         {
-            System.out.print( e.getMessage() );
-            e.printStackTrace();
-        }
-        
-        File fileName = new File( targetPath, fileBaseName + ".png" );
+            String fileBaseName = methodName + "_" + className + ".java_" + lineNumber + "-" + time;
+            File fileName = new File( targetPath, fileBaseName + ".png" );
+            selenium.windowMaximize();
 
-        try
-        {
-            selenium.captureEntirePageScreenshot( fileName.getAbsolutePath(), "background=#FFFFFF" );
-        } catch (UnsupportedOperationException ex) {
-            logger.warn("Could not create screenshot. Not supported by this webdriver. "+selenium.getClass().getName());
+            if (selenium instanceof WebDriverBackedSelenium)
+            {
+                WebdriverUtility.takeScreenShot( fileName.getName(), ( (WebDriverBackedSelenium) selenium ).getWrappedDriver(),
+                    (a)->selenium.captureEntirePageScreenshot( a, "background=#FFFFFF" )
+                    );
+            } else
+            {
+
+                try
+                {
+                    // save html to have a minimum feedback if jenkins firefox not up
+                    File fileNameHTML = new File( new File( "target", "errorshtmlsnap" ), fileBaseName + ".html" );
+                    FileUtils.writeStringToFile( fileNameHTML, selenium.getHtmlSource() );
+                }
+                catch ( IOException e )
+                {
+                    System.out.print( e.getMessage() );
+                    e.printStackTrace();
+                }
+
+
+                try
+                {
+                }
+                catch ( UnsupportedOperationException ex )
+                {
+                    logger.warn( "Could not create screenshot. Not supported by this webdriver. " + selenium.getClass().getName() );
+                }
+            }
+            return fileName.getAbsolutePath();
+        } else {
+            return "";
         }
-        return fileName.getAbsolutePath();
     }
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
index 08cb960..779ebd6 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/ArchivaSeleniumExecutionRule.java
@@ -24,6 +24,8 @@ import org.junit.rules.MethodRule;
 import org.junit.runner.Description;
 import org.junit.runners.model.FrameworkMethod;
 import org.junit.runners.model.Statement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * @author Olivier Lamy
@@ -31,6 +33,9 @@ import org.junit.runners.model.Statement;
 public class ArchivaSeleniumExecutionRule
     implements MethodRule //TestRule
 {
+
+    final Logger log = LoggerFactory.getLogger( ArchivaSeleniumExecutionRule.class );
+
     // FIXME cerate a separate TestRule for open and close calls ?
     public Selenium selenium;
 
@@ -43,6 +48,7 @@ public class ArchivaSeleniumExecutionRule
         }
         catch ( Throwable e )
         {
+            log.info("Exception thrown in Selenium test: "+e.getClass().getName()+" - "+e.getMessage());
             String fileName =
                 ( (AbstractSeleniumTest) target ).captureScreenShotOnFailure( e, method.getMethod().getName(),
                                                                               target.getClass().getName() );
@@ -52,6 +58,7 @@ public class ArchivaSeleniumExecutionRule
         finally
         {
             ( (AbstractSeleniumTest) target ).close();
+
         }
         return new Statement()
         {

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
index 0011dc6..177c1fc 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/java/org/apache/archiva/web/test/tools/WebdriverUtility.java
@@ -18,6 +18,7 @@ package org.apache.archiva.web.test.tools;
  * under the License.
  */
 
+import com.gargoylesoftware.htmlunit.WebClient;
 import org.apache.commons.io.FileUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.openqa.selenium.Capabilities;
@@ -122,8 +123,18 @@ public class WebdriverUtility
             {
                 DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();
                 capabilities.setJavascriptEnabled( true );
-                capabilities.setVersion( "firefox-51" );
-                return new HtmlUnitDriver( capabilities  );
+                capabilities.setVersion( "firefox-52" );
+                HtmlUnitDriver driver = new HtmlUnitDriver( capabilities  ) {
+                    @Override
+                    protected WebClient modifyWebClient( WebClient client )
+                    {
+                        client.getOptions().setThrowExceptionOnFailingStatusCode( false );
+                        client.getOptions().setThrowExceptionOnScriptError( false );
+                        client.getOptions().setCssEnabled( true );
+                        return client;
+                    }
+                };
+                return driver;
             }
 
         } catch (MalformedURLException e) {

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
index 61f9f01..d86502c 100644
--- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/resources/log4j2-test.xml
@@ -30,6 +30,10 @@
     <logger name="org.springframework" level="error"/>
     <logger name="com.gargoylesoftware.htmlunit.DefaultCssErrorHandler" level="error" />
     <logger name="com.gargoylesoftware.htmlunit.html.HtmlScript" level="error" />
+    <logger name="com.gargoylesoftware.htmlunit.javascript" level="error" />
+    <logger name="com.gargoylesoftware.htmlunit" level="error" />
+    <logger name="com.gargoylesoftware.htmlunit.javascript.StrictErrorReporter" level="off" />
+
 
     <root level="info">
       <appender-ref ref="console"/>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/pom.xml b/archiva-modules/archiva-web/archiva-webapp/pom.xml
index b88e7ba..0ebd605 100644
--- a/archiva-modules/archiva-web/archiva-webapp/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/pom.xml
@@ -963,6 +963,143 @@
       </plugin>
       -->
       <plugin>
+        <groupId>org.eclipse.jetty</groupId>
+        <artifactId>jetty-maven-plugin</artifactId>
+        <version>9.4.5.v20170502</version>
+        <configuration>
+          <scanIntervalSeconds>10</scanIntervalSeconds>
+          <webApp>
+            <contextPath>/archiva</contextPath>
+          </webApp>
+          <jettyXml>${basedir}/src/test/jetty/jetty-env.xml</jettyXml>
+
+          <systemProperties>
+            <systemProperty>
+              <name>plexus.home</name>
+              <value>${archivaAppServerBase}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>appserver.base</name>
+              <value>${archivaAppServerBase}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>appserver.home</name>
+              <value>${archivaAppServerBase}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>derby.system.home</name>
+              <value>${archivaAppServerBase}/logs</value>
+            </systemProperty>
+            <systemProperty>
+              <name>java.io.tmpdir</name>
+              <value>${project.build.directory}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>archiva.user.configFileName</name>
+              <value>${archivaAppServerBase}/conf/archiva.xml</value>
+            </systemProperty>
+            <systemProperty>
+              <name>archiva.devMode</name>
+              <value>${archiva.devMode}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>archiva.javascriptLog</name>
+              <value>${archiva.javascriptLog}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>archiva.logMissingI18n</name>
+              <value>${archiva.logMissingI18n}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>cassandra.host</name>
+              <value>${cassandra.host}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>cassandra.port</name>
+              <value>${cassandra.port}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>archiva.repositorySessionFactory.id</name>
+              <value>${archiva.repositorySessionFactory.id}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>org.apache.sirona.configuration.sirona.properties</name>
+              <value>${archiva.sirona.configuration}</value>
+            </systemProperty>
+            <systemProperty>
+              <name>AsyncLoggerConfig.WaitStrategy</name>
+              <value>Block</value>
+            </systemProperty>
+            <systemProperty>
+              <name>AsyncLogger.WaitStrategy</name>
+              <value>Block</value>
+            </systemProperty>
+            <systemProperty>
+              <name>openjpa.Log</name>
+              <value>${openjpa.Log}</value>
+            </systemProperty>
+          </systemProperties>
+
+        </configuration>
+          <dependencies>
+            <dependency>
+              <groupId>org.apache.derby</groupId>
+              <artifactId>derby</artifactId>
+              <version>${derbyVersion}</version>
+            </dependency>
+            <dependency>
+              <groupId>javax.mail</groupId>
+              <artifactId>mail</artifactId>
+              <version>${javaxMailVersion}</version>
+            </dependency>
+            <dependency>
+              <groupId>org.apache.openjpa</groupId>
+              <artifactId>openjpa</artifactId>
+              <version>${openjpaVersion}</version>
+            </dependency>
+            <dependency>
+              <groupId>org.apache.geronimo.specs</groupId>
+              <artifactId>geronimo-jpa_2.0_spec</artifactId>
+              <version>1.1</version>
+            </dependency>
+            <dependency>
+              <groupId>org.apache.geronimo.specs</groupId>
+              <artifactId>geronimo-jta_1.1_spec</artifactId>
+              <version>1.1.1</version>
+            </dependency>
+            <dependency>
+              <groupId>net.sourceforge.serp</groupId>
+              <artifactId>serp</artifactId>
+              <version>1.15.1</version>
+            </dependency>
+
+            <dependency>
+              <groupId>org.eclipse.jetty</groupId>
+              <artifactId>jetty-io</artifactId>
+              <version>9.4.5.v20170502</version>
+            </dependency>
+            <dependency>
+              <groupId>org.eclipse.jetty</groupId>
+              <artifactId>jetty-util</artifactId>
+              <version>9.4.5.v20170502</version>
+            </dependency>
+            <dependency>
+              <groupId>org.eclipse.jetty</groupId>
+              <artifactId>jetty-client</artifactId>
+              <version>9.4.5.v20170502</version>
+            </dependency>
+            <dependency>
+              <groupId>org.eclipse.jetty.websocket</groupId>
+              <artifactId>websocket-client</artifactId>
+              <version>9.4.5.v20170502</version>
+            </dependency>
+
+          </dependencies>
+
+      </plugin>
+
+
+      <plugin>
         <groupId>org.apache.tomcat.maven</groupId>
         <artifactId>tomcat7-maven-plugin</artifactId>
         <configuration>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
index df8c42e..30bb261 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
+++ b/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/templates/archiva/menu.html
@@ -88,7 +88,7 @@
               </a>
             </li>
             <li id="login-link" style="display: none">
-              <a onclick="loginBox();" id="login-link-a">
+              <a onclick="loginBox(); return false;" id="login-link-a">
                 <span class="btn btn-success label force-upper-case">${$.i18n.prop('login')}</span>
               </a>
             </li>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml b/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml
index 1668649..bed63bf 100644
--- a/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml
+++ b/archiva-modules/archiva-web/archiva-webapp/src/test/jetty/jetty-env.xml
@@ -1,4 +1,22 @@
 <?xml version="1.0"  encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
 <!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
 
 <Configure id="wac" class="org.eclipse.jetty.webapp.WebAppContext">

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-webdav/pom.xml b/archiva-modules/archiva-web/archiva-webdav/pom.xml
index 73a8654..a277f11 100644
--- a/archiva-modules/archiva-web/archiva-webdav/pom.xml
+++ b/archiva-modules/archiva-web/archiva-webdav/pom.xml
@@ -193,8 +193,14 @@
     <dependency>
       <groupId>net.sourceforge.htmlunit</groupId>
       <artifactId>htmlunit</artifactId>
-      <version>2.13</version>
+      <version>${htmlUnitVersion}</version>
       <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.eclipse.jetty</groupId>
+          <artifactId>jetty-websocket</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
 
     <dependency>

http://git-wip-us.apache.org/repos/asf/archiva/blob/7b8d3bb3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 8b1bad4..50aef79 100644
--- a/pom.xml
+++ b/pom.xml
@@ -99,6 +99,7 @@
     <plexus-utils.version>3.0.15</plexus-utils.version>
     <asfTomcatMavenPluginVersion>2.2</asfTomcatMavenPluginVersion>
     <tomcat7Version>7.0.54</tomcat7Version>
+    <htmlUnitVersion>2.27</htmlUnitVersion>
 
     <release.preparationGoals>clean install</release.preparationGoals>
     <springockito.version>1.0.9</springockito.version>


[27/50] archiva git commit: [MRM-1942] Merge branch 'jpa' into master

Posted by ma...@apache.org.
[MRM-1942] Merge branch 'jpa' into master

Removing JDO and add JPA backend.


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/acc02bf9
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/acc02bf9
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/acc02bf9

Branch: refs/heads/citest
Commit: acc02bf9620de9e82ae36fbb3867e84a1bd1ccf1
Parents: 0533158 dd31184
Author: Martin Stockhammer <ma...@apache.org>
Authored: Thu May 18 21:47:01 2017 +0200
Committer: Martin Stockhammer <ma...@apache.org>
Committed: Sat May 20 23:15:10 2017 +0200

----------------------------------------------------------------------
 ...pring-context-cleanup-released-snapshots.xml | 37 +++++++++++-
 .../spring-context-purge-consumer-test.xml      | 37 +++++++++++-
 .../src/test/resources/spring-context.xml       | 37 +++++++++++-
 .../archiva-base/archiva-indexer/pom.xml        |  5 ++
 .../src/test/resources/spring-context.xml       | 37 +++++++++++-
 .../archiva-base/archiva-proxy/pom.xml          |  6 ++
 .../src/test/resources/spring-context.xml       | 36 +++++++++++-
 .../archiva-repository-admin-default/pom.xml    |  6 ++
 .../src/test/resources/spring-context.xml       | 37 +++++++++++-
 .../archiva-scheduler-indexing/pom.xml          |  6 ++
 .../src/test/resources/spring-context.xml       | 37 +++++++++++-
 .../archiva-rest/archiva-rest-services/pom.xml  | 12 ++++
 ...faultRedbackRuntimeConfigurationService.java |  5 +-
 .../RedbackRuntimeConfigurationServiceTest.java |  8 +--
 .../resources/META-INF/spring-context-test.xml  | 39 ++++++++++++-
 .../src/test/resources/spring-context.xml       | 36 +++++++++++-
 .../archiva-web/archiva-web-common/pom.xml      | 12 ++++
 .../ArchivaConfigurableUsersManager.java        |  4 +-
 .../web/security/ArchivaRbacManager.java        | 14 +++++
 .../ArchivaUserManagerAuthenticator.java        |  1 +
 .../main/resources/META-INF/spring-context.xml  |  2 +-
 .../org/apache/archiva/i18n/default.properties  |  2 +-
 .../archiva/web/rss/SecuritySystemStub.java     |  4 +-
 .../spring-context-artifacts-download.xml       |  1 -
 .../resources/spring-context-test-common.xml    | 38 ++++++++++++-
 .../test/resources/spring-context-with-jcr.xml  | 37 +++++++++++-
 .../archiva-web/archiva-webapp/pom.xml          | 35 ++++++++++++
 .../main/resources/META-INF/spring-context.xml  | 20 ++++++-
 .../main/webapp/WEB-INF/applicationContext.xml  | 59 +++++++++-----------
 .../archiva/admin/features/generaladmin/main.js | 12 +++-
 .../src/main/webapp/js/archiva/main.js          |  5 +-
 .../src/test/tomcat/log4j2-test.xml             |  9 ++-
 .../src/test/tomcat/tomcat-context-archiva.xml  |  7 ++-
 .../archiva-web/archiva-webdav/pom.xml          |  5 ++
 .../spring-context-servlet-security-test.xml    | 38 ++++++++++++-
 .../src/test/resources/spring-context.xml       | 38 ++++++++++++-
 pom.xml                                         | 13 +++++
 37 files changed, 653 insertions(+), 84 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-base/archiva-indexer/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-base/archiva-proxy/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-base/archiva-repository-admin/archiva-repository-admin-default/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-scheduler/archiva-scheduler-indexing/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/META-INF/spring-context-test.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
----------------------------------------------------------------------
diff --cc archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
index 122db4f,5b8e0c7..eb4dc03
--- a/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
+++ b/archiva-modules/archiva-web/archiva-web-common/src/main/resources/org/apache/archiva/i18n/default.properties
@@@ -677,17 -671,9 +677,17 @@@ redback.runtime.ldap.checkServer=Verif
  redback.runtime.useUsersCache.label=Use a cache for users.
  redback.runtime.users.cache.title=Users Cache
  
 +ldap.config.dn.help.content=The name of the attribute containing the DN
 +ldap.config.user.attribute.help.content=The name of the RDN attribute in the DN of the user object containing the User-ID (e.g. for cn=usr1,ou=users,ou=tst,ou=org, the value would be cn)
 +redback.default.role.guest.id.help.content=The User-ID of the guest user
 +rest.baseUrl.help.content=URL that is used as base url for validating REST requests. If empty, the URL ist determined automatically.
 +rest.csrffilter.absentorigin.deny.help.content=If true and no Origin/Referer header can be found on REST requests, the requests will be denied. Default: true.
 +rest.csrffilter.disableTokenValidation.help.content=If true, token based origin validation of REST requests will be omitted. Default: false. 
 +rest.csrffilter.enabled.help.content=If true, validation of REST requests will be validated based on header values, otherwise no validation is done at all. Default: true.
 +
  archiva.redback.rbacmanager.ldap=LDAP RBac Manager
  archiva.redback.rbacmanager.jdo=Database RBac Manager
- archiva.redback.rbackmanager.jpa=Database JPA RBac Manager
+ archiva.redback.rbacmanager.jpa=Database JPA RBac Manager
  archiva.redback.rbacmanager.cached=Cached RBac Manager
  redback.runtime.rbac-managers.impls.chose=RbacManager(s) chosen
  redback.runtime.rbac-managers.impls.available=Available RbacManagers

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/SecuritySystemStub.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-webapp/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-webapp/src/main/webapp/js/archiva/main.js
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/archiva-modules/archiva-web/archiva-webdav/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/archiva/blob/acc02bf9/pom.xml
----------------------------------------------------------------------
diff --cc pom.xml
index 92197f8,733184c..9057c53
--- a/pom.xml
+++ b/pom.xml
@@@ -86,8 -89,9 +86,9 @@@
      <httpclient.version>4.5.2</httpclient.version>
      <httpclient.core.version>4.4.4</httpclient.core.version>
      <javaxMailVersion>1.4</javaxMailVersion>
 -    <jettyVersion>8.1.14.v20131031</jettyVersion>
 +    <jettyVersion>9.4.5.v20170502</jettyVersion>
      <guava.version>16.0.1</guava.version>
+     <openjpaVersion>2.4.1</openjpaVersion>
  
      <!-- restore when we will be able to use a derby in memory database -->
      <redbackTestJdbcUrl>jdbc:derby:memory:users-test;create=true</redbackTestJdbcUrl>


[15/50] archiva git commit: upgrade to jetty 9.4 for archiva-rest-services module

Posted by ma...@apache.org.
upgrade to jetty  9.4 for archiva-rest-services module

Signed-off-by: olivier lamy <ol...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/52147ba0
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/52147ba0
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/52147ba0

Branch: refs/heads/citest
Commit: 52147ba0576c76c8950c3fa44e86d15b97af15a2
Parents: 1acc6e7
Author: olivier lamy <ol...@apache.org>
Authored: Thu May 11 21:38:51 2017 +1000
Committer: olivier lamy <ol...@apache.org>
Committed: Thu May 11 21:38:51 2017 +1000

----------------------------------------------------------------------
 .../archiva-rest/archiva-rest-services/pom.xml  | 23 ++++------
 .../rest/services/DefaultPluginsServices.java   | 44 +++++++++++---------
 .../src/test/resources/log4j2-test.xml          | 11 ++---
 .../archiva-web/archiva-security/pom.xml        |  2 +-
 .../archiva-web/archiva-web-common/pom.xml      |  7 +---
 pom.xml                                         |  7 +---
 6 files changed, 38 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/52147ba0/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
index cc44422..f77fbc1 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/pom.xml
@@ -37,6 +37,7 @@
     -->
     <redbackTestJdbcUrl>jdbc:hsqldb:mem:redback-test</redbackTestJdbcUrl>
     <redbackTestJdbcDriver>org.hsqldb.jdbcDriver</redbackTestJdbcDriver>
+    <jetty.version>9.4.5.v20170502</jetty.version>
   </properties>
 
   <dependencies>
@@ -384,24 +385,14 @@
     </dependency>
 
     <dependency>
-      <groupId>org.apache.tomcat.embed</groupId>
-      <artifactId>tomcat-embed-core</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>tomcat-juli</artifactId>
-      <scope>test</scope>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-server</artifactId>
+      <version>${jetty.version}</version>
     </dependency>
     <dependency>
-      <groupId>org.apache.tomcat.embed</groupId>
-      <artifactId>tomcat-embed-logging-juli</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tomcat</groupId>
-      <artifactId>tomcat-jsp-api</artifactId>
-      <scope>test</scope>
+      <groupId>org.eclipse.jetty</groupId>
+      <artifactId>jetty-servlet</artifactId>
+      <version>${jetty.version}</version>
     </dependency>
     <dependency>
       <groupId>xerces</groupId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/52147ba0/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java
index 4cab81d..208400c 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultPluginsServices.java
@@ -18,26 +18,25 @@ package org.apache.archiva.rest.services;
  * under the License.
  */
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.archiva.rest.api.services.ArchivaRestServiceException;
-import org.springframework.stereotype.Service;
-
-import javax.inject.Inject;
-
 import org.apache.archiva.rest.api.services.PluginsService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.context.ApplicationContext;
 import org.springframework.core.io.Resource;
+import org.springframework.stereotype.Service;
+
+import javax.inject.Inject;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
 
 /**
  * @author Eric Barboni
  * @since 1.4.0
  */
-@Service("pluginsService#rest")
+@Service( "pluginsService#rest" )
 public class DefaultPluginsServices
     implements PluginsService
 {
@@ -46,7 +45,7 @@ public class DefaultPluginsServices
 
     private List<String> adminFeatures = new ArrayList<>();
 
-    private ApplicationContext appCont;
+    private ApplicationContext applicationContext;
 
     private Logger log = LoggerFactory.getLogger( getClass() );
 
@@ -56,11 +55,14 @@ public class DefaultPluginsServices
     public DefaultPluginsServices( ApplicationContext applicationContext )
         throws IOException
     {
-        this.appCont = applicationContext;
+        log.debug( "init DefaultPluginsServices" );
+        this.applicationContext = applicationContext;
 
         // rebuild
-        feed( repositoryType, "repository" );
-        feed( adminFeatures, "features" );
+        repositoryType = feed( "repository" );
+        log.debug( "feed {}:{}", "repository" , repositoryType);
+        adminFeatures = feed( "features" );
+        log.debug( "feed {}:{}", "features", adminFeatures );
         StringBuilder sb = new StringBuilder();
         for ( String repoType : repositoryType )
         {
@@ -81,27 +83,29 @@ public class DefaultPluginsServices
         }
     }
 
-    private void feed( List<String> repository, String key )
+    private List<String> feed( String key )
         throws IOException
     {
         log.info( "Feeding: {}", key );
-        repository.clear();
-        Resource[] xmlResources;
-
-        xmlResources = appCont.getResources( "/**/" + key + "/**/main.js" );
+        Resource[] xmlResources = applicationContext.getResources( "/**/" + key + "/**/main.js" );
+        if (xmlResources == null)
+        {
+            return Collections.emptyList();
+        }
+        List<String> repository = new ArrayList<>( xmlResources.length );
         for ( Resource rc : xmlResources )
         {
             String tmp = rc.getURL().toString();
             tmp = tmp.substring( tmp.lastIndexOf( key ) + key.length() + 1, tmp.length() - 8 );
             repository.add( "archiva/admin/" + key + "/" + tmp + "/main" );
         }
-
+        return repository;
     }
 
     @Override
     public String getAdminPlugins()
         throws ArchivaRestServiceException
     {
-        return  adminPlugins;
+        return adminPlugins;
     }
 }

http://git-wip-us.apache.org/repos/asf/archiva/blob/52147ba0/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
index a7e0139..4d7c9ab 100644
--- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
+++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/test/resources/log4j2-test.xml
@@ -19,7 +19,7 @@
   -->
 
 
-<configuration status="debug">
+<configuration> <!-- status="debug" -->
   <appenders>
     <Console name="console" target="SYSTEM_OUT">
       <PatternLayout pattern="%highlight{%d{HH:mm:ss.SSS} [%L] [%t] %-5level %logger{3} - %msg%n}" />
@@ -27,13 +27,10 @@
   </appenders>
   <loggers>
 
-    <logger name="org.codehaus.redback.rest.services" level="error"/>
-
+    <logger name="org.apache.archiva.redback.rest.services" level="error"/>
     <logger name="JPOX" level="error"/>
-
-
-    <logger name="org.springframework" level="error"/>
-
+    <logger name="org.apache.archiva.rest.services" level="info"/>
+    <logger name="org.springframework" level="info"/>
     <logger name="org.apache.commons.configuration" level="error"/>
 
     <root level="info">

http://git-wip-us.apache.org/repos/asf/archiva/blob/52147ba0/archiva-modules/archiva-web/archiva-security/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-security/pom.xml b/archiva-modules/archiva-web/archiva-security/pom.xml
index 66aa53b..1213162 100644
--- a/archiva-modules/archiva-web/archiva-security/pom.xml
+++ b/archiva-modules/archiva-web/archiva-security/pom.xml
@@ -47,7 +47,7 @@
     </dependency>
     <dependency>
       <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
+      <artifactId>javax.servlet-api</artifactId>
       <scope>provided</scope>
     </dependency>
     <dependency>

http://git-wip-us.apache.org/repos/asf/archiva/blob/52147ba0/archiva-modules/archiva-web/archiva-web-common/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-web/archiva-web-common/pom.xml b/archiva-modules/archiva-web/archiva-web-common/pom.xml
index 6d9c94c..e3b113a 100644
--- a/archiva-modules/archiva-web/archiva-web-common/pom.xml
+++ b/archiva-modules/archiva-web/archiva-web-common/pom.xml
@@ -186,11 +186,6 @@
       <artifactId>audit</artifactId>
     </dependency>
     <dependency>
-      <groupId>javax.servlet</groupId>
-      <artifactId>javax.servlet-api</artifactId>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
       <groupId>javax.ws.rs</groupId>
       <artifactId>javax.ws.rs-api</artifactId>
     </dependency>
@@ -234,7 +229,7 @@
     </dependency>
     <dependency>
       <groupId>javax.servlet</groupId>
-      <artifactId>servlet-api</artifactId>
+      <artifactId>javax.servlet-api</artifactId>
     </dependency>
     <dependency>
       <groupId>org.springframework</groupId>

http://git-wip-us.apache.org/repos/asf/archiva/blob/52147ba0/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 554c35e..53b389a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1202,13 +1202,8 @@
       </dependency>
       <dependency>
         <groupId>javax.servlet</groupId>
-        <artifactId>servlet-api</artifactId>
-        <version>2.5</version>
-      </dependency>
-      <dependency>
-        <groupId>javax.servlet</groupId>
         <artifactId>javax.servlet-api</artifactId>
-        <version>3.0.1</version>
+        <version>3.1.0</version>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>