From 57e151a782dedf65cfc25cbc06030f45a7dc32c6 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 1 Jul 2021 11:10:02 +0200 Subject: [qemu] Disable build of runvirt plugin without packaged dependencies --- core/modules/qemu/module.build | 2 +- core/modules/qemu/runvirt-plugin-qemu/pom.xml | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/core/modules/qemu/module.build b/core/modules/qemu/module.build index d2ccb921..6a980dd9 100644 --- a/core/modules/qemu/module.build +++ b/core/modules/qemu/module.build @@ -14,7 +14,7 @@ build() { mvn -f "${build_dir}" clean package || perror "Could not build runvirt-plugin-qemu with Maven!" # install qemu runvirt plugin - local build_artifact_filename="runvirt-plugin-qemu-1.0-SNAPSHOT.jar" + local build_artifact_filename="runvirt-plugin-qemu-1.0-SNAPSHOT-jar-with-dependencies.jar" local install_dir="${MODULE_BUILD_DIR}/opt/openslx/vmchooser/plugins/qemu" local install_filename="runvirt-plugin-qemu.jar" mkdir -p "${install_dir}" diff --git a/core/modules/qemu/runvirt-plugin-qemu/pom.xml b/core/modules/qemu/runvirt-plugin-qemu/pom.xml index 36f62796..d96bb555 100644 --- a/core/modules/qemu/runvirt-plugin-qemu/pom.xml +++ b/core/modules/qemu/runvirt-plugin-qemu/pom.xml @@ -135,6 +135,16 @@ maven-failsafe-plugin 2.22.1 + + maven-jar-plugin + 2.4 + + + default-jar + none + + + maven-assembly-plugin -- cgit v1.2.3-55-g7522 From 5b3aa18006ff33b481aba973b6696eeb12e4db31 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 1 Jul 2021 11:28:51 +0200 Subject: [qemu] Enable Java compiler warnings --- core/modules/qemu/runvirt-plugin-qemu/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/modules/qemu/runvirt-plugin-qemu/pom.xml b/core/modules/qemu/runvirt-plugin-qemu/pom.xml index d96bb555..9450ef81 100644 --- a/core/modules/qemu/runvirt-plugin-qemu/pom.xml +++ b/core/modules/qemu/runvirt-plugin-qemu/pom.xml @@ -126,6 +126,11 @@ maven-compiler-plugin 3.8.0 + + ${maven.compiler.source} + ${maven.compiler.target} + -Xlint:all + maven-surefire-plugin -- cgit v1.2.3-55-g7522 From a19ba3c3209624acd0ed66613d6394945f58d8e8 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Thu, 1 Jul 2021 11:30:18 +0200 Subject: [qemu] Handle 'NullPointerException' if config filenames are missing --- .../src/main/java/org/openslx/runvirt/plugin/qemu/App.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java index 5ea7b720..c9d47f5e 100644 --- a/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java +++ b/core/modules/qemu/runvirt-plugin-qemu/src/main/java/org/openslx/runvirt/plugin/qemu/App.java @@ -113,7 +113,8 @@ public class App try { final File xmlInputFile = new File( xmlInputFileName ); config = new Domain( xmlInputFile ); - } catch ( LibvirtXmlDocumentException | LibvirtXmlSerializationException | LibvirtXmlValidationException e ) { + } catch ( NullPointerException | LibvirtXmlDocumentException | LibvirtXmlSerializationException + | LibvirtXmlValidationException e ) { LOGGER.error( "Failed to read VM input configuration file: " + e.getLocalizedMessage() ); hypervisor.close(); System.exit( 3 ); @@ -159,7 +160,7 @@ public class App try { final File xmlOutputFile = new File( xmlOutputFileName ); config.toXml( xmlOutputFile ); - } catch ( LibvirtXmlSerializationException e ) { + } catch ( NullPointerException | LibvirtXmlSerializationException e ) { LOGGER.error( "Failed to write VM output configuration file: " + e.getLocalizedMessage() ); hypervisor.close(); System.exit( 5 ); -- cgit v1.2.3-55-g7522