Juan Hernandez has uploaded a new change for review.

Change subject: packaging: Multiple module repositories
......................................................................

packaging: Multiple module repositories

Currently the engine has a single JBoss modules repository used both by
the engine and by the tools. This has the inconvenient that it isn't
possible to use modules with the same name but different content for the
engine and the tools, and that is required due to changes in the logging
module of the application server staring with version 7.2 (EAP 6.1).

This patch adds three different repositories: shared, engine and tools.
The shared repository is intended for modules used by both the engine
and the tools. The engine and tools repositories are intended for
modules uses only by the engine and the tools respectively.

This patch also changes the JAVA_MODULES environment variable and the
-mp option of the engine and the tools accordingly. So the module search
path for the engine will be the following:

  1. $ENGINE_USR/modules/engine
  2. $ENGINE_USR/modules/shared
  3. $JOBSS_MODULES/modules

And for the tools it will be the following:

  1. $ENGINE_USR/modules/tools
  2. $ENGINE_USR/modules/shared
  3. $JOBSS_MODULES/modules

This patch also changes the POMs of different components to explicitly
specify the repository where the modules should be deployed.

Change-Id: I89e88939486e0735e8ba6e1c1c9662085d2ad60f
Signed-off-by: Juan Hernandez <[email protected]>
---
M Makefile
A backend/manager/dependencies/engine/pom.xml
M backend/manager/dependencies/pom.xml
A backend/manager/dependencies/shared/pom.xml
R 
backend/manager/dependencies/shared/src/main/modules/com/woorea/openstack/sdk/main/module.xml
R 
backend/manager/dependencies/shared/src/main/modules/org/apache/commons/configuration/main/module.xml
R 
backend/manager/dependencies/shared/src/main/modules/org/apache/commons/jxpath/main/module.xml
R 
backend/manager/dependencies/shared/src/main/modules/org/ovirt/engine/core/dependencies/main/module.xml
R 
backend/manager/dependencies/shared/src/main/modules/org/postgresql/main/module.xml
A backend/manager/dependencies/tools/pom.xml
M backend/manager/modules/common/pom.xml
M backend/manager/modules/compat/pom.xml
M backend/manager/modules/dal/pom.xml
M backend/manager/modules/searchbackend/pom.xml
M backend/manager/modules/utils/pom.xml
M backend/manager/tools/pom.xml
M ovirt-engine.spec.in
M packaging/bin/engine-prolog.sh.in
M packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py
M packaging/services/ovirt-engine/ovirt-engine.py
20 files changed, 595 insertions(+), 425 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/23/18223/1

diff --git a/Makefile b/Makefile
index b4a44eb..ed990a5 100644
--- a/Makefile
+++ b/Makefile
@@ -307,7 +307,10 @@
        # we should use search MAVEN_OUTPUT_DIR as it may contain
        # pre-compiled artifacts at different hierarchy.
        install -dm 0755 "$(DESTDIR)$(PKG_JBOSS_MODULES)"
-       find "$(MAVEN_OUTPUT_DIR)" -name '*-modules.zip' | grep -v tmp.repos | 
xargs -n 1 unzip -q -o -d "$(DESTDIR)$(PKG_JBOSS_MODULES)"
+       for repository in shared engine tools; do \
+               install -dm 0755 
"$(DESTDIR)$(PKG_JBOSS_MODULES)/$${repository}"; \
+               find "$(MAVEN_OUTPUT_DIR)" -name "*-$${repository}-modules.zip" 
| grep -v tmp.repos | xargs -n 1 unzip -q -o -d 
"$(DESTDIR)$(PKG_JBOSS_MODULES)/$${repository}"; \
+       done
        install -dm 0755 "$(DESTDIR)$(PKG_EAR_DIR)"
        find "$(MAVEN_OUTPUT_DIR)" -name '*.ear' -type f | grep -v tmp.repos | 
xargs -n 1 unzip -q -o -d "$(DESTDIR)$(PKG_EAR_DIR)"
 
diff --git a/backend/manager/dependencies/engine/pom.xml 
b/backend/manager/dependencies/engine/pom.xml
new file mode 100644
index 0000000..47b695b
--- /dev/null
+++ b/backend/manager/dependencies/engine/pom.xml
@@ -0,0 +1,51 @@
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.ovirt.engine.core</groupId>
+    <artifactId>dependencies</artifactId>
+    <version>3.4.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>engine-dependencies</artifactId>
+  <packaging>jar</packaging>
+
+  <name>oVirt Engine dependencies</name>
+
+  <!-- We need to put here all the dependencies corresponding to the
+       .jar files that will be added to the modules archive: -->
+
+  <dependencies>
+
+    <!-- This is currently empty, everything is in the shared modules
+         repository. -->
+
+  </dependencies>
+
+  <build>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.ovirt.engine</groupId>
+        <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>engine</moduleRepository>
+          <modules>
+
+            <!-- No modules required here at the moment, everything
+                 is in the shared modules repository. -->
+
+          </modules>
+        </configuration>
+      </plugin>
+
+    </plugins>
+
+  </build>
+
+</project>
diff --git a/backend/manager/dependencies/pom.xml 
b/backend/manager/dependencies/pom.xml
index 92cfc8f..6521e05 100644
--- a/backend/manager/dependencies/pom.xml
+++ b/backend/manager/dependencies/pom.xml
@@ -12,417 +12,14 @@
   </parent>
 
   <artifactId>dependencies</artifactId>
-  <packaging>jar</packaging>
+  <packaging>pom</packaging>
 
-  <name>oVirt Engine dependencies</name>
+  <name>oVirt dependencies</name>
 
-  <!-- We need to put here all the dependencies corresponding to the
-       .jar files that will be added to the modules archive: -->
-
-  <dependencies>
-
-    <dependency>
-      <groupId>commons-configuration</groupId>
-      <artifactId>commons-configuration</artifactId>
-      <version>${commons-configuration.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-      <version>${httpclient.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-jxpath</groupId>
-      <artifactId>commons-jxpath</artifactId>
-      <version>${commons-jxpath.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.commons</groupId>
-      <artifactId>commons-compress</artifactId>
-      <version>${commons-compress.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.mina</groupId>
-      <artifactId>mina-core</artifactId>
-      <version>${mina-core.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.sshd</groupId>
-      <artifactId>sshd-core</artifactId>
-      <version>${sshd-core.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.ws.commons.util</groupId>
-      <artifactId>ws-commons-util</artifactId>
-      <version>1.0.2</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.xmlrpc</groupId>
-      <artifactId>xmlrpc-client</artifactId>
-      <version>${xmlrpc-client.version}</version>
-    </dependency>
-
-   <dependency>
-      <groupId>org.apache.xmlrpc</groupId>
-      <artifactId>xmlrpc-common</artifactId>
-      <version>${xmlrpc-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.ovirt.otopi</groupId>
-      <artifactId>otopi</artifactId>
-      <version>${otopi.version}</version>
-   </dependency>
-
-    <dependency>
-      <groupId>org.ovirt.ovirt-host-deploy</groupId>
-      <artifactId>ovirt-host-deploy</artifactId>
-      <version>${ovirt-host-deploy.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.quartz-scheduler</groupId>
-      <artifactId>quartz</artifactId>
-      <version>${quartz.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-api</artifactId>
-      <version>${slf4j-jdk14.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework.ldap</groupId>
-      <artifactId>spring-ldap-core</artifactId>
-      <version>${spring.ldap.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aop</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-asm</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-expression</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-instrument</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-jdbc</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-tx</artifactId>
-      <version>${spring.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>postgresql</groupId>
-      <artifactId>postgresql</artifactId>
-      <version>${postgres.jdbc.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>openstack-client</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>keystone-client</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>keystone-model</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>glance-client</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>glance-model</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>quantum-client</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>quantum-model</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>com.woorea</groupId>
-      <artifactId>resteasy-connector</artifactId>
-      <version>${openstack-client.version}</version>
-    </dependency>
-
-  </dependencies>
-
-  <build>
-
-    <plugins>
-
-        <plugin>
-          <groupId>org.ovirt.engine</groupId>
-          <artifactId>jboss-modules-maven-plugin</artifactId>
-          <configuration>
-            <modules>
-
-              <module>
-                <groupId>commons-configuration</groupId>
-                <artifactId>commons-configuration</artifactId>
-                <moduleName>org.apache.commons.configuration</moduleName>
-              </module>
-
-              <module>
-                <groupId>commons-httpclient</groupId>
-                <artifactId>commons-httpclient</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>commons-jxpath</groupId>
-                <artifactId>commons-jxpath</artifactId>
-                <moduleName>org.apache.commons.jxpath</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.apache.commons</groupId>
-                <artifactId>commons-compress</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.apache.mina</groupId>
-                <artifactId>mina-core</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.apache.sshd</groupId>
-                <artifactId>sshd-core</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.apache.ws.commons.util</groupId>
-                <artifactId>ws-commons-util</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.apache.xmlrpc</groupId>
-                <artifactId>xmlrpc-client</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.apache.xmlrpc</groupId>
-                <artifactId>xmlrpc-common</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.ovirt.otopi</groupId>
-                <artifactId>otopi</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.ovirt.ovirt-host-deploy</groupId>
-                <artifactId>ovirt-host-deploy</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.quartz-scheduler</groupId>
-                <artifactId>quartz</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.slf4j</groupId>
-                <artifactId>slf4j-api</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework.ldap</groupId>
-                <artifactId>spring-ldap-core</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-aop</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-asm</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-beans</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-context</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-core</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-expression</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-instrument</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-jdbc</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>org.springframework</groupId>
-                <artifactId>spring-tx</artifactId>
-                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
-              </module>
-
-              <module>
-                <groupId>postgresql</groupId>
-                <artifactId>postgresql</artifactId>
-                <moduleName>org.postgresql</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>openstack-client</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>keystone-client</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>keystone-model</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>glance-client</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>glance-model</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>quantum-client</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>quantum-model</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-              <module>
-                <groupId>com.woorea</groupId>
-                <artifactId>resteasy-connector</artifactId>
-                <moduleName>com.woorea.openstack.sdk</moduleName>
-              </module>
-
-            </modules>
-          </configuration>
-        </plugin>
-
-    </plugins>
-
-  </build>
+  <modules>
+    <module>shared</module>
+    <module>engine</module>
+    <module>tools</module>
+  </modules>
 
 </project>
diff --git a/backend/manager/dependencies/shared/pom.xml 
b/backend/manager/dependencies/shared/pom.xml
new file mode 100644
index 0000000..18170da
--- /dev/null
+++ b/backend/manager/dependencies/shared/pom.xml
@@ -0,0 +1,431 @@
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.ovirt.engine.core</groupId>
+    <artifactId>dependencies</artifactId>
+    <version>3.4.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>shared-dependencies</artifactId>
+  <packaging>jar</packaging>
+
+  <name>oVirt Shared dependencies</name>
+
+  <!-- We need to put here all the dependencies corresponding to the
+       .jar files that will be added to the modules archive: -->
+
+  <dependencies>
+
+    <dependency>
+      <groupId>commons-configuration</groupId>
+      <artifactId>commons-configuration</artifactId>
+      <version>${commons-configuration.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-httpclient</groupId>
+      <artifactId>commons-httpclient</artifactId>
+      <version>${httpclient.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>commons-jxpath</groupId>
+      <artifactId>commons-jxpath</artifactId>
+      <version>${commons-jxpath.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-compress</artifactId>
+      <version>${commons-compress.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.mina</groupId>
+      <artifactId>mina-core</artifactId>
+      <version>${mina-core.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.sshd</groupId>
+      <artifactId>sshd-core</artifactId>
+      <version>${sshd-core.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.ws.commons.util</groupId>
+      <artifactId>ws-commons-util</artifactId>
+      <version>1.0.2</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.apache.xmlrpc</groupId>
+      <artifactId>xmlrpc-client</artifactId>
+      <version>${xmlrpc-client.version}</version>
+    </dependency>
+
+   <dependency>
+      <groupId>org.apache.xmlrpc</groupId>
+      <artifactId>xmlrpc-common</artifactId>
+      <version>${xmlrpc-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.ovirt.otopi</groupId>
+      <artifactId>otopi</artifactId>
+      <version>${otopi.version}</version>
+   </dependency>
+
+    <dependency>
+      <groupId>org.ovirt.ovirt-host-deploy</groupId>
+      <artifactId>ovirt-host-deploy</artifactId>
+      <version>${ovirt-host-deploy.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.quartz-scheduler</groupId>
+      <artifactId>quartz</artifactId>
+      <version>${quartz.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-api</artifactId>
+      <version>${slf4j-jdk14.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework.ldap</groupId>
+      <artifactId>spring-ldap-core</artifactId>
+      <version>${spring.ldap.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-aop</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-asm</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-beans</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-core</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-expression</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-instrument</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-jdbc</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-tx</artifactId>
+      <version>${spring.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>postgresql</groupId>
+      <artifactId>postgresql</artifactId>
+      <version>${postgres.jdbc.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>openstack-client</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>keystone-client</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>keystone-model</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>glance-client</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>glance-model</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>quantum-client</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>quantum-model</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>com.woorea</groupId>
+      <artifactId>resteasy-connector</artifactId>
+      <version>${openstack-client.version}</version>
+    </dependency>
+
+  </dependencies>
+
+  <build>
+
+    <plugins>
+
+        <plugin>
+          <groupId>org.ovirt.engine</groupId>
+          <artifactId>jboss-modules-maven-plugin</artifactId>
+          <configuration>
+
+            <moduleRepository>shared</moduleRepository>
+
+            <modules>
+
+              <module>
+                <groupId>commons-configuration</groupId>
+                <artifactId>commons-configuration</artifactId>
+                <moduleName>org.apache.commons.configuration</moduleName>
+              </module>
+
+              <module>
+                <groupId>commons-httpclient</groupId>
+                <artifactId>commons-httpclient</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>commons-jxpath</groupId>
+                <artifactId>commons-jxpath</artifactId>
+                <moduleName>org.apache.commons.jxpath</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.apache.commons</groupId>
+                <artifactId>commons-compress</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.apache.mina</groupId>
+                <artifactId>mina-core</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.apache.sshd</groupId>
+                <artifactId>sshd-core</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.apache.ws.commons.util</groupId>
+                <artifactId>ws-commons-util</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.apache.xmlrpc</groupId>
+                <artifactId>xmlrpc-client</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.apache.xmlrpc</groupId>
+                <artifactId>xmlrpc-common</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.ovirt.otopi</groupId>
+                <artifactId>otopi</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.ovirt.ovirt-host-deploy</groupId>
+                <artifactId>ovirt-host-deploy</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.quartz-scheduler</groupId>
+                <artifactId>quartz</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework.ldap</groupId>
+                <artifactId>spring-ldap-core</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-aop</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-asm</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-beans</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-context</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-core</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-expression</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-instrument</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-jdbc</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>org.springframework</groupId>
+                <artifactId>spring-tx</artifactId>
+                <moduleName>org.ovirt.engine.core.dependencies</moduleName>
+              </module>
+
+              <module>
+                <groupId>postgresql</groupId>
+                <artifactId>postgresql</artifactId>
+                <moduleName>org.postgresql</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>openstack-client</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>keystone-client</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>keystone-model</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>glance-client</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>glance-model</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>quantum-client</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>quantum-model</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+              <module>
+                <groupId>com.woorea</groupId>
+                <artifactId>resteasy-connector</artifactId>
+                <moduleName>com.woorea.openstack.sdk</moduleName>
+              </module>
+
+            </modules>
+          </configuration>
+        </plugin>
+
+    </plugins>
+
+  </build>
+
+</project>
diff --git 
a/backend/manager/dependencies/src/main/modules/com/woorea/openstack/sdk/main/module.xml
 
b/backend/manager/dependencies/shared/src/main/modules/com/woorea/openstack/sdk/main/module.xml
similarity index 100%
rename from 
backend/manager/dependencies/src/main/modules/com/woorea/openstack/sdk/main/module.xml
rename to 
backend/manager/dependencies/shared/src/main/modules/com/woorea/openstack/sdk/main/module.xml
diff --git 
a/backend/manager/dependencies/src/main/modules/org/apache/commons/configuration/main/module.xml
 
b/backend/manager/dependencies/shared/src/main/modules/org/apache/commons/configuration/main/module.xml
similarity index 100%
rename from 
backend/manager/dependencies/src/main/modules/org/apache/commons/configuration/main/module.xml
rename to 
backend/manager/dependencies/shared/src/main/modules/org/apache/commons/configuration/main/module.xml
diff --git 
a/backend/manager/dependencies/src/main/modules/org/apache/commons/jxpath/main/module.xml
 
b/backend/manager/dependencies/shared/src/main/modules/org/apache/commons/jxpath/main/module.xml
similarity index 100%
rename from 
backend/manager/dependencies/src/main/modules/org/apache/commons/jxpath/main/module.xml
rename to 
backend/manager/dependencies/shared/src/main/modules/org/apache/commons/jxpath/main/module.xml
diff --git 
a/backend/manager/dependencies/src/main/modules/org/ovirt/engine/core/dependencies/main/module.xml
 
b/backend/manager/dependencies/shared/src/main/modules/org/ovirt/engine/core/dependencies/main/module.xml
similarity index 100%
rename from 
backend/manager/dependencies/src/main/modules/org/ovirt/engine/core/dependencies/main/module.xml
rename to 
backend/manager/dependencies/shared/src/main/modules/org/ovirt/engine/core/dependencies/main/module.xml
diff --git 
a/backend/manager/dependencies/src/main/modules/org/postgresql/main/module.xml 
b/backend/manager/dependencies/shared/src/main/modules/org/postgresql/main/module.xml
similarity index 100%
rename from 
backend/manager/dependencies/src/main/modules/org/postgresql/main/module.xml
rename to 
backend/manager/dependencies/shared/src/main/modules/org/postgresql/main/module.xml
diff --git a/backend/manager/dependencies/tools/pom.xml 
b/backend/manager/dependencies/tools/pom.xml
new file mode 100644
index 0000000..bad3326
--- /dev/null
+++ b/backend/manager/dependencies/tools/pom.xml
@@ -0,0 +1,51 @@
+<project
+  xmlns="http://maven.apache.org/POM/4.0.0";
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.ovirt.engine.core</groupId>
+    <artifactId>dependencies</artifactId>
+    <version>3.4.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>tools-dependencies</artifactId>
+  <packaging>jar</packaging>
+
+  <name>oVirt Tools dependencies</name>
+
+  <!-- We need to put here all the dependencies corresponding to the
+       .jar files that will be added to the modules archive: -->
+
+  <dependencies>
+
+    <!-- This is currently empty, everything is in the shared modules
+         repository. -->
+
+  </dependencies>
+
+  <build>
+
+    <plugins>
+
+      <plugin>
+        <groupId>org.ovirt.engine</groupId>
+        <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>tools</moduleRepository>
+          <modules>
+
+            <!-- No modules required here at the moment, everything
+                 is in the shared modules repository. -->
+
+          </modules>
+        </configuration>
+      </plugin>
+
+    </plugins>
+
+  </build>
+
+</project>
diff --git a/backend/manager/modules/common/pom.xml 
b/backend/manager/modules/common/pom.xml
index 31ff512..58a6165 100644
--- a/backend/manager/modules/common/pom.xml
+++ b/backend/manager/modules/common/pom.xml
@@ -103,7 +103,11 @@
       <plugin>
         <groupId>org.ovirt.engine</groupId>
         <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>shared</moduleRepository>
+        </configuration>
       </plugin>
+
     </plugins>
   </build>
   <profiles>
diff --git a/backend/manager/modules/compat/pom.xml 
b/backend/manager/modules/compat/pom.xml
index 5a5e95b..fc66951 100644
--- a/backend/manager/modules/compat/pom.xml
+++ b/backend/manager/modules/compat/pom.xml
@@ -43,7 +43,11 @@
       <plugin>
         <groupId>org.ovirt.engine</groupId>
         <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>shared</moduleRepository>
+        </configuration>
       </plugin>
+
     </plugins>
   </build>
   <profiles>
diff --git a/backend/manager/modules/dal/pom.xml 
b/backend/manager/modules/dal/pom.xml
index 33e08c5..96019f9 100644
--- a/backend/manager/modules/dal/pom.xml
+++ b/backend/manager/modules/dal/pom.xml
@@ -147,6 +147,9 @@
       <plugin>
         <groupId>org.ovirt.engine</groupId>
         <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>shared</moduleRepository>
+        </configuration>
       </plugin>
 
     </plugins>
diff --git a/backend/manager/modules/searchbackend/pom.xml 
b/backend/manager/modules/searchbackend/pom.xml
index 3a5100e..999befb 100644
--- a/backend/manager/modules/searchbackend/pom.xml
+++ b/backend/manager/modules/searchbackend/pom.xml
@@ -68,6 +68,9 @@
       <plugin>
         <groupId>org.ovirt.engine</groupId>
         <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>shared</moduleRepository>
+        </configuration>
       </plugin>
 
     </plugins>
diff --git a/backend/manager/modules/utils/pom.xml 
b/backend/manager/modules/utils/pom.xml
index 20c1fda..d1e1a80 100644
--- a/backend/manager/modules/utils/pom.xml
+++ b/backend/manager/modules/utils/pom.xml
@@ -183,7 +183,11 @@
       <plugin>
         <groupId>org.ovirt.engine</groupId>
         <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>shared</moduleRepository>
+        </configuration>
       </plugin>
+
     </plugins>
   </build>
   <profiles>
diff --git a/backend/manager/tools/pom.xml b/backend/manager/tools/pom.xml
index 0f8fe63..c9267e8 100644
--- a/backend/manager/tools/pom.xml
+++ b/backend/manager/tools/pom.xml
@@ -79,10 +79,15 @@
       <plugin>
         <groupId>org.ovirt.engine</groupId>
         <artifactId>jboss-modules-maven-plugin</artifactId>
+        <configuration>
+          <moduleRepository>tools</moduleRepository>
+        </configuration>
       </plugin>
+
       <plugin>
         <artifactId>maven-checkstyle-plugin</artifactId>
       </plugin>
+
     </plugins>
   </build>
 
diff --git a/ovirt-engine.spec.in b/ovirt-engine.spec.in
index 6783ec3..c0cf4c3 100644
--- a/ovirt-engine.spec.in
+++ b/ovirt-engine.spec.in
@@ -445,12 +445,12 @@
 %{engine_ear}/bll.jar
 %{engine_ear}/lib/vdsbroker.jar
 %{engine_ear}/scheduler.jar
-%{engine_jboss_modules}/org/ovirt/engine/core/common/main/common.jar
-%{engine_jboss_modules}/org/ovirt/engine/core/compat/main/compat.jar
-%{engine_jboss_modules}/org/ovirt/engine/core/dal/main/dal.jar
-%{engine_jboss_modules}/org/ovirt/engine/core/searchbackend/main/searchbackend.jar
-%{engine_jboss_modules}/org/ovirt/engine/core/tools/main/tools.jar
-%{engine_jboss_modules}/org/ovirt/engine/core/utils/main/utils.jar
+%{engine_jboss_modules}/shared/org/ovirt/engine/core/common/main/common.jar
+%{engine_jboss_modules}/shared/org/ovirt/engine/core/compat/main/compat.jar
+%{engine_jboss_modules}/shared/org/ovirt/engine/core/dal/main/dal.jar
+%{engine_jboss_modules}/shared/org/ovirt/engine/core/searchbackend/main/searchbackend.jar
+%{engine_jboss_modules}/shared/org/ovirt/engine/core/utils/main/utils.jar
+%{engine_jboss_modules}/tools/org/ovirt/engine/core/tools/main/tools.jar
 %{restapi_war}/WEB-INF/lib/interface-common-jaxrs.jar
 %{restapi_war}/WEB-INF/lib/restapi-definition.jar
 %{restapi_war}/WEB-INF/lib/restapi-jaxrs.jar
@@ -774,7 +774,9 @@
 %ghost %config(noreplace) %{engine_pki}/serial.txt
 
 # Modules:
-%{engine_jboss_modules}
+%dir %{engine_jboss_modules}
+%{engine_jboss_modules}/shared
+%{engine_jboss_modules}/engine
 
 %files setup
 
@@ -933,6 +935,10 @@
 %{_initddir}/ovirt-engine-notifier
 %endif
 
+# JBoss modules:
+%{engine_jboss_modules}/tools
+
+
 %changelog
 * Thu Jan 17 2013 Juan Hernandez <[email protected]> - 3.3.0-1
 - Bump version to 3.3.0
diff --git a/packaging/bin/engine-prolog.sh.in 
b/packaging/bin/engine-prolog.sh.in
index 432d58f..2d768d2 100644
--- a/packaging/bin/engine-prolog.sh.in
+++ b/packaging/bin/engine-prolog.sh.in
@@ -26,7 +26,7 @@
 
        # we use jboss specific loader (jboss-modules.jar)
        # setup module path
-       export JAVA_MODULEPATH="${ENGINE_USR}/modules:${JBOSS_HOME}/modules"
+       export 
JAVA_MODULEPATH="${ENGINE_USR}/modules/tools:${ENGINE_USR}/modules/shared:${JBOSS_HOME}/modules"
 
        # clean the class path
        # jboss module loader will not run otherwise.
diff --git a/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py 
b/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py
index 96266ae..7cb4b68 100755
--- a/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py
+++ b/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py
@@ -163,7 +163,11 @@
             'JAVA_MODULEPATH': ':'.join([
                 os.path.join(
                     self._config.get('ENGINE_USR'),
-                    'modules',
+                    'modules/tools',
+                ),
+                os.path.join(
+                    self._config.get('ENGINE_USR'),
+                    'modules/shared',
                 ),
                 os.path.join(
                     self._config.get('JBOSS_HOME'),
diff --git a/packaging/services/ovirt-engine/ovirt-engine.py 
b/packaging/services/ovirt-engine/ovirt-engine.py
index 1c2a053..4b55404 100755
--- a/packaging/services/ovirt-engine/ovirt-engine.py
+++ b/packaging/services/ovirt-engine/ovirt-engine.py
@@ -402,13 +402,17 @@
             '-Djboss.controller.temp.dir=%s' % jbossTempDir,
             '-jar', jbossModulesJar,
 
-            # Module path should include first the engine modules
-            # so that they can override those provided by the
-            # application server if needed:
-            '-mp', "%s:%s" % (
+            # Module path should include first the engine modules then the
+            # shared modules and finally the modules provided by the
+            # application server:
+            '-mp', "%s:%s:%s" % (
                 os.path.join(
                     self._config.get('ENGINE_USR'),
-                    'modules',
+                    'modules/engine',
+                ),
+                os.path.join(
+                    self._config.get('ENGINE_USR'),
+                    'modules/shared',
                 ),
                 jbossModulesTmpDir,
             ),


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

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

Reply via email to