Allon Mureinik has uploaded a new change for review.

Change subject: engine: Streamline testing references in pom.xmls
......................................................................

engine: Streamline testing references in pom.xmls

After a major cleanup to PowerMock and EasyMock usages, it is now
possible to streamline the references to the various testing libraries
oVirt Engine uses in the pom files:

1. Removed redundant declarations of JUnit's dependency - there should
   be only one, in the root pom.xml. In order to achieve this, the
   dependency was moved from the <dependencies> element to the
   <dependencyManagement> element.

2. Streamlined JUnit's versioning to use JUnit 4.8.1, instead of some
   subprojects using 4.7 and some 4.8.1.

3. Removed redundant declarations of Mockito's dependency - there should
   be only one, in the root pom.xml.

4. Moved EasyMock dependency from the root pom.xml to the restapi
   pom.xml since this is the only place EasyMock is allowed in the
   project.

5. Moved PowerMock dependency and repository definition from the root
   pom.xml to the restapi pom.xml since this is the only place
   PowerMock is allowed in the project.

6. Removed any references to PowerMockito, as it is no longer used
   anywhere in the project.

Change-Id: Ieaae801516e68f7e7abfb43f732d1558200e1f25
Signed-off-by: Allon Mureinik <[email protected]>
---
M backend/manager/modules/dal/pom.xml
M backend/manager/modules/restapi/interface/common/jaxrs/pom.xml
M backend/manager/modules/restapi/pom.xml
M frontend/webadmin/modules/pom.xml
M frontend/webadmin/modules/userportal-gwtp/pom.xml
M frontend/webadmin/modules/webadmin/pom.xml
M pom.xml
7 files changed, 20 insertions(+), 62 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/46/7546/1

diff --git a/backend/manager/modules/dal/pom.xml 
b/backend/manager/modules/dal/pom.xml
index d286d9f..2544bb8 100644
--- a/backend/manager/modules/dal/pom.xml
+++ b/backend/manager/modules/dal/pom.xml
@@ -83,11 +83,6 @@
       <artifactId>javassist</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
   <build>
     <filters>
diff --git a/backend/manager/modules/restapi/interface/common/jaxrs/pom.xml 
b/backend/manager/modules/restapi/interface/common/jaxrs/pom.xml
index 71cb167..e84b0e6 100644
--- a/backend/manager/modules/restapi/interface/common/jaxrs/pom.xml
+++ b/backend/manager/modules/restapi/interface/common/jaxrs/pom.xml
@@ -28,13 +28,6 @@
     </dependency>
 
     <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
       <groupId>org.easymock</groupId>
       <artifactId>easymockclassextension</artifactId>
       <version>${easymock.version}</version>
diff --git a/backend/manager/modules/restapi/pom.xml 
b/backend/manager/modules/restapi/pom.xml
index e8b98e6..bf96e56 100644
--- a/backend/manager/modules/restapi/pom.xml
+++ b/backend/manager/modules/restapi/pom.xml
@@ -23,7 +23,18 @@
     <engine.api.version>3.1.0</engine.api.version>
     <resteasy.version>2.3.2.Final</resteasy.version>
     <maven-jaxb22-plugin.version>0.8.1</maven-jaxb22-plugin.version>
+    <easymock.version>3.0</easymock.version>
+    <powermock.version>1.4.10</powermock.version>
   </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.powermock</groupId>
+      <artifactId>powermock-module-junit4</artifactId>
+      <version>${powermock.version}</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
 
   <repositories>
     <repository>
@@ -48,6 +59,11 @@
       <name>JBoss Thirdparty Releases</name>
       
<url>https://repository.jboss.org/nexus/content/repositories/thirdparty-releases</url>
     </repository>
+
+    <repository>
+      <id>powermock-repo</id>
+      <url>http://powermock.googlecode.com/svn/repo/</url>
+    </repository>
   </repositories>
 
 </project>
diff --git a/frontend/webadmin/modules/pom.xml 
b/frontend/webadmin/modules/pom.xml
index 8fdd77c..0741227 100644
--- a/frontend/webadmin/modules/pom.xml
+++ b/frontend/webadmin/modules/pom.xml
@@ -27,7 +27,6 @@
     
<generatedSourcesDirectory>generated-sources/annotations</generatedSourcesDirectory>
     <!-- Directory where GWT compiler generates normally-transient types for 
review (-gen compiler option) -->
     <gwtGenDirectory>gen</gwtGenDirectory>
-    <junit.version>4.8.1</junit.version>
     <gwtp.version>0.6</gwtp.version>
     <guice.version>3.0</guice.version>
     <gin.version>1.5.0</gin.version>
diff --git a/frontend/webadmin/modules/userportal-gwtp/pom.xml 
b/frontend/webadmin/modules/userportal-gwtp/pom.xml
index 85ac075..1ac990c 100644
--- a/frontend/webadmin/modules/userportal-gwtp/pom.xml
+++ b/frontend/webadmin/modules/userportal-gwtp/pom.xml
@@ -77,19 +77,6 @@
       <version>${gin.version}</version>
       <scope>provided</scope>
     </dependency>
-    <!-- Unit testing -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <version>${mockito.version}</version>
-      <scope>test</scope>
-    </dependency>
     <!-- oVirt dependencies -->
     <dependency>
       <groupId>${engine.groupId}</groupId>
diff --git a/frontend/webadmin/modules/webadmin/pom.xml 
b/frontend/webadmin/modules/webadmin/pom.xml
index 489a8de..6df014e 100644
--- a/frontend/webadmin/modules/webadmin/pom.xml
+++ b/frontend/webadmin/modules/webadmin/pom.xml
@@ -77,19 +77,6 @@
       <version>${gin.version}</version>
       <scope>provided</scope>
     </dependency>
-    <!-- Unit testing -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>${junit.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-core</artifactId>
-      <version>${mockito.version}</version>
-      <scope>test</scope>
-    </dependency>
     <!-- oVirt dependencies -->
     <dependency>
       <groupId>${engine.groupId}</groupId>
diff --git a/pom.xml b/pom.xml
index 0f90233..ac454a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -22,7 +22,7 @@
     <jbossServer>${jbossHome}/standalone</jbossServer>
     <!-- dependency versions -->
     <commons-logging.version>1.1</commons-logging.version>
-    <junit.version>4.7</junit.version>
+    <junit.version>4.8.1</junit.version>
     <commons-codec.version>1.4</commons-codec.version>
     <commons-lang.version>2.4</commons-lang.version>
     <commons-compress.version>1.3</commons-compress.version>
@@ -52,9 +52,6 @@
     <gwt.plugin.version>1.3.2.google</gwt.plugin.version>
     <findbugs.version>2.5.1</findbugs.version>
     <test-jar.plugin.version>2.2</test-jar.plugin.version>
-    <easymock.version>3.0</easymock.version>
-    <powermock.version>1.4.10</powermock.version>
-    <powermock-api-mockito.version>1.4.10</powermock-api-mockito.version>
     <mockito.version>1.8.5</mockito.version>
     <javassist.version>3.12.0.GA</javassist.version>
     <javax.mail.version>1.4.4</javax.mail.version>
@@ -238,25 +235,13 @@
         <artifactId>log4j</artifactId>
         <version>${log4j.version}</version>
       </dependency>
-      <dependency>
-        <groupId>junit</groupId>
-        <artifactId>junit</artifactId>
-        <version>${junit.version}</version>
-        <scope>test</scope>
-      </dependency>
     </dependencies>
   </dependencyManagement>
   <dependencies>
     <dependency>
-      <groupId>org.powermock</groupId>
-      <artifactId>powermock-module-junit4</artifactId>
-      <version>${powermock.version}</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.powermock</groupId>
-      <artifactId>powermock-api-mockito</artifactId>
-      <version>${powermock-api-mockito.version}</version>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>${junit.version}</version>
       <scope>test</scope>
     </dependency>
     <dependency>
@@ -311,10 +296,6 @@
       <snapshots>
         <enabled>false</enabled>
       </snapshots>
-    </repository>
-    <repository>
-      <id>powermock-repo</id>
-      <url>http://powermock.googlecode.com/svn/repo/</url>
     </repository>
     <repository>
       <id>atlassian.public.repo</id>


--
To view, visit http://gerrit.ovirt.org/7546
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieaae801516e68f7e7abfb43f732d1558200e1f25
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to