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 --- buildScripts/create-eclipse-project.ant.xml | 3 +++ .../lombok/eclipseCreate/CreateEclipseDebugTarget.java | 13 ++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/buildScripts/create-eclipse-project.ant.xml b/buildScripts/create-eclipse-project.ant.xml index 67eff3bc..513ffe8f 100644 --- a/buildScripts/create-eclipse-project.ant.xml +++ b/buildScripts/create-eclipse-project.ant.xml @@ -82,6 +82,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede + @@ -163,6 +164,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede + @@ -198,6 +200,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede + 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