From 603c10502ec19e1f4779b6ad2d355cbad3890616 Mon Sep 17 00:00:00 2001 From: Malte Brunnlieb Date: Fri, 14 Apr 2023 08:55:11 +0200 Subject: [PATCH] cleanup and fixing eclipse import issues with m2e --- build.sh | 2 +- cobigen-eclipse/cobigen-eclipse-test/pom.xml | 7 +++-- .../src/main/targlets/2018-12.target | 29 ------------------- .../impl/extension/PluginRegistry.java | 10 +++++-- pom.xml | 14 --------- 5 files changed, 12 insertions(+), 50 deletions(-) delete mode 100644 cobigen-eclipse/cobigen-eclipse-test/src/main/targlets/2018-12.target diff --git a/build.sh b/build.sh index 2c4be6459d..c782958ca3 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -source "$(dirname "${0}")"/functions.sh +source "$(dirname ${0})/functions.sh" echo "" echo "##########################################" diff --git a/cobigen-eclipse/cobigen-eclipse-test/pom.xml b/cobigen-eclipse/cobigen-eclipse-test/pom.xml index 909c623f91..7cebbd3042 100644 --- a/cobigen-eclipse/cobigen-eclipse-test/pom.xml +++ b/cobigen-eclipse/cobigen-eclipse-test/pom.xml @@ -13,7 +13,8 @@ - ${surefireArgLineIntegration} -Xms512m -Xmx2048m -XX:+DisableExplicitGC + ${surefireArgLineIntegration} -Xms512m -Xmx2048m + -XX:+DisableExplicitGC true @@ -120,8 +121,8 @@ ${project.groupId} cobigen-eclipse-releng - ${revision} - ../cobigen-eclipse-releng/pom.xml + ${revision} + ../cobigen-eclipse-releng/pom.xml diff --git a/cobigen-eclipse/cobigen-eclipse-test/src/main/targlets/2018-12.target b/cobigen-eclipse/cobigen-eclipse-test/src/main/targlets/2018-12.target deleted file mode 100644 index 3f84425f0b..0000000000 --- a/cobigen-eclipse/cobigen-eclipse-test/src/main/targlets/2018-12.target +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/extension/PluginRegistry.java b/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/extension/PluginRegistry.java index d54210dfc9..b5067d9884 100644 --- a/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/extension/PluginRegistry.java +++ b/cobigen/cobigen-core/src/main/java/com/devonfw/cobigen/impl/extension/PluginRegistry.java @@ -1,5 +1,6 @@ package com.devonfw.cobigen.impl.extension; +import java.lang.reflect.InvocationTargetException; import java.nio.file.Path; import java.util.Arrays; import java.util.HashMap; @@ -39,7 +40,9 @@ public class PluginRegistry { private static Map registeredTriggerInterpreter = Maps . newHashMap(); - /** Currently registered {@link TriggerInterpreter}s mapped by their supporting file extensions */ + /** + * Currently registered {@link TriggerInterpreter}s mapped by their supporting file extensions + */ private static Multimap registeredTriggerInterpreterByFileExtension = HashMultimap . create(); @@ -63,7 +66,7 @@ public class PluginRegistry { private static GeneratorPluginActivator loadPlugin(Class generatorPlugin) { try { - Object plugin = generatorPlugin.newInstance(); + Object plugin = generatorPlugin.getDeclaredConstructor().newInstance(); LOG.info("Register CobiGen Plug-in '{}'.", generatorPlugin.getCanonicalName()); if (plugin instanceof GeneratorPluginActivator) { // Collect Mergers @@ -87,7 +90,8 @@ private static GeneratorPluginActivator loa GeneratorPluginActivator.class.getCanonicalName()); return null; } - } catch (InstantiationException | IllegalAccessException e) { + } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException + | NoSuchMethodException | SecurityException e) { throw new CobiGenRuntimeException( "Could not intantiate CobiGen Plug-in '" + generatorPlugin.getCanonicalName() + "'.", e); } diff --git a/pom.xml b/pom.xml index e0f14f7dbf..2b44855a7c 100644 --- a/pom.xml +++ b/pom.xml @@ -514,20 +514,6 @@ - - - org.codehaus.mojo - build-helper-maven-plugin - [1.12,) - - regex-property - add-source - - - - - - org.commonjava.maven.plugins