From 2f397d7c95424469b8d1049442765031baf7f878 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Thu, 23 Jul 2020 23:40:33 +0200 Subject: [tests] only add agent VM args for ECJ/Eclipse tests --- .../lombok/eclipseCreate/CreateEclipseDebugTarget.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/support/lombok/eclipseCreate/CreateEclipseDebugTarget.java b/src/support/lombok/eclipseCreate/CreateEclipseDebugTarget.java index f004f521..e5e48c49 100644 --- a/src/support/lombok/eclipseCreate/CreateEclipseDebugTarget.java +++ b/src/support/lombok/eclipseCreate/CreateEclipseDebugTarget.java @@ -127,12 +127,14 @@ public class CreateEclipseDebugTarget { launchContent.append("\t\n"); launchContent.append("\t\n"); launchContent.append("\t\n"); - launchContent.append(" entry : args.entrySet()) { - if (!entry.getKey().startsWith("conf.")) continue; - launchContent.append(File.pathSeparator).append(entry.getValue()); + if (getArgBoolean("shadowLoaderBased")) { + launchContent.append(" entry : args.entrySet()) { + if (!entry.getKey().startsWith("conf.")) continue; + launchContent.append(File.pathSeparator).append(entry.getValue()); + } + if (bootpath != null) launchContent.append(" -Ddelombok.bootclasspath=" + bootpath); } - if (bootpath != null) launchContent.append(" -Ddelombok.bootclasspath=" + bootpath); launchContent.append("\"/>\n\n"); } @@ -164,6 +166,7 @@ public class CreateEclipseDebugTarget { System.err.println("CreateEclipseDebugTarget\n" + " name=Lombok-test BaseJavac 11 # Sets the name of the debug target to make\n" + " testType=lombok.RunJavacAndBaseTests # The test class file that this debug target should run\n" + + " shadowLoaderBased # Add the VM options to use lombok as an agent and pass the classpath to the shadow loader. Needed for ECJ/Eclipse.\n" + " conf.test=foo:bar:baz # Where 'test' is an ivy conf name, and 'foo' is a path to a jar, relativized vs. current directory.\n" + " favorite # Should the debug target be marked as favourite?\n" + ""); -- cgit