mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-16 12:15:30 +00:00
[tests] only add agent VM args for ECJ/Eclipse tests
This commit is contained in:
2 files changed
+11
-5
No files matched your search
@@ -82,6 +82,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
|
||||
</classpath>
|
||||
<arg value="name=Lombok-test Eclipse-202006" />
|
||||
<arg value="testType=lombok.TestEclipse" />
|
||||
<arg value="shadowLoaderBased" />
|
||||
<arg value="jvmTarget=1.8" />
|
||||
<arg value="bootpath=${jdk8-rt.loc}" />
|
||||
<arg value="conf.test=${cp.test}" />
|
||||
@@ -163,6 +164,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
|
||||
</classpath>
|
||||
<arg value="name=Lombok-test Eclipse-${inputs.eclipsetarget}" />
|
||||
<arg value="testType=lombok.TestEclipse" />
|
||||
<arg value="shadowLoaderBased" />
|
||||
<arg value="jvmTarget=${inputs.jvmtarget}" />
|
||||
<arg value="bootpath=${inputs.bootpath}" />
|
||||
<arg value="conf.test=${cp.test}" />
|
||||
@@ -198,6 +200,7 @@ This buildfile is part of projectlombok.org. It creates the infrastructure neede
|
||||
</classpath>
|
||||
<arg value="name=Lombok-test ECJ${inputs.ecjtarget}" />
|
||||
<arg value="testType=lombok.TestEclipse" />
|
||||
<arg value="shadowLoaderBased" />
|
||||
<arg value="jvmTarget=${inputs.jvmtarget}" />
|
||||
<arg value="bootpath=${inputs.bootpath}" />
|
||||
<arg value="conf.test=${cp.test}" />
|
||||
|
||||
@@ -127,12 +127,14 @@ public class CreateEclipseDebugTarget {
|
||||
launchContent.append("\t<stringAttribute key=\"org.eclipse.jdt.launching.MAIN_TYPE\" value=\"").append(type).append("\"/>\n");
|
||||
launchContent.append("\t<listAttribute key=\"org.eclipse.jdt.launching.MODULEPATH\"/>\n");
|
||||
launchContent.append("\t<stringAttribute key=\"org.eclipse.jdt.launching.PROJECT_ATTR\" value=\"lombok\"/>\n");
|
||||
launchContent.append("<stringAttribute key=\"org.eclipse.jdt.launching.VM_ARGUMENTS\" value=\"-javaagent:dist/lombok.jar -Dshadow.override.lombok=${project_loc:lombok}/bin");
|
||||
for (Map.Entry<String, String> entry : args.entrySet()) {
|
||||
if (!entry.getKey().startsWith("conf.")) continue;
|
||||
launchContent.append(File.pathSeparator).append(entry.getValue());
|
||||
if (getArgBoolean("shadowLoaderBased")) {
|
||||
launchContent.append("<stringAttribute key=\"org.eclipse.jdt.launching.VM_ARGUMENTS\" value=\"-javaagent:dist/lombok.jar -Dshadow.override.lombok=${project_loc:lombok}/bin");
|
||||
for (Map.Entry<String, String> 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</launchConfiguration>\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" +
|
||||
"");
|
||||
|
||||
Reference in new issue
Block a user