diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc index 76d5319843b..e435d6a50fc 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/packaging.adoc @@ -85,7 +85,8 @@ By default, the executable archive's main class will be configured automatically looking for a class with a `public static void main(String[])` method in directories on the task's classpath. -The main class can also be configured explicitly using the task's `mainClass` property: +The main class can also be configured explicitly using the task's `mainClassName` +property: [source,groovy,indent=0,subs="verbatim"] ---- diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/running.adoc b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/running.adoc index 419fd60b43c..c4f2c65dedd 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/running.adoc +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/asciidoc/running.adoc @@ -11,8 +11,8 @@ To run your application without first building an archive use the `bootRun` task The `bootRun` task is automatically configured to use the runtime classpath of the main source set. By default, the main class will be discovered by looking for a class with a `public static void main(String[])` method in directories on the task's -classpath. The main class can also be configured explicitly using the task's `main` -property: +classpath. The main class can also be configured explicitly using the task's +`mainClassName` property: [source,groovy,indent=0,subs="verbatim"] ---- diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-and-jar.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-and-jar.gradle index c96b34d52f9..435c9def488 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-and-jar.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-and-jar.gradle @@ -20,5 +20,5 @@ bootJar { // end::classifier[] bootJar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-custom-launch-script.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-custom-launch-script.gradle index 9bfd8d6cb69..73eacd983e5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-custom-launch-script.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-custom-launch-script.gradle @@ -8,7 +8,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'java' bootJar { - mainClass 'com.example.ExampleApplication' + mainClassName 'com.example.ExampleApplication' } // tag::custom-launch-script[] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-include-launch-script.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-include-launch-script.gradle index df09f842dec..6a9467263b7 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-include-launch-script.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-include-launch-script.gradle @@ -8,7 +8,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'java' bootJar { - mainClass 'com.example.ExampleApplication' + mainClassName 'com.example.ExampleApplication' } // tag::include-launch-script[] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-launch-script-properties.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-launch-script-properties.gradle index dd1aec1cc64..c84490bde6d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-launch-script-properties.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-launch-script-properties.gradle @@ -8,7 +8,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'java' bootJar { - mainClass 'com.example.ExampleApplication' + mainClassName 'com.example.ExampleApplication' } // tag::launch-script-properties[] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-main-class.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-main-class.gradle index b3ce53b9ec7..6e2784494b0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-main-class.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-main-class.gradle @@ -9,6 +9,6 @@ apply plugin: 'java' // tag::main-class[] bootJar { - mainClass = 'com.example.ExampleApplication' + mainClassName = 'com.example.ExampleApplication' } // end::main-class[] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-requires-unpack.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-requires-unpack.gradle index e21da8d831e..e7806982a79 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-requires-unpack.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-jar-requires-unpack.gradle @@ -16,7 +16,7 @@ dependencies { } bootJar { - mainClass 'com.example.ExampleApplication' + mainClassName 'com.example.ExampleApplication' } // tag::requires-unpack[] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-include-devtools.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-include-devtools.gradle index a739250d3bc..660bb2ac015 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-include-devtools.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-include-devtools.gradle @@ -8,7 +8,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'war' bootWar { - mainClass 'com.example.ExampleApplication' + mainClassName 'com.example.ExampleApplication' classpath file('spring-boot-devtools-1.2.3.RELEASE.jar') } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-properties-launcher.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-properties-launcher.gradle index a2d915d9051..8fb7deb3e5b 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-properties-launcher.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/packaging/boot-war-properties-launcher.gradle @@ -8,7 +8,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'war' bootWar { - mainClass 'com.example.ExampleApplication' + mainClassName 'com.example.ExampleApplication' } // tag::properties-launcher[] diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/application-plugin-main-class-name.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/application-plugin-main-class-name.gradle index 6e05ceaa3df..049a0b6b30c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/application-plugin-main-class-name.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/application-plugin-main-class-name.gradle @@ -14,6 +14,6 @@ mainClassName = 'com.example.ExampleApplication' task configuredMainClass { doLast { - println bootRun.main + println bootRun.mainClassName } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/boot-run-main.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/boot-run-main.gradle index 82907a4c4e0..6a9028aa463 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/boot-run-main.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/gradle/running/boot-run-main.gradle @@ -9,12 +9,12 @@ apply plugin: 'java' // tag::main[] bootRun { - main = 'com.example.ExampleApplication' + mainClassName = 'com.example.ExampleApplication' } // end::main[] task configuredMainClass { doLast { - println bootRun.main + println bootRun.mainClassName } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java index 89269d7710c..4c1a40ac3d3 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java @@ -87,7 +87,7 @@ final class JavaPluginAction implements PluginApplicationAction { .getByName(SourceSet.MAIN_SOURCE_SET_NAME); return mainSourceSet.getRuntimeClasspath(); }); - bootJar.conventionMapping("mainClass", + bootJar.conventionMapping("mainClassName", new MainClassConvention(project, bootJar::getClasspath)); return bootJar; } @@ -112,7 +112,7 @@ final class JavaPluginAction implements PluginApplicationAction { } return Collections.emptyList(); })); - run.setMain( + run.setMainClassName( project.provider(new MainClassConvention(project, run::getClasspath))); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/WarPluginAction.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/WarPluginAction.java index 8619bd90b1e..2c4c7f10efe 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/WarPluginAction.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/WarPluginAction.java @@ -55,7 +55,7 @@ class WarPluginAction implements PluginApplicationAction { bootWar.providedClasspath(providedRuntimeConfiguration(project)); ArchivePublishArtifact artifact = new ArchivePublishArtifact(bootWar); this.singlePublishedArtifact.addCandidate(artifact); - bootWar.conventionMapping("mainClass", + bootWar.conventionMapping("mainClassName", new MainClassConvention(project, bootWar::getClasspath)); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchive.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchive.java index d2facdc820c..c82b6a461c2 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchive.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchive.java @@ -35,20 +35,20 @@ import org.gradle.api.tasks.Optional; public interface BootArchive extends Task { /** - * Returns the main class of the application. + * Returns the name of the main class of the application. * - * @return the main class + * @return the main class name */ @Input @Optional - String getMainClass(); + String getMainClassName(); /** - * Sets the main class of the application. + * Sets the name of the main class of the application. * - * @param mainClass the main class of the application + * @param mainClassName the name of the main class of the application */ - void setMainClass(String mainClass); + void setMainClassName(String mainClassName); /** * Adds Ant-style patterns that identify files that must be unpacked from the archive diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java index a88437e31e2..7e31cf4faf5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootArchiveSupport.java @@ -73,10 +73,10 @@ class BootArchiveSupport { configureExclusions(); } - void configureManifest(Jar jar, String mainClass) { + void configureManifest(Jar jar, String mainClassName) { Attributes attributes = jar.getManifest().getAttributes(); attributes.putIfAbsent("Main-Class", this.loaderMainClass); - attributes.putIfAbsent("Start-Class", mainClass); + attributes.putIfAbsent("Start-Class", mainClassName); } CopyAction createCopyAction(Jar jar) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java index 17cce41b4be..7cc5e93c1a7 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootJar.java @@ -42,7 +42,7 @@ public class BootJar extends Jar implements BootArchive { private FileCollection classpath; - private String mainClass; + private String mainClassName; /** * Creates a new {@code BootJar} task. @@ -63,7 +63,7 @@ public class BootJar extends Jar implements BootArchive { @Override public void copy() { - this.support.configureManifest(this, getMainClass()); + this.support.configureManifest(this, getMainClassName()); super.copy(); } @@ -73,13 +73,13 @@ public class BootJar extends Jar implements BootArchive { } @Override - public String getMainClass() { - return this.mainClass; + public String getMainClassName() { + return this.mainClassName; } @Override - public void setMainClass(String mainClass) { - this.mainClass = mainClass; + public void setMainClassName(String mainClassName) { + this.mainClassName = mainClassName; } @Override diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java index 76da1058eb8..af851011eff 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/BootWar.java @@ -41,7 +41,7 @@ public class BootWar extends War implements BootArchive { private final BootArchiveSupport support = new BootArchiveSupport( "org.springframework.boot.loader.WarLauncher", this::resolveZipCompression); - private String mainClass; + private String mainClassName; private FileCollection providedClasspath; @@ -57,7 +57,7 @@ public class BootWar extends War implements BootArchive { @Override public void copy() { - this.support.configureManifest(this, getMainClass()); + this.support.configureManifest(this, getMainClassName()); super.copy(); } @@ -67,13 +67,13 @@ public class BootWar extends War implements BootArchive { } @Override - public String getMainClass() { - return this.mainClass; + public String getMainClassName() { + return this.mainClassName; } @Override - public void setMainClass(String mainClass) { - this.mainClass = mainClass; + public void setMainClassName(String mainClass) { + this.mainClassName = mainClass; } @Override diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java index a770e0fd085..29af82967c5 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/run/BootRun.java @@ -40,7 +40,7 @@ import org.gradle.process.JavaExecSpec; */ public class BootRun extends DefaultTask { - private final PropertyState main = getProject().property(String.class); + private final PropertyState mainClassName = getProject().property(String.class); @SuppressWarnings("unchecked") private final PropertyState> jvmArgs = (PropertyState>) (Object) getProject() @@ -85,26 +85,26 @@ public class BootRun extends DefaultTask { * Returns the name of the main class to be run. * @return the main class name or {@code null} */ - public String getMain() { - return this.main.getOrNull(); + public String getMainClassName() { + return this.mainClassName.getOrNull(); } /** - * Sets the main class to be executed using the given {@code mainProvider}. + * Sets the name of the main class to be executed using the given {@code mainClassNameProvider}. * - * @param mainProvider provider of the main class name + * @param mainClassNameProvider provider of the main class name */ - public void setMain(Provider mainProvider) { - this.main.set(mainProvider); + public void setMainClassName(Provider mainClassNameProvider) { + this.mainClassName.set(mainClassNameProvider); } /** - * Sets the main class to be run. + * Sets the name of the main class to be run. * - * @param main the main class name + * @param mainClassName the main class name */ - public void setMain(String main) { - this.main.set(main); + public void setMainClassName(String mainClassName) { + this.mainClassName.set(mainClassName); } /** @@ -171,7 +171,7 @@ public class BootRun extends DefaultTask { public void run() { getProject().javaexec((spec) -> { spec.classpath(this.classpath); - spec.setMain(this.main.getOrNull()); + spec.setMain(this.mainClassName.getOrNull()); if (this.jvmArgs.isPresent()) { spec.setJvmArgs(this.jvmArgs.get()); } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java index 47071cc9933..049bb0302d8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/AbstractBootArchiveTests.java @@ -89,7 +89,7 @@ public abstract class AbstractBootArchiveTests { @Test public void basicArchiveCreation() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.execute(); assertThat(this.task.getArchivePath().exists()); try (JarFile jarFile = new JarFile(this.task.getArchivePath())) { @@ -102,7 +102,7 @@ public abstract class AbstractBootArchiveTests { @Test public void classpathJarsArePackagedBeneathLibPath() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.classpath(this.temp.newFile("one.jar"), this.temp.newFile("two.jar")); this.task.execute(); try (JarFile jarFile = new JarFile(this.task.getArchivePath())) { @@ -113,7 +113,7 @@ public abstract class AbstractBootArchiveTests { @Test public void classpathFoldersArePackagedBeneathClassesPath() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); File classpathFolder = this.temp.newFolder(); File applicationClass = new File(classpathFolder, "com/example/Application.class"); @@ -130,7 +130,7 @@ public abstract class AbstractBootArchiveTests { @Test public void loaderIsWrittenToTheRootOfTheJar() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.execute(); try (JarFile jarFile = new JarFile(this.task.getArchivePath())) { assertThat(jarFile.getEntry( @@ -143,7 +143,7 @@ public abstract class AbstractBootArchiveTests { @Test public void loaderIsWrittenToTheRootOfTheJarWhenUsingThePropertiesLauncher() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.execute(); this.task.getManifest().getAttributes().put("Main-Class", "org.springframework.boot.loader.PropertiesLauncher"); @@ -157,7 +157,7 @@ public abstract class AbstractBootArchiveTests { @Test public void unpackCommentIsAddedToEntryIdentifiedByAPattern() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.classpath(this.temp.newFile("one.jar"), this.temp.newFile("two.jar")); this.task.requiresUnpack("**/one.jar"); this.task.execute(); @@ -170,7 +170,7 @@ public abstract class AbstractBootArchiveTests { @Test public void unpackCommentIsAddedToEntryIdentifiedByASpec() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.classpath(this.temp.newFile("one.jar"), this.temp.newFile("two.jar")); this.task.requiresUnpack((element) -> element.getName().endsWith("two.jar")); this.task.execute(); @@ -183,7 +183,7 @@ public abstract class AbstractBootArchiveTests { @Test public void launchScriptCanBePrepended() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.launchScript(); this.task.execute(); assertThat(Files.readAllBytes(this.task.getArchivePath().toPath())) @@ -200,7 +200,7 @@ public abstract class AbstractBootArchiveTests { @Test public void customLaunchScriptCanBePrepended() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); File customScript = this.temp.newFile("custom.script"); Files.write(customScript.toPath(), Arrays.asList("custom script"), StandardOpenOption.CREATE); @@ -212,7 +212,7 @@ public abstract class AbstractBootArchiveTests { @Test public void launchScriptPropertiesAreReplaced() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.launchScript((configuration) -> configuration.getProperties() .put("initInfoProvides", "test property value")); this.task.execute(); @@ -222,7 +222,7 @@ public abstract class AbstractBootArchiveTests { @Test public void customMainClassInTheManifestIsHonored() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.getManifest().getAttributes().put("Main-Class", "com.example.CustomLauncher"); this.task.execute(); @@ -240,7 +240,7 @@ public abstract class AbstractBootArchiveTests { @Test public void customStartClassInTheManifestIsHonored() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.getManifest().getAttributes().put("Start-Class", "com.example.CustomMain"); this.task.execute(); @@ -255,7 +255,7 @@ public abstract class AbstractBootArchiveTests { @Test public void fileTimestampPreservationCanBeDisabled() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.setPreserveFileTimestamps(false); this.task.execute(); assertThat(this.task.getArchivePath().exists()); @@ -271,7 +271,7 @@ public abstract class AbstractBootArchiveTests { @Test public void reproducibleOrderingCanBeEnabled() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.from(this.temp.newFile("bravo.txt"), this.temp.newFile("alpha.txt"), this.temp.newFile("charlie.txt")); this.task.setReproducibleFileOrder(true); @@ -292,7 +292,7 @@ public abstract class AbstractBootArchiveTests { @Test public void devtoolsJarIsExcludedByDefault() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.classpath(this.temp.newFile("spring-boot-devtools-0.1.2.jar")); this.task.execute(); assertThat(this.task.getArchivePath().exists()); @@ -304,7 +304,7 @@ public abstract class AbstractBootArchiveTests { @Test public void devtoolsJarCanBeIncluded() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.classpath(this.temp.newFile("spring-boot-devtools-0.1.2.jar")); this.task.setExcludeDevtools(false); this.task.execute(); @@ -317,7 +317,7 @@ public abstract class AbstractBootArchiveTests { @Test public void allEntriesUseUnixPlatformAndUtf8NameEncoding() throws IOException { - this.task.setMainClass("com.example.Main"); + this.task.setMainClassName("com.example.Main"); this.task.setMetadataCharset("UTF-8"); File classpathFolder = this.temp.newFolder(); File resource = new File(classpathFolder, "some-resource.xml"); diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootWarTests.java b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootWarTests.java index d61c8a622b4..7eb999e5c2d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootWarTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/tasks/bundling/BootWarTests.java @@ -38,7 +38,7 @@ public class BootWarTests extends AbstractBootArchiveTests { @Test public void providedClasspathJarsArePackagedInWebInfLibProvided() throws IOException { - getTask().setMainClass("com.example.Main"); + getTask().setMainClassName("com.example.Main"); getTask().providedClasspath(this.temp.newFile("one.jar"), this.temp.newFile("two.jar")); getTask().execute(); @@ -51,7 +51,7 @@ public class BootWarTests extends AbstractBootArchiveTests { @Test public void devtoolsJarIsExcludedByDefaultWhenItsOnTheProvidedClasspath() throws IOException { - getTask().setMainClass("com.example.Main"); + getTask().setMainClassName("com.example.Main"); getTask().providedClasspath(this.temp.newFile("spring-boot-devtools-0.1.2.jar")); getTask().execute(); assertThat(getTask().getArchivePath().exists()); @@ -65,7 +65,7 @@ public class BootWarTests extends AbstractBootArchiveTests { @Test public void devtoolsJarCanBeIncludedWhenItsOnTheProvidedClasspath() throws IOException { - getTask().setMainClass("com.example.Main"); + getTask().setMainClassName("com.example.Main"); getTask().providedClasspath(this.temp.newFile("spring-boot-devtools-0.1.2.jar")); getTask().setExcludeDevtools(false); getTask().execute(); @@ -85,7 +85,7 @@ public class BootWarTests extends AbstractBootArchiveTests { orgFolder.mkdir(); new File(orgFolder, "foo.txt").createNewFile(); getTask().from(webappFolder); - getTask().setMainClass("com.example.Main"); + getTask().setMainClassName("com.example.Main"); getTask().execute(); assertThat(getTask().getArchivePath().exists()); try (JarFile jarFile = new JarFile(getTask().getArchivePath())) { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForJarCanBeBuilt.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForJarCanBeBuilt.gradle index ed26697d0ef..3f06faff0e9 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForJarCanBeBuilt.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForJarCanBeBuilt.gradle @@ -9,5 +9,5 @@ apply plugin: 'application' apply plugin: 'java' bootJar { - mainClass = 'com.example.ExampleApplication' + mainClassName = 'com.example.ExampleApplication' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForWarCanBeBuilt.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForWarCanBeBuilt.gradle index aa4a2a76334..d1c91f3bdaa 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForWarCanBeBuilt.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-tarDistributionForWarCanBeBuilt.gradle @@ -9,5 +9,5 @@ apply plugin: 'application' apply plugin: 'war' bootWar { - mainClass = 'com.example.ExampleApplication' + mainClassName = 'com.example.ExampleApplication' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForJarCanBeBuilt.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForJarCanBeBuilt.gradle index ed26697d0ef..3f06faff0e9 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForJarCanBeBuilt.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForJarCanBeBuilt.gradle @@ -9,5 +9,5 @@ apply plugin: 'application' apply plugin: 'java' bootJar { - mainClass = 'com.example.ExampleApplication' + mainClassName = 'com.example.ExampleApplication' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForWarCanBeBuilt.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForWarCanBeBuilt.gradle index aa4a2a76334..d1c91f3bdaa 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForWarCanBeBuilt.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/ApplicationPluginActionIntegrationTests-zipDistributionForWarCanBeBuilt.gradle @@ -9,5 +9,5 @@ apply plugin: 'application' apply plugin: 'war' bootWar { - mainClass = 'com.example.ExampleApplication' + mainClassName = 'com.example.ExampleApplication' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-assembleRunsBootJarAndJarIsSkipped.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-assembleRunsBootJarAndJarIsSkipped.gradle index e0bd0696bf5..c197148cd8a 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-assembleRunsBootJarAndJarIsSkipped.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-assembleRunsBootJarAndJarIsSkipped.gradle @@ -8,5 +8,5 @@ apply plugin: 'org.springframework.boot' apply plugin: 'java' bootJar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-jarAndBootJarCanBothBeBuilt.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-jarAndBootJarCanBothBeBuilt.gradle index 0455a8bb42e..bacf1a05c4e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-jarAndBootJarCanBothBeBuilt.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/JavaPluginActionIntegrationTests-jarAndBootJarCanBothBeBuilt.gradle @@ -8,7 +8,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'java' bootJar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' classifier = 'boot' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-assembleRunsBootWarAndWarIsSkipped.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-assembleRunsBootWarAndWarIsSkipped.gradle index a697574ea20..8275400db13 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-assembleRunsBootWarAndWarIsSkipped.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-assembleRunsBootWarAndWarIsSkipped.gradle @@ -8,5 +8,5 @@ apply plugin: 'org.springframework.boot' apply plugin: 'war' bootWar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-warAndBootWarCanBothBeBuilt.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-warAndBootWarCanBothBeBuilt.gradle index bf47606bc8a..f4d4e3cab4e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-warAndBootWarCanBothBeBuilt.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/plugin/WarPluginActionIntegrationTests-warAndBootWarCanBothBeBuilt.gradle @@ -8,7 +8,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'war' bootWar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' classifier = 'boot' } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle index 4209f27398e..603d6e841ba 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests-duplicatesAreHandledGracefully.gradle @@ -8,7 +8,7 @@ apply plugin: 'java' apply plugin: 'org.springframework.boot' bootJar { - mainClass = 'com.example.CustomMain' + mainClassName = 'com.example.CustomMain' duplicatesStrategy = "exclude" } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.gradle index f40163e7b24..b792a058b0d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootJarIntegrationTests.gradle @@ -8,7 +8,7 @@ apply plugin: 'java' apply plugin: 'org.springframework.boot' bootJar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' if (project.hasProperty('includeLaunchScript') ? includeLaunchScript : false) { launchScript { properties 'prop' : project.hasProperty('launchScriptProperty') ? launchScriptProperty : 'default' diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests.gradle index 1d59feef6a6..dcfae797b63 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootWarIntegrationTests.gradle @@ -8,7 +8,7 @@ apply plugin: 'war' apply plugin: 'org.springframework.boot' bootWar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' if (project.hasProperty('includeLaunchScript') ? includeLaunchScript : false) { launchScript { properties 'prop' : project.hasProperty('launchScriptProperty') ? launchScriptProperty : 'default' diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootJarCanBeUploaded.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootJarCanBeUploaded.gradle index 145bc8ac02a..e0ba4eac7c8 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootJarCanBeUploaded.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootJarCanBeUploaded.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'maven' bootJar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' } group = 'com.example' diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootWarCanBeUploaded.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootWarCanBeUploaded.gradle index 89c8e25f60d..58a1ebf76d0 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootWarCanBeUploaded.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenIntegrationTests-bootWarCanBeUploaded.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'maven' bootWar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' } group = 'com.example' diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootJarCanBePublished.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootJarCanBePublished.gradle index 6146899a6d2..f407938323c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootJarCanBePublished.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootJarCanBePublished.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'maven-publish' bootJar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' } group = 'com.example' diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootWarCanBePublished.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootWarCanBePublished.gradle index df3f7633214..d1cc0186238 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootWarCanBePublished.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/MavenPublishingIntegrationTests-bootWarCanBePublished.gradle @@ -9,7 +9,7 @@ apply plugin: 'org.springframework.boot' apply plugin: 'maven-publish' bootWar { - mainClass = 'com.example.Application' + mainClassName = 'com.example.Application' } group = 'com.example' diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsNotUsedWhenItIsNull.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsNotUsedWhenItIsNull.gradle index b839ef3a1a6..75b8b3faa48 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsNotUsedWhenItIsNull.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsNotUsedWhenItIsNull.gradle @@ -10,6 +10,6 @@ apply plugin: 'org.springframework.boot' task echoMainClassName { dependsOn compileJava doLast { - println 'Main class name = ' + bootRun.main + println 'Main class name = ' + bootRun.mainClassName } } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsUsed.gradle b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsUsed.gradle index a9163cd7d3e..62ca5b3090e 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsUsed.gradle +++ b/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/run/BootRunIntegrationTests-applicationPluginMainClassNameIsUsed.gradle @@ -10,5 +10,5 @@ apply plugin: 'org.springframework.boot' mainClassName = 'com.example.CustomMainClass' task echoMainClassName { - println 'Main class name = ' + bootRun.main + println 'Main class name = ' + bootRun.mainClassName }