Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: build: move to ant drop maven and jboss modules ......................................................................
packaging: build: move to ant drop maven and jboss modules Change-Id: I39550f694d7e8c37bbe189c1b9bfd944a5dad2e0 Signed-off-by: Alon Bar-Lev <[email protected]> --- M .gitignore M Makefile D build-tools-root/jboss-modules-maven-plugin/pom.xml D build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/Module.java D build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/ModulesMojo.java D build-tools-root/pom.xml A build.xml M ovirt-engine-dwh.spec.in A ovirt-engine-dwh/advancedPersistentLookupLib/build.xml D ovirt-engine-dwh/advancedPersistentLookupLib/pom.xml D ovirt-engine-dwh/dependencies/pom.xml D ovirt-engine-dwh/dependencies/src/main/modules/org/ovirt/engine/dwh/main/module.xml D ovirt-engine-dwh/dependencies/src/main/modules/org/postgresql/main/module.xml A ovirt-engine-dwh/etltermination/build.xml D ovirt-engine-dwh/etltermination/pom.xml A ovirt-engine-dwh/historyETL/build.xml D ovirt-engine-dwh/historyETL/pom.xml D ovirt-engine-dwh/pom.xml A ovirt-engine-dwh/routines/build.xml D ovirt-engine-dwh/routines/pom.xml M packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.conf.in M packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py M packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/__init__.py D packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/jboss.py D pom.xml M version.mak 26 files changed, 281 insertions(+), 994 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-dwh refs/changes/42/24142/1 diff --git a/.gitignore b/.gitignore index 2c93e00..f9006b3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +lib target tmp.* diff --git a/Makefile b/Makefile index 8a1d2cb..071c442 100644 --- a/Makefile +++ b/Makefile @@ -24,12 +24,12 @@ # # CUSTOMIZATION-BEGIN # -BUILD_UT=1 EXTRA_BUILD_FLAGS= BUILD_VALIDATION=1 +BUILD_DEPMODE=build-classpath PACKAGE_NAME=ovirt-engine-dwh -MVN=mvn +ANT=ant PYTHON=python PYFLAKES=pyflakes PEP8=pep8 @@ -41,15 +41,13 @@ MAN_DIR=$(DATAROOT_DIR)/man DOC_DIR=$(DATAROOT_DIR)/doc PKG_DATA_DIR=$(DATAROOT_DIR)/ovirt-engine-dwh -MAVENPOM_DIR=$(DATAROOT_DIR)/maven-poms JAVA_DIR=$(DATAROOT_DIR)/java PKG_SYSCONF_DIR=$(SYSCONF_DIR)/ovirt-engine-dwh -PKG_JBOSS_MODULES=$(PKG_DATA_DIR)/modules +PKG_JAVA_LIB=$(PKG_DATA_DIR)/lib PKG_CACHE_DIR=$(LOCALSTATE_DIR)/cache/ovirt-engine-dwh PKG_LOG_DIR=$(LOCALSTATE_DIR)/log/ovirt-engine-dwh PKG_TMP_DIR=$(LOCALSTATE_DIR)/tmp/ovirt-engine-dwh PKG_STATE_DIR=$(LOCALSTATE_DIR)/lib/ovirt-engine-dwh -JBOSS_HOME=/usr/share/jboss-as PYTHON_DIR=$(PYTHON_SYS_DIR) DEV_PYTHON_DIR= PKG_USER=ovirt @@ -59,36 +57,23 @@ # include version.mak -# major, minor, seq -POM_VERSION:=$(shell cat pom.xml | grep '<ovirt-dwh.version>' | sed -e 's/.*>\(.*\)<.*/\1/' -e 's/-SNAPSHOT//') -# major, minor from pom and fix -APP_VERSION=$(shell echo $(POM_VERSION) | sed 's/\([^.]*\.[^.]\)\..*/\1/').$(FIX_RELEASE) -RPM_VERSION=$(APP_VERSION) -PACKAGE_VERSION=$(APP_VERSION)$(if $(MILESTONE),_$(MILESTONE)) +RPM_VERSION=$(VERSION) +PACKAGE_VERSION=$(VERSION)$(if $(MILESTONE),_$(MILESTONE)) DISPLAY_VERSION=$(PACKAGE_VERSION) -DWH_VERSION=$(APP_VERSION) +DWH_VERSION=$(VERSION) -BUILD_FLAGS:= -ifeq ($(BUILD_UT),0) -BUILD_FLAGS:=$(BUILD_FLAGS) -D skipTests +ifeq ($(BUILD_DEPMODE),build-classpath) +BUILD_FLAGS:=$(BUILD_FLAGS) -Ddepmode.build-classpath=true +endif +ifeq ($(BUILD_DEPMODE),java-config) +BUILD_FLAGS:=$(BUILD_FLAGS) -Ddepmode.java-config=true endif BUILD_FLAGS:=$(BUILD_FLAGS) $(EXTRA_BUILD_FLAGS) PYTHON_SYS_DIR:=$(shell $(PYTHON) -c "from distutils.sysconfig import get_python_lib as f;print(f())") -OUTPUT_DIR=output TARBALL=$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz -ARCH=noarch BUILD_FILE=tmp.built -MAVEN_OUTPUT_DIR=. -BUILD_TARGET=install - -ARTIFACTS = \ - advancedPersistentLookupLib \ - historyETL \ - historyETLContext \ - routines \ - $(NULL) .SUFFIXES: .SUFFIXES: .in @@ -102,8 +87,7 @@ -e "s|@PKG_DATA_DIR@|$(PKG_DATA_DIR)|g" \ -e "s|@PKG_LOG_DIR@|$(PKG_LOG_DIR)|g" \ -e "s|@PKG_STATE_DIR@|$(PKG_STATE_DIR)|g" \ - -e "s|@PKG_JBOSS_MODULES@|$(PKG_JBOSS_MODULES)|g" \ - -e "s|@JBOSS_HOME@|$(JBOSS_HOME)|g" \ + -e "s|@PKG_JAVA_LIB@|$(PKG_JAVA_LIB)|g" \ -e "s|@DEV_PYTHON_DIR@|$(DEV_PYTHON_DIR)|g" \ -e "s|@DWH_VARS@|$(PKG_SYSCONF_DIR)/ovirt-engine-dwhd.conf|g" \ -e "s|@DWH_DEFAULTS@|$(PKG_DATA_DIR)/services/ovirt-engine-dwhd/ovirt-engine-dwhd.conf|g" \ @@ -142,25 +126,18 @@ chmod a+x packaging/services/ovirt-engine-dwhd/ovirt_engine_dwh_watchdog.cron $(BUILD_FILE): - export MAVEN_OPTS="${MAVEN_OPTS} -XX:MaxPermSize=512m" - $(MVN) \ - $(BUILD_FLAGS) \ - $(BUILD_TARGET) \ - $(NULL) + $(ANT) $(BUILD_FLAGS) all touch $(BUILD_FILE) clean: - $(MVN) clean $(EXTRA_BUILD_FLAGS) - rm -rf $(OUTPUT_DIR) $(BUILD_FILE) tmp.dev.flist + $(ANT) $(BUILD_FLAGS) clean + rm -rf $(BUILD_FILE) + rm -rf tmp.dev.flist rm -rf $(GENERATED) - -test: - $(MVN) install $(BUILD_FLAGS) $(EXTRA_BUILD_FLAGS) install: \ all \ install-artifacts \ - install-poms \ install-layout \ $(NULL) @@ -212,21 +189,10 @@ fi install-artifacts: - # we must exclude tmp.repos directory so we - # won't get artifacts of older branches - # we should use search MAVEN_OUTPUT_DIR as it may contain - # pre-compiled artifacts at different hierarchy. - install -dm 755 "$(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)" - -install-poms: - install -dm 755 "$(DESTDIR)$(MAVENPOM_DIR)" - install -m 644 ovirt-engine-dwh/advancedPersistentLookupLib/pom.xml "$(DESTDIR)$(MAVENPOM_DIR)/$(PACKAGE_NAME)-advancedPersistentLookupLib.pom" - install -m 644 ovirt-engine-dwh/etltermination/pom.xml "$(DESTDIR)$(MAVENPOM_DIR)/$(PACKAGE_NAME)-etltermination.pom" - install -m 644 ovirt-engine-dwh/historyETL/pom.xml "$(DESTDIR)$(MAVENPOM_DIR)/$(PACKAGE_NAME)-historyETL.pom" - install -m 644 ovirt-engine-dwh/pom.xml "$(DESTDIR)$(MAVENPOM_DIR)/$(PACKAGE_NAME)-ovirt-engine-dwh.pom" - install -m 644 ovirt-engine-dwh/routines/pom.xml "$(DESTDIR)$(MAVENPOM_DIR)/$(PACKAGE_NAME)-routines.pom" - install -m 644 pom.xml "$(DESTDIR)$(MAVENPOM_DIR)/$(PACKAGE_NAME)-root.pom" + install -d -m 755 "$(DESTDIR)$(PKG_JAVA_LIB)" + for jar in lib/*.jar; do \ + install -m 0644 "$${jar}" "$(DESTDIR)$(PKG_JAVA_LIB)"; \ + done install-packaging-files: \ $(GENERATED) \ diff --git a/build-tools-root/jboss-modules-maven-plugin/pom.xml b/build-tools-root/jboss-modules-maven-plugin/pom.xml deleted file mode 100644 index 7006f22..0000000 --- a/build-tools-root/jboss-modules-maven-plugin/pom.xml +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0"?> - -<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.dwh</groupId> - <artifactId>build-tools-root</artifactId> - <version>3.4.0</version> - </parent> - - <name>oVirt JBoss Modules Maven Plugin</name> - - <description> - Maven Plugin used to generate and attach an artifact containing - JBoss modules - </description> - - <artifactId>jboss-modules-maven-plugin</artifactId> - <version>1.0-SNAPSHOT</version> - <packaging>maven-plugin</packaging> - - <dependencies> - - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-artifact</artifactId> - <version>3.0.4</version> - </dependency> - - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-core</artifactId> - <version>3.0.4</version> - </dependency> - - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> - <version>3.0.4</version> - </dependency> - - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-project</artifactId> - <version>2.2.1</version> - </dependency> - - <dependency> - <groupId>org.apache.maven.plugin-tools</groupId> - <artifactId>maven-plugin-annotations</artifactId> - <version>3.1</version> - </dependency> - - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-archiver</artifactId> - <version>2.1.1</version> - </dependency> - - <dependency> - <groupId>org.codehaus.plexus</groupId> - <artifactId>plexus-utils</artifactId> - <version>3.0</version> - </dependency> - - </dependencies> - - <build> - - <plugins> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-plugin-plugin</artifactId> - <version>3.2</version> - <configuration> - <goalPrefix>jboss-modules</goalPrefix> - <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound> - </configuration> - <executions> - <execution> - <id>mojo-descriptor</id> - <goals> - <goal>descriptor</goal> - </goals> - </execution> - <execution> - <id>help-goal</id> - <goals> - <goal>helpmojo</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - - </build> - -</project> diff --git a/build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/Module.java b/build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/Module.java deleted file mode 100644 index 811c5d6..0000000 --- a/build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/Module.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.ovirt.engine.build; - -import org.apache.maven.artifact.Artifact; - -public class Module { - private String artifactId; - private String groupId; - private String moduleName; - private String moduleSlot; - - public Module() { - // Nothing. - } - - public String getArtifactId() { - return artifactId; - } - - public void setArtifactId(String artifactId) { - this.artifactId = artifactId; - } - - public String getGroupId() { - return groupId; - } - - public void setGroupId(String groupId) { - this.groupId = groupId; - } - - public String getModuleName() { - if (moduleName != null) { - return moduleName; - } - return groupId + "." + artifactId; - } - - public void setModuleName(String moduleName) { - this.moduleName = moduleName; - } - - public String getModuleSlot() { - if (moduleSlot != null) { - return moduleSlot; - } - return "main"; - } - - public void setModuleSlot(String moduleSlot) { - this.moduleSlot = moduleSlot; - } - - public String getResourcePath() { - return artifactId + ".jar"; - } - - public boolean matches(Artifact artifact) { - return artifact.getArtifactId().equals(artifactId) && artifact.getGroupId().equals(groupId); - } -} - diff --git a/build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/ModulesMojo.java b/build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/ModulesMojo.java deleted file mode 100644 index 6707978..0000000 --- a/build-tools-root/jboss-modules-maven-plugin/src/main/java/org/ovirt/engine/build/ModulesMojo.java +++ /dev/null @@ -1,184 +0,0 @@ -package org.ovirt.engine.build; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugins.annotations.Component; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.ResolutionScope; -import org.apache.maven.project.MavenProject; -import org.apache.maven.project.MavenProjectHelper; -import org.codehaus.plexus.archiver.zip.ZipArchiver; -import org.codehaus.plexus.util.FileUtils; - -@Mojo(name = "jboss-modules", defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyCollection = ResolutionScope.COMPILE) -public class ModulesMojo extends AbstractMojo { - - /** - * The maven project. - */ - @Component - private MavenProject project; - - /** - * The project helper. - */ - @Component - private MavenProjectHelper projectHelper; - - /** - * The name of the module. - */ - @Parameter(property = "moduleName", required = false) - private String moduleName; - - /** - * The slot of the module. - */ - @Parameter(property = "moduleSlot", required = false, defaultValue = "main") - private String moduleSlot; - - /** - * The list of modules to generate. - */ - @Parameter(property = "modules") - private List<Module> modules; - - /** - * The temporary directory where modules will be stored. - */ - private File modulesDir; - - public void execute() throws MojoExecutionException { - // Make sure the list of modules is not empty: - if (modules == null) { - modules = new ArrayList<Module>(1); - } - - // Populate the module map and slot map with the value for the - // artifact of this project: - if (modules.isEmpty()) { - Module module = new Module(); - module.setArtifactId(project.getArtifactId()); - module.setGroupId(project.getGroupId()); - modules.add(module); - } - - // Locate the target directory: - File targetDir = new File(project.getBuild().getDirectory()); - - // Create the modules directory in the temporary build directory: - modulesDir = new File(targetDir, "modules"); - getLog().info("Creating modules directory \"" + modulesDir + "\""); - if (!modulesDir.exists()) { - if (!modulesDir.mkdirs()) { - throw new MojoExecutionException( - "Can't create target modules directory \"" + - modulesDir.getAbsolutePath() + "\""); - } - } - - // Copy any content from the source modules directory to the modules - // directory: - String sourcePath = "src" + File.separator + "main" + File.separator + "modules"; - File sourceDir = new File(project.getBasedir(), sourcePath); - getLog().info("Copying module resources to \"" + modulesDir + "\""); - if (sourceDir.exists()) { - try { - FileUtils.copyDirectoryStructure(sourceDir, modulesDir); - } - catch (IOException exception) { - throw new MojoExecutionException( - "Can't copy source modules directory \"" + sourceDir.getAbsolutePath() + "\" " + - "to target modules directory \"" + modulesDir.getAbsolutePath() + "\"", - exception); - } - } - - // Generate the modules: - for (Module module: modules) { - createModule(module); - } - - // Create the archive containing all the contents of the modules - // directory: - File modulesArchive = new File(targetDir, project.getBuild().getFinalName() + "-modules.zip"); - ZipArchiver modulesArchiver = new ZipArchiver(); - modulesArchiver.setDestFile(modulesArchive); - modulesArchiver.addDirectory(modulesDir); - getLog().info("Creating module archive \"" + modulesArchive + "\""); - try { - modulesArchiver.createArchive(); - } - catch (Exception exception) { - throw new MojoExecutionException( - "Can't generate modules archive \"" + modulesArchive.getAbsolutePath() + "\"", - exception); - } - - // Attach the generated zip file containing the modules as an - // additional artifact: - getLog().info("Attaching modules artifact \"" + modulesArchive + "\""); - projectHelper.attachArtifact(project, "zip", "modules", modulesArchive); - } - - private void createModule(Module module) throws MojoExecutionException { - // Create the slot directory: - String modulePath = module.getModuleName().replace(".", File.separator); - String slotPath = modulePath + File.separator + module.getModuleSlot(); - File slotDir = new File(modulesDir, slotPath); - getLog().info("Creating slot directory \"" + slotDir + "\""); - if (!slotDir.exists()) { - if (!slotDir.mkdirs()) { - throw new MojoExecutionException( - "Can't create module directory \"" + - slotDir.getAbsolutePath() + "\""); - } - } - - // Find the dependency with the same group and artifact id that the module: - Artifact matchingArtifact = null; - if (module.matches(project.getArtifact())) { - matchingArtifact = project.getArtifact(); - } - else { - for (Artifact currentArtifact: project.getDependencyArtifacts()) { - if (module.matches(currentArtifact)) { - matchingArtifact = currentArtifact; - } - } - } - if (matchingArtifact == null) { - throw new MojoExecutionException( - "Can't find dependency matching artifact id \"" + module.getArtifactId() + "\" " + - "and group id \"" + module.getGroupId() + "\""); - } - - // Copy the artifact to the slot directory: - File artifactFrom = matchingArtifact.getFile(); - if (artifactFrom == null) { - throw new MojoExecutionException( - "Can't find file for artifact id \"" + module.getArtifactId() + "\" " + - "and group id \"" + module.getGroupId() + "\""); - } - File artifactTo = new File(slotDir, module.getResourcePath()); - getLog().info("Copying artifact to \"" + artifactTo + "\""); - try { - FileUtils.copyFile(artifactFrom, artifactTo); - } - catch (IOException exception) { - throw new MojoExecutionException( - "Can't copy artifact from \"" + artifactFrom.getAbsolutePath() + "\" " + - "to \"" + artifactTo.getAbsolutePath() + "\"", - exception); - } - } - -} diff --git a/build-tools-root/pom.xml b/build-tools-root/pom.xml deleted file mode 100644 index 32f6acf..0000000 --- a/build-tools-root/pom.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0"?> -<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.dwh</groupId> - <artifactId>root</artifactId> - <version>3.4.0</version> - </parent> - <artifactId>build-tools-root</artifactId> - <packaging>pom</packaging> - <name>oVirt Build Tools root</name> - <description>Parent pom of build tools available for use by oVirt modules</description> - <modules> - <module>jboss-modules-maven-plugin</module> - </modules> -</project> diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..5c8c653 --- /dev/null +++ b/build.xml @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="utf-8"?> +<project name="oVirt Engine Data Warehouse" default="all"> + <property file="build.properties"/> + <property name="build.root" location="."/> + <property name="build.output" value="${build.root}/lib"/> + + <macrodef name="dep-build-classpath"> + <attribute name="package"/> + <attribute name="id" default="@{package}"/> + <sequential> + <exec + executable='build-classpath' + outputproperty="dependencies.@{package}" + failonerror="true" + > + <arg value="@{id}"/> + </exec> + <echo message="Depenency @{id} resolved to ${dependencies.@{package}}"/> + </sequential> + </macrodef> + + <macrodef name="dep-java-config"> + <attribute name="package"/> + <attribute name="id" default="@{package}"/> + <sequential> + <exec + executable='java-config' + outputproperty="dependencies.@{package}" + failonerror="true" + > + <arg value="-p"/> + <arg value="@{id}"/> + </exec> + <echo message="Depenency @{id} resolved to ${dependencies.@{package}}"/> + </sequential> + </macrodef> + + <target name="dependencies.dep-java-config" if="depmode.java-config"> + <dep-java-config package="commons-collections"/> + <dep-java-config package="dom4j" id="dom4j-1"/> + <dep-java-config package="postgresql-jdbc" id="jdbc-postgresql"/> + </target> + + <target name="dependencies.dep-build-classpath" if="depmode.build-classpath"> + <dep-build-classpath package="commons-collections"/> + <dep-build-classpath package="dom4j"/> + <dep-build-classpath package="postgresql-jdbc"/> + </target> + + <target name="dependencies" depends=" + dependencies.dep-java-config, + dependencies.dep-build-classpath + "> + <fail message="missing commons-collections" unless="dependencies.commons-collections"/> + <fail message="missing dom4j" unless="dependencies.dom4j"/> + <fail message="missing postgresql-jdbc" unless="dependencies.postgresql-jdbc"/> + <copy todir="${build.output}" overwrite="true" flatten="true"> + <path> + <pathelement path="${dependencies.commons-collections}"/> + <pathelement path="${dependencies.dom4j}"/> + <pathelement path="${dependencies.postgresql-jdbc}"/> + </path> + </copy> + </target> + + <target name="all" depends="dependencies"> + <antcall target="jars"> + <param name="target" value="all"/> + </antcall> + </target> + + <target name="clean"> + <antcall target="jars"> + <param name="target" value="clean"/> + </antcall> + </target> + + <target name="jars"> + <echo message="etltermination"/> + <ant dir="ovirt-engine-dwh/etltermination" target="${target}"/> + <echo message="routines"/> + <ant dir="ovirt-engine-dwh/routines" target="${target}"/> + <echo message="advancedPersistentLookupLib"/> + <ant dir="ovirt-engine-dwh/advancedPersistentLookupLib" target="${target}"/> + <echo message="historyETL"/> + <ant dir="ovirt-engine-dwh/historyETL" target="${target}"/> + </target> + +</project> diff --git a/ovirt-engine-dwh.spec.in b/ovirt-engine-dwh.spec.in index b520fe5..107d4bb 100644 --- a/ovirt-engine-dwh.spec.in +++ b/ovirt-engine-dwh.spec.in @@ -2,14 +2,6 @@ # CUSTOMIZATION-BEGIN # # ovirt_build_extra_flags -# ovirt_build_ut -%if 0%{!?ovirt_build_ut:1} -%if 0%{?_ovirt_build_ut:1} -%global ovirt_build_ut %{_ovirt_build_ut} -%else -%global ovirt_build_ut 1 -%endif -%endif # # CUSTOMIZATION-END # @@ -25,15 +17,15 @@ %if 0%{?fedora} %global ovirt_install_systemd 1 %global ovirt_install_systemv 0 -%global ovirt_install_poms 1 -%global ovirt_require_maven 1 +%global commons_collections apache-commons-collections +%global dom4j dom4j %endif %if 0%{?rhel} %global ovirt_install_systemd 0 %global ovirt_install_systemv 1 -%global ovirt_install_poms 0 -%global ovirt_require_maven 0 +%global commons_collections commons-collections +%global dom4j dom4j-eap6 %endif %global product_name Data warehouse package for oVirt Virtualization Suite @@ -62,7 +54,6 @@ %global make_common_opts \\\ -j1 \\\ - BUILD_UT=%{ovirt_build_ut} \\\ BUILD_VALIDATION=0 \\\ PACKAGE_NAME=%{name} \\\ RPM_VERSION=%{version} \\\ @@ -77,9 +68,9 @@ PYTHON=%{__python} \\\ PYTHON_DIR=%{python_sitelib} \\\ JAVA_DIR=%{_javadir} \\\ - MAVENPOM_DIR=%{_mavenpomdir} \\\ PKG_USER=%{engine_user} \\\ PKG_GROUP=%{engine_group} \\\ + BUILD_DEPMODE=none \\\ %{?EXTRA_BUILD_FLAGS:EXTRA_BUILD_FLAGS="%{EXTRA_BUILD_FLAGS}"} Name: @PACKAGE_NAME@ @@ -92,22 +83,26 @@ BuildArch: noarch Source: http://ovirt.org/releases/stable/src/@PACKAGE_NAME@-@[email protected] +BuildRequires: %{commons_collections} +BuildRequires: %{dom4j} +BuildRequires: ant +BuildRequires: java-1.7.0-openjdk-devel BuildRequires: jpackage-utils BuildRequires: make -%if %{ovirt_require_maven} -BuildRequires: maven -%endif -Requires: python -Requires: java-1.7.0-openjdk -Requires: jboss-as >= 7.1.1-9.3 -Requires: jpackage-utils Requires: postgresql-jdbc -Requires: logrotate -Requires: %{name}-setup >= %{version}-%{release} -Requires: ovirt-engine + %if %{ovirt_install_systemd} BuildRequires: systemd %endif + +Requires: %{commons_collections} +Requires: %{dom4j} +Requires: %{name}-setup >= %{version}-%{release} +Requires: java-1.7.0-openjdk +Requires: jpackage-utils +Requires: logrotate +Requires: ovirt-engine +Requires: postgresql-jdbc %description The %{product_description} package provides @@ -130,6 +125,12 @@ %prep %setup -c -q + +cat > build.properties << __EOF__ +dependencies.commons-collections = $(build-classpath %{commons_collections}) +dependencies.dom4j = $(build-classpath %{dom4j}) +dependencies.postgresql-jdbc = $(build-classpath postgresql-jdbc) +__EOF__ %build make %{make_common_opts} @@ -158,35 +159,15 @@ mv "%{buildroot}/${lib_path}" "%{buildroot}/${java_path}" ln -s "${java_path}" "%{buildroot}${lib_path}" done << __EOF__ -%{_datadir}/ovirt-engine-dwh/modules/org/ovirt/engine/dwh/main/advancedPersistentLookupLib.jar -%{_datadir}/ovirt-engine-dwh/modules/org/ovirt/engine/dwh/main/etltermination.jar -%{_datadir}/ovirt-engine-dwh/modules/org/ovirt/engine/dwh/main/historyETL.jar -%{_datadir}/ovirt-engine-dwh/modules/org/ovirt/engine/dwh/main/routines.jar +%{_datadir}/ovirt-engine-dwh/lib/advancedPersistentLookupLib.jar +%{_datadir}/ovirt-engine-dwh/lib/etltermination.jar +%{_datadir}/ovirt-engine-dwh/lib/historyETL.jar +%{_datadir}/ovirt-engine-dwh/lib/routines.jar __EOF__ # Needed for compatibility if package is different than the directory structure %if "%{name}" != "ovirt-engine-dwh" ln -s "ovirt-engine-dwh" "%{buildroot}%{_javadir}/ovirt-engine-dwh/../%{name}" -%endif - -# -# Register poms -# -%if !%{ovirt_install_poms} -rm -fr "%{buildroot}%{_mavenpomdir}" -%else -for pom in %{buildroot}%{_mavenpomdir}/*.pom; do - pomdir="$(dirname "${pom}")" - pom="$(basename "${pom}")" - jpppom="JPP.${pom}" - mv "${pomdir}/${pom}" "${pomdir}/${jpppom}" - artifact_id="$(echo "${pom}" | sed -e 's/^%{name}-//' -e 's/\.pom//')" - if [ -f "%{buildroot}%{_javadir}/ovirt-engine-dwh/${artifact_id}.jar" ]; then - %add_maven_depmap "${jpppom}" "%{name}/${artifact_id}.jar" - else - %add_maven_depmap "${jpppom}" - fi -done %endif # @@ -196,12 +177,19 @@ [ -z "${dst}" ] && continue [ -z "${src}" ] && src="$(basename "${dst}")" - dst="%{_datadir}/ovirt-engine-dwh/modules/${dst}" + dst="%{_datadir}/ovirt-engine-dwh/lib/${dst}" src="%{_javadir}/${src}" rm -f "%{buildroot}${dst}" ln -s "${src}" "%{buildroot}${dst}" done << __EOF__ -org/postgresql/main/postgresql.jar postgresql-jdbc.jar +%{commons_collections}.jar +%if 0%{?rhel} +dom4j-1.6.1.redhat-6-sources.jar dom4j-eap6/dom4j-1.6.1.redhat-6-sources.jar +dom4j-1.6.1.redhat-6.jar dom4j-eap6/dom4j-1.6.1.redhat-6.jar +%else +dom4j.jar +%endif +postgresql-jdbc.jar __EOF__ # @@ -224,12 +212,6 @@ install -d "%{buildroot}%{_sysconfdir}/ovirt-engine/ovirt-engine-dwh" touch "%{buildroot}%{_sysconfdir}/ovirt-engine/ovirt-engine-dwh/Default.properties" -%post - -%if %{ovirt_install_poms} -%update_maven_depmap -%endif - %preun %ovirt_create_user_engine %if %{ovirt_install_systemv} @@ -247,9 +229,6 @@ %if %{ovirt_install_systemd} %systemd_postun ovirt-engine-dwhd.service %endif -%if %{ovirt_install_poms} -%update_maven_depmap -%endif %files @@ -265,11 +244,6 @@ %if "%{name}" != "ovirt-engine-dwh" %{_javadir}/%{name} -%endif - -%if %{ovirt_install_poms} -%{_mavendepmapfragdir}/%{name} -%{_mavenpomdir}/JPP.%{name}-* %endif %if %{ovirt_install_systemd} diff --git a/ovirt-engine-dwh/advancedPersistentLookupLib/build.xml b/ovirt-engine-dwh/advancedPersistentLookupLib/build.xml new file mode 100644 index 0000000..700fb11 --- /dev/null +++ b/ovirt-engine-dwh/advancedPersistentLookupLib/build.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<project name="Advanced Persistent Lookup Library" default="all"> + <property name="build.output" location="lib"/> + <property name="local.output" value="${build.output}/advancedPersistentLookupLib.jar"/> + + <path id="local.classpath"> + <pathelement path="${dependencies.commons-collections}"/> + <pathelement path="${build.output}/routines.jar"/> + </path> + + <target name="all"> + <mkdir dir="target"/> + <javac + srcdir="src" + destdir="target" + includeAntRuntime="no" + encoding="utf-8" + classpathref="local.classpath" + /> + <jar + destfile="${local.output}" + basedir="target" + includes="**/*.class" + /> + </target> + + <target name="clean"> + <delete dir="target"/> + <delete file="${local.output}"/> + </target> +</project> diff --git a/ovirt-engine-dwh/advancedPersistentLookupLib/pom.xml b/ovirt-engine-dwh/advancedPersistentLookupLib/pom.xml deleted file mode 100644 index 787cb3c..0000000 --- a/ovirt-engine-dwh/advancedPersistentLookupLib/pom.xml +++ /dev/null @@ -1,52 +0,0 @@ -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>ovirt-engine-dwh</artifactId> - <version>3.4.0</version> - </parent> - - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>advancedPersistentLookupLib</artifactId> - <packaging>jar</packaging> - <version>1.0</version> - <name>Advanced Persistent Lookup Library</name> - <description>The jar that contains the advanced persistent lookup library</description> - - <dependencies> - - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>${version.commons-collections}</version> - </dependency> - - <dependency> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>routines</artifactId> - <version>5.4.1.r111943</version> - </dependency> - - </dependencies> - <build> - <pluginManagement> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <encoding>${project.build.sourceEncoding}</encoding> - <source>1.6</source> - <target>1.6</target> - <includes> - <include>**/*.txt</include> - <include>**/*.java</include> - <include>**/*.properties</include> - </includes> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> -</project> diff --git a/ovirt-engine-dwh/dependencies/pom.xml b/ovirt-engine-dwh/dependencies/pom.xml deleted file mode 100644 index 1faafd0..0000000 --- a/ovirt-engine-dwh/dependencies/pom.xml +++ /dev/null @@ -1,104 +0,0 @@ -<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.dwh</groupId> - <artifactId>ovirt-engine-dwh</artifactId> - <version>3.4.0</version> - </parent> - - <artifactId>dependencies</artifactId> - <packaging>jar</packaging> - - <name>oVirt Engine DWH 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>postgresql</groupId> - <artifactId>postgresql</artifactId> - <version>${postgres.jdbc.version}</version> - </dependency> - - <dependency> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>etltermination</artifactId> - <version>3.4.0</version> - </dependency> - - <dependency> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>routines</artifactId> - <version>5.4.1.r111943</version> - </dependency> - - <dependency> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>advancedPersistentLookupLib</artifactId> - <version>1.0</version> - </dependency> - - <dependency> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>historyETL</artifactId> - <version>3.4.0</version> - </dependency> - - </dependencies> - - <build> - - <plugins> - - <plugin> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>jboss-modules-maven-plugin</artifactId> - <configuration> - <modules> - - <module> - <groupId>postgresql</groupId> - <artifactId>postgresql</artifactId> - <moduleName>org.postgresql</moduleName> - </module> - - <module> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>etltermination</artifactId> - <moduleName>org.ovirt.engine.dwh</moduleName> - </module> - - <module> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>routines</artifactId> - <moduleName>org.ovirt.engine.dwh</moduleName> - </module> - - <module> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>advancedPersistentLookupLib</artifactId> - <moduleName>org.ovirt.engine.dwh</moduleName> - </module> - - <module> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>historyETL</artifactId> - <moduleName>org.ovirt.engine.dwh</moduleName> - </module> - - </modules> - </configuration> - </plugin> - - </plugins> - - </build> - -</project> diff --git a/ovirt-engine-dwh/dependencies/src/main/modules/org/ovirt/engine/dwh/main/module.xml b/ovirt-engine-dwh/dependencies/src/main/modules/org/ovirt/engine/dwh/main/module.xml deleted file mode 100644 index a5fbab7..0000000 --- a/ovirt-engine-dwh/dependencies/src/main/modules/org/ovirt/engine/dwh/main/module.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<module xmlns="urn:jboss:module:1.1" name="org.ovirt.engine.dwh"> - - <resources> - <resource-root path="advancedPersistentLookupLib.jar"/> - <resource-root path="etltermination.jar"/> - <resource-root path="historyETL.jar"/> - <resource-root path="routines.jar"/> - </resources> - - <dependencies> - <module name="javax.api"/> - <module name="org.apache.commons.collections"/> - <module name="org.dom4j"/> - <module name="org.postgresql"/> - <module name="sun.jdk"/> - </dependencies> - -</module> diff --git a/ovirt-engine-dwh/dependencies/src/main/modules/org/postgresql/main/module.xml b/ovirt-engine-dwh/dependencies/src/main/modules/org/postgresql/main/module.xml deleted file mode 100644 index 36e24a2..0000000 --- a/ovirt-engine-dwh/dependencies/src/main/modules/org/postgresql/main/module.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<module xmlns="urn:jboss:module:1.1" name="org.postgresql"> - - <resources> - <resource-root path="postgresql.jar"/> - </resources> - - <dependencies> - <module name="javax.api"/> - <module name="javax.transaction.api"/> - </dependencies> - -</module> diff --git a/ovirt-engine-dwh/etltermination/build.xml b/ovirt-engine-dwh/etltermination/build.xml new file mode 100644 index 0000000..98c833c --- /dev/null +++ b/ovirt-engine-dwh/etltermination/build.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<project name="ETL Termination" default="all"> + <property name="build.output" location="lib"/> + <property name="local.output" value="${build.output}/etltermination.jar"/> + + <path id="local.classpath"/> + + <target name="all"> + <mkdir dir="target"/> + <javac + srcdir="src" + destdir="target" + includeAntRuntime="no" + encoding="utf-8" + classpathref="local.classpath" + /> + <jar + destfile="${local.output}" + basedir="target" + includes="**/*.class" + /> + </target> + + <target name="clean"> + <delete dir="target"/> + <delete file="${local.output}"/> + </target> +</project> diff --git a/ovirt-engine-dwh/etltermination/pom.xml b/ovirt-engine-dwh/etltermination/pom.xml deleted file mode 100644 index 46acd86..0000000 --- a/ovirt-engine-dwh/etltermination/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>ovirt-engine-dwh</artifactId> - <version>3.4.0</version> - </parent> - - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>etltermination</artifactId> - <packaging>jar</packaging> - <version>3.4.0</version> - <name>ETL Termination</name> - <description>Hook to all accepting java termination</description> - - <build> - - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - </plugin> - </plugins> - - </build> -</project> diff --git a/ovirt-engine-dwh/historyETL/build.xml b/ovirt-engine-dwh/historyETL/build.xml new file mode 100644 index 0000000..640de38 --- /dev/null +++ b/ovirt-engine-dwh/historyETL/build.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<project name="History's ETL Procedure" default="all"> + <property name="build.output" location="lib"/> + <property name="local.output" value="${build.output}/historyETL.jar"/> + + <path id="local.classpath"> + <pathelement path="${build.output}/etltermination.jar"/> + <pathelement path="${build.output}/routines.jar"/> + <pathelement path="${build.output}/advancedPersistentLookupLib.jar"/> + </path> + + <target name="all"> + <mkdir dir="target"/> + <javac + srcdir="src" + destdir="target" + includeAntRuntime="no" + encoding="utf-8" + classpathref="local.classpath" + /> + <jar destfile="${local.output}"> + <fileset dir="target"/> + <fileset dir="src/main/resources"/> + </jar> + </target> + + <target name="clean"> + <delete dir="target"/> + <delete file="${local.output}"/> + </target> +</project> diff --git a/ovirt-engine-dwh/historyETL/pom.xml b/ovirt-engine-dwh/historyETL/pom.xml deleted file mode 100644 index 6b226fd..0000000 --- a/ovirt-engine-dwh/historyETL/pom.xml +++ /dev/null @@ -1,48 +0,0 @@ -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>ovirt-engine-dwh</artifactId> - <version>3.4.0</version> - </parent> - - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>historyETL</artifactId> - <packaging>jar</packaging> - <version>3.4.0</version> - <name>History's ETL Procedure</name> - <description>The jar that contains the oVirt Engine History DB ETL module</description> - - <dependencies> - - <dependency> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>advancedPersistentLookupLib</artifactId> - <version>1.0</version> - </dependency> - - <dependency> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>etltermination</artifactId> - <version>3.4.0</version> - </dependency> - - </dependencies> - - <build> - - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <encoding>${project.build.sourceEncoding}</encoding> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - </plugins> - - </build> -</project> diff --git a/ovirt-engine-dwh/pom.xml b/ovirt-engine-dwh/pom.xml deleted file mode 100644 index 78474a4..0000000 --- a/ovirt-engine-dwh/pom.xml +++ /dev/null @@ -1,25 +0,0 @@ -<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.dwh</groupId> - <artifactId>root</artifactId> - <version>3.4.0</version> - </parent> - - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>ovirt-engine-dwh</artifactId> - <packaging>pom</packaging> - - <name>Data Warehouse</name> - <description>parent for oVirt Engine History DB ETL module</description> - - <modules> - <module>routines</module> - <module>advancedPersistentLookupLib</module> - <module>etltermination</module> - <module>historyETL</module> - <module>dependencies</module> - </modules> - -</project> diff --git a/ovirt-engine-dwh/routines/build.xml b/ovirt-engine-dwh/routines/build.xml new file mode 100644 index 0000000..55a6a13 --- /dev/null +++ b/ovirt-engine-dwh/routines/build.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="utf-8"?> +<project name="Talend's Routines" default="all"> + <property name="build.output" location="lib"/> + <property name="local.output" value="${build.output}/routines.jar"/> + + <path id="local.classpath"> + <pathelement path="${dependencies.dom4j}"/> + </path> + + <target name="all"> + <mkdir dir="target"/> + <javac + srcdir="src" + destdir="target" + includeAntRuntime="no" + encoding="iso-8859-1" + classpathref="local.classpath" + /> + <jar + destfile="${local.output}" + basedir="target" + includes="**/*.class" + /> + </target> + + <target name="clean"> + <delete dir="target"/> + <delete file="${local.output}"/> + </target> +</project> diff --git a/ovirt-engine-dwh/routines/pom.xml b/ovirt-engine-dwh/routines/pom.xml deleted file mode 100644 index 83bcfc8..0000000 --- a/ovirt-engine-dwh/routines/pom.xml +++ /dev/null @@ -1,42 +0,0 @@ -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>ovirt-engine-dwh</artifactId> - <version>3.4.0</version> - </parent> - - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>routines</artifactId> - <packaging>jar</packaging> - <version>5.4.1.r111943</version> - <name>Talend's Routines</name> - <description>The talend routines required for etl jobs</description> - - <dependencies> - - <dependency> - <groupId>dom4j</groupId> - <artifactId>dom4j</artifactId> - <version>${version.dom4j}</version> - </dependency> - - </dependencies> - - <build> - - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <encoding>${project.build.sourceEncoding}</encoding> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - </plugins> - - </build> -</project> diff --git a/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.conf.in b/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.conf.in index 98f99d1..ffe5f93 100644 --- a/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.conf.in +++ b/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.conf.in @@ -15,8 +15,7 @@ PKG_LOG_DIR="@PKG_LOG_DIR@" PKG_STATE_DIR="@PKG_STATE_DIR@" PKG_DATA_DIR="@PKG_DATA_DIR@" -PKG_JBOSS_MODULES="@PKG_JBOSS_MODULES@" -JBOSS_HOME="@JBOSS_HOME@" +PKG_JAVA_LIB="@PKG_JAVA_LIB@" # # Daemon settings @@ -67,16 +66,6 @@ # Extra Java arguments to be added to command-line. # DWH_JVM_ARGS="" - -# -# Module path -# -# Colon separated list of paths. -# -# JBoss is always appended, cannot be appended here -# as it may be resolved to different value. -# -DWH_JAVA_MODULEPATH="${PKG_JBOSS_MODULES}" # # dwh version diff --git a/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py b/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py index 12b3712..3c6750b 100755 --- a/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py +++ b/packaging/services/ovirt-engine-dwhd/ovirt-engine-dwhd.py @@ -46,17 +46,7 @@ def _checkInstallation( self, pidfile, - jbossModulesJar, ): - # Check the required JBoss directories and files: - self.check( - name=self._config.get('JBOSS_HOME'), - directory=True, - ) - self.check( - name=jbossModulesJar, - ) - # Check the required directories and files: self.check( os.path.join( @@ -69,6 +59,12 @@ self._config.get('PKG_LOG_DIR'), directory=True, writable=True, + ) + self.check( + os.path.join( + self._config.get('PKG_JAVA_LIB'), + 'historyETL.jar', + ), ) for log in ('ovirt-engine-dwhd.log',): self.check( @@ -119,14 +115,8 @@ 'java', ) - jbossModulesJar = os.path.join( - self._config.get('JBOSS_HOME'), - 'jboss-modules.jar', - ) - self._checkInstallation( pidfile=self.pidfile, - jbossModulesJar=jbossModulesJar, ) self._tempDir = service.TempDir() @@ -150,7 +140,6 @@ self._serviceArgs = [ 'ovirt-engine-dwhd', - '-Djboss.modules.write-indexes=false', '-Dorg.ovirt.engine.dwh.settings=%s' % settings, ] @@ -183,9 +172,11 @@ ]) self._serviceArgs.extend([ - '-jar', jbossModulesJar, - '-dependencies', 'org.ovirt.engine.dwh', - '-class', 'ovirt_engine_dwh.historyetl_3_4.HistoryETL', + '-classpath', os.path.join( + self._config.get('PKG_JAVA_LIB'), + '*', + ), + 'ovirt_engine_dwh.historyetl_3_4.HistoryETL', '--context=Default', ]) @@ -197,14 +188,6 @@ ), 'LANG': 'en_US.UTF-8', 'LC_ALL': 'en_US.UTF-8', - 'CLASSPATH': '', - 'JAVA_MODULEPATH': '%s:%s' % ( - self._config.get('DWH_JAVA_MODULEPATH'), - os.path.join( - self._config.get('JBOSS_HOME'), - 'modules', - ) - ), }) def daemonStdHandles(self): diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/__init__.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/__init__.py index 630751a..12a7b85 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/__init__.py +++ b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/__init__.py @@ -20,7 +20,6 @@ from . import config -from . import jboss from . import misc from . import service @@ -28,7 +27,6 @@ @util.export def createPlugins(context): config.Plugin(context=context) - jboss.Plugin(context=context) misc.Plugin(context=context) service.Plugin(context=context) diff --git a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/jboss.py b/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/jboss.py deleted file mode 100644 index 68cdc35..0000000 --- a/packaging/setup/plugins/ovirt-engine-setup/ovirt-engine-dwh/core/jboss.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# ovirt-engine-setup -- ovirt engine setup -# Copyright (C) 2013 Red Hat, Inc. -# -# Licensed 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. -# - - -"""Jboss plugin.""" - - -import gettext -_ = lambda m: gettext.dgettext(message=m, domain='ovirt-engine-dwh') - - -from otopi import constants as otopicons -from otopi import util -from otopi import filetransaction -from otopi import plugin - - -from ovirt_engine_setup import constants as osetupcons -from ovirt_engine_setup import dwhconstants as odwhcons - - [email protected] -class Plugin(plugin.PluginBase): - """JBoss plugin.""" - - def __init__(self, context): - super(Plugin, self).__init__(context=context) - - @plugin.event( - stage=plugin.Stages.STAGE_MISC, - ) - def _misc(self): - uninstall_files = [] - self.environment[ - osetupcons.CoreEnv.REGISTER_UNINSTALL_GROUPS - ].addFiles( - group='ovirt_dwh_files', - fileList=uninstall_files, - ) - self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( - filetransaction.FileTransaction( - name=( - odwhcons.FileLocations. - OVIRT_ENGINE_DWHD_SERVICE_CONFIG_JBOSS - ), - content=[ - 'JBOSS_HOME="{jbossHome}"'.format( - jbossHome=self.environment[ - osetupcons.ConfigEnv.JBOSS_HOME - ], - ), - ], - modifiedList=uninstall_files, - ) - ) - - -# vim: expandtab tabstop=4 shiftwidth=4 diff --git a/pom.xml b/pom.xml deleted file mode 100644 index b776912..0000000 --- a/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ -<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/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>root</artifactId> - <version>3.4.0</version> - <packaging>pom</packaging> - - <name>oVirt Engine DWH Root Project</name> - - <modules> - <module>build-tools-root</module> - <module>ovirt-engine-dwh</module> - </modules> - - <properties> - <!-- dependency versions --> - <ovirt-dwh.version>3.4.0</ovirt-dwh.version> - <version.commons-collections>3.2.1</version.commons-collections> - <version.dom4j>1.6.1</version.dom4j> - <postgres.jdbc.version>9.1-901-1.jdbc4</postgres.jdbc.version> - <version.dependency-plugin>2.4</version.dependency-plugin> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - </properties> - - <build> - <pluginManagement> - <plugins> - - <!-- Make sure that the goal that generates JBoss modules is - automatically executed in the package phase of any project - that uses the plugin: --> - <plugin> - <groupId>org.ovirt.engine.dwh</groupId> - <artifactId>jboss-modules-maven-plugin</artifactId> - <version>1.0-SNAPSHOT</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>jboss-modules</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </pluginManagement> - </build> - - <!-- ====================================================================== --> - <!-- Needed for MEAD, which runs 'mvn deploy -DaltDeploymentRepository=..' --> - <!-- and gets an error if there is no distributionManagement section --> - <!-- ====================================================================== --> - <distributionManagement> - <repository> - <id>dummy</id> - <name>Dummy Repo</name> - <url>scp://dummy.org/dummy</url> - <layout>default</layout> - </repository> - </distributionManagement> -</project> diff --git a/version.mak b/version.mak index 858fa35..5a9761a 100644 --- a/version.mak +++ b/version.mak @@ -4,7 +4,7 @@ # Fix release is manually specified, # increment after releasing/branching -FIX_RELEASE=0 +VERSION=3.4.0 # Milestone is manually specified, # example for ordering: -- To view, visit http://gerrit.ovirt.org/24142 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I39550f694d7e8c37bbe189c1b9bfd944a5dad2e0 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-dwh Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
