Juan Hernandez has uploaded a new change for review. Change subject: core: Add JBoss modules for libraries ......................................................................
core: Add JBoss modules for libraries This patch creates JBoss modules for the common, compat, dal, utils and searchbackend libraries. Change-Id: Ia14b6488b876ccc364d28b2355ccf6e8772b0627 Signed-off-by: Juan Hernandez <juan.hernan...@redhat.com> --- M Makefile M backend/manager/modules/common/pom.xml A backend/manager/modules/common/src/main/modules/org/ovirt/engine/core/common/main/module.xml M backend/manager/modules/compat/pom.xml A backend/manager/modules/compat/src/main/modules/org/ovirt/engine/core/compat/main/module.xml M backend/manager/modules/dal/pom.xml A backend/manager/modules/dal/src/main/modules/org/ovirt/engine/core/dal/main/module.xml M backend/manager/modules/searchbackend/pom.xml A backend/manager/modules/searchbackend/src/main/modules/org/ovirt/engine/core/searchbackend/main/module.xml M backend/manager/modules/utils/pom.xml A backend/manager/modules/utils/src/main/modules/org/ovirt/engine/core/utils/main/module.xml M ear/pom.xml M ear/src/main/resources/META-INF/MANIFEST.MF M packaging/fedora/spec/ovirt-engine.spec.in 14 files changed, 151 insertions(+), 18 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/12094/1 diff --git a/Makefile b/Makefile index ace2553..439dd39 100644 --- a/Makefile +++ b/Makefile @@ -100,13 +100,7 @@ OWN_JAR_FIXUPS = \ $(PKG_EAR_DIR)/engine-bll,bll \ $(PKG_EAR_DIR)/engine-scheduler,scheduler \ - $(PKG_EAR_DIR)/lib/engine-common,common \ - $(PKG_EAR_DIR)/lib/engine-compat,compat \ - $(PKG_EAR_DIR)/lib/engine-dal,dal \ - $(PKG_EAR_DIR)/lib/engine-tools,tools \ - $(PKG_EAR_DIR)/lib/engine-utils,utils \ $(PKG_EAR_DIR)/lib/engine-vdsbroker,vdsbroker \ - $(PKG_EAR_DIR)/lib/searchbackend,searchbackend \ $(NULL) # Don't use any of the bultin rules, in particular don't use the rule @@ -420,9 +414,9 @@ install_jboss_modules: @echo "*** Deploying JBoss modules" - # Uncompress and install the contents of the modules archive to + # Uncompress and install the contents of the modules archives to # the directory containing engine modules: - X=`find "$(MAVEN_OUTPUT_DIR)" -name "dependencies-$(APP_VERSION)*-modules.zip"` && unzip "$$X" -d "$(DESTDIR)$(PKG_JBOSS_MODULES)" + find "$(MAVEN_OUTPUT_DIR)" -name "*-$(APP_VERSION)*-modules.zip" -exec unzip {} -d "$(DESTDIR)$(PKG_JBOSS_MODULES)" \; install_service: @echo "*** Deploying service" diff --git a/backend/manager/modules/common/pom.xml b/backend/manager/modules/common/pom.xml index 518c70b..278f72c 100644 --- a/backend/manager/modules/common/pom.xml +++ b/backend/manager/modules/common/pom.xml @@ -86,6 +86,13 @@ <fail>true</fail> </configuration> </plugin> + + <!-- Create the JBoss module: --> + <plugin> + <groupId>org.ovirt.engine</groupId> + <artifactId>jboss-modules-maven-plugin</artifactId> + </plugin> + </plugins> </build> </project> diff --git a/backend/manager/modules/common/src/main/modules/org/ovirt/engine/core/common/main/module.xml b/backend/manager/modules/common/src/main/modules/org/ovirt/engine/core/common/main/module.xml new file mode 100644 index 0000000..59f830b --- /dev/null +++ b/backend/manager/modules/common/src/main/modules/org/ovirt/engine/core/common/main/module.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<module xmlns="urn:jboss:module:1.0" name="org.ovirt.engine.core.common"> + + <resources> + <resource-root path="common.jar"/> + </resources> + + <dependencies> + <module name="javax.api"/> + <module name="javax.validation.api"/> + <module name="org.ovirt.engine.core.compat"/> + <module name="org.ovirt.engine.core.dependencies"/> + </dependencies> + +</module> diff --git a/backend/manager/modules/compat/pom.xml b/backend/manager/modules/compat/pom.xml index b3ccc8a..07b0eed 100644 --- a/backend/manager/modules/compat/pom.xml +++ b/backend/manager/modules/compat/pom.xml @@ -26,6 +26,13 @@ </execution> </executions> </plugin> + + <!-- Create the JBoss module: --> + <plugin> + <groupId>org.ovirt.engine</groupId> + <artifactId>jboss-modules-maven-plugin</artifactId> + </plugin> + </plugins> </build> diff --git a/backend/manager/modules/compat/src/main/modules/org/ovirt/engine/core/compat/main/module.xml b/backend/manager/modules/compat/src/main/modules/org/ovirt/engine/core/compat/main/module.xml new file mode 100644 index 0000000..cc52a86 --- /dev/null +++ b/backend/manager/modules/compat/src/main/modules/org/ovirt/engine/core/compat/main/module.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<module xmlns="urn:jboss:module:1.0" name="org.ovirt.engine.core.compat"> + + <resources> + <resource-root path="compat.jar"/> + </resources> + + <dependencies> + <module name="javax.api"/> + <module name="org.apache.commons.logging"/> + <module name="org.ovirt.engine.core.dependencies"/> + </dependencies> + +</module> diff --git a/backend/manager/modules/dal/pom.xml b/backend/manager/modules/dal/pom.xml index 3b00315..091c242 100644 --- a/backend/manager/modules/dal/pom.xml +++ b/backend/manager/modules/dal/pom.xml @@ -187,6 +187,13 @@ </excludes> </configuration> </plugin> + + <!-- Create the JBoss module: --> + <plugin> + <groupId>org.ovirt.engine</groupId> + <artifactId>jboss-modules-maven-plugin</artifactId> + </plugin> + </plugins> </build> <profiles> diff --git a/backend/manager/modules/dal/src/main/modules/org/ovirt/engine/core/dal/main/module.xml b/backend/manager/modules/dal/src/main/modules/org/ovirt/engine/core/dal/main/module.xml new file mode 100644 index 0000000..6beea8c --- /dev/null +++ b/backend/manager/modules/dal/src/main/modules/org/ovirt/engine/core/dal/main/module.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<module xmlns="urn:jboss:module:1.0" name="org.ovirt.engine.core.dal"> + + <resources> + <resource-root path="dal.jar"/> + </resources> + + <dependencies> + <module name="javax.api"/> + <module name="org.apache.commons.lang"/> + <module name="org.ovirt.engine.core.common"/> + <module name="org.ovirt.engine.core.compat"/> + <module name="org.ovirt.engine.core.dependencies"/> + <module name="org.ovirt.engine.core.utils"/> + </dependencies> + +</module> diff --git a/backend/manager/modules/searchbackend/pom.xml b/backend/manager/modules/searchbackend/pom.xml index 65a6b05..1d5ae24 100644 --- a/backend/manager/modules/searchbackend/pom.xml +++ b/backend/manager/modules/searchbackend/pom.xml @@ -57,6 +57,13 @@ </execution> </executions> </plugin> + + <!-- Create the JBoss module: --> + <plugin> + <groupId>org.ovirt.engine</groupId> + <artifactId>jboss-modules-maven-plugin</artifactId> + </plugin> + </plugins> </build> diff --git a/backend/manager/modules/searchbackend/src/main/modules/org/ovirt/engine/core/searchbackend/main/module.xml b/backend/manager/modules/searchbackend/src/main/modules/org/ovirt/engine/core/searchbackend/main/module.xml new file mode 100644 index 0000000..56ed52a --- /dev/null +++ b/backend/manager/modules/searchbackend/src/main/modules/org/ovirt/engine/core/searchbackend/main/module.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<module xmlns="urn:jboss:module:1.0" name="org.ovirt.engine.core.searchbackend"> + + <resources> + <resource-root path="searchbackend.jar"/> + </resources> + + <dependencies> + <module name="javax.api"/> + <module name="org.apache.commons.logging"/> + <module name="org.ovirt.engine.core.common"/> + <module name="org.ovirt.engine.core.compat"/> + <module name="org.ovirt.engine.core.dependencies"/> + <module name="org.ovirt.engine.core.utils"/> + </dependencies> + +</module> diff --git a/backend/manager/modules/utils/pom.xml b/backend/manager/modules/utils/pom.xml index 8440718..c3e6f8e 100644 --- a/backend/manager/modules/utils/pom.xml +++ b/backend/manager/modules/utils/pom.xml @@ -162,6 +162,13 @@ </excludes> </configuration> </plugin> + + <!-- Create the JBoss module: --> + <plugin> + <groupId>org.ovirt.engine</groupId> + <artifactId>jboss-modules-maven-plugin</artifactId> + </plugin> + </plugins> </build> <profiles> diff --git a/backend/manager/modules/utils/src/main/modules/org/ovirt/engine/core/utils/main/module.xml b/backend/manager/modules/utils/src/main/modules/org/ovirt/engine/core/utils/main/module.xml new file mode 100644 index 0000000..a4a66a2 --- /dev/null +++ b/backend/manager/modules/utils/src/main/modules/org/ovirt/engine/core/utils/main/module.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<module xmlns="urn:jboss:module:1.0" name="org.ovirt.engine.core.utils"> + + <resources> + <resource-root path="utils.jar"/> + </resources> + + <dependencies> + <module name="javax.api"/> + <module name="javax.ejb.api"/> + <module name="javax.interceptor.api"/> + <module name="javax.servlet.api"/> + <module name="javax.transaction.api"/> + <module name="org.apache.commons.codec"/> + <module name="org.apache.commons.lang"/> + <module name="org.apache.commons.logging"/> + <module name="org.apache.log4j"/> + <module name="org.codehaus.jackson.jackson-core-asl"/> + <module name="org.codehaus.jackson.jackson-mapper-asl"/> + <module name="org.ovirt.engine.core.common"/> + <module name="org.ovirt.engine.core.compat"/> + <module name="org.ovirt.engine.core.dependencies"/> + </dependencies> + +</module> diff --git a/ear/pom.xml b/ear/pom.xml index c539913..8af6bef 100644 --- a/ear/pom.xml +++ b/ear/pom.xml @@ -296,10 +296,6 @@ *.jar/**, *.war/**, META-INF/**, - lib/engine-common.jar/**, - lib/engine-compat.jar/**, - lib/engine-searchbackend.jar/**, - lib/engine-utils.jar/**, lib/engine-vdsbroker.jar/**, </packagingIncludes> diff --git a/ear/src/main/resources/META-INF/MANIFEST.MF b/ear/src/main/resources/META-INF/MANIFEST.MF index 2b6d436..f93d405 100644 --- a/ear/src/main/resources/META-INF/MANIFEST.MF +++ b/ear/src/main/resources/META-INF/MANIFEST.MF @@ -9,4 +9,9 @@ org.codehaus.jackson.jackson-mapper-asl, org.dom4j, org.hibernate.validator, - org.ovirt.engine.core.dependencies + org.ovirt.engine.core.common, + org.ovirt.engine.core.compat, + org.ovirt.engine.core.dal, + org.ovirt.engine.core.dependencies, + org.ovirt.engine.core.searchbackend, + org.ovirt.engine.core.utils diff --git a/packaging/fedora/spec/ovirt-engine.spec.in b/packaging/fedora/spec/ovirt-engine.spec.in index 6da85cf..0fcd88a 100644 --- a/packaging/fedora/spec/ovirt-engine.spec.in +++ b/packaging/fedora/spec/ovirt-engine.spec.in @@ -385,11 +385,7 @@ done <<'.' engine-bll bll engine-scheduler scheduler -lib/engine-common common -lib/engine-dal dal -lib/engine-utils utils lib/engine-vdsbroker vdsbroker -lib/searchbackend searchbackend . # Replace jar files in the RESTAPI web application with links to their @@ -406,7 +402,8 @@ . # Replace jar files in the modules directory with links to their -# actual locations: +# actual locations, first for the external dependencies and using the +# build-classpath utility: find %{buildroot}%{engine_jboss_modules} -type f -name "*.jar" -delete while read module_path jar_name jar_path do @@ -436,6 +433,19 @@ org/postgresql postgresql postgresql-jdbc . +# Then for our own modules, as we can't use the build-classpath utility +# in this case: +while read module +do + ln -s %{engine_java}/${module}.jar %{buildroot}%{engine_jboss_modules}/org/ovirt/engine/core/${module}/main/${module}.jar +done <<'.' +common +compat +dal +searchbackend +utils +. + # Install the systemd files: install -dm 755 %{buildroot}%{_unitdir} install -m 644 packaging/fedora/engine-service.systemd %{buildroot}%{_unitdir}/%{engine_name}.service -- To view, visit http://gerrit.ovirt.org/12094 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia14b6488b876ccc364d28b2355ccf6e8772b0627 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernan...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches