Polish
This commit is contained in:
@@ -92,14 +92,14 @@ public class PackagingDocumentationTests {
|
||||
@Test
|
||||
public void springBootDslMainClass() throws IOException {
|
||||
this.gradleBuild
|
||||
.script("src/main/gradle/packaging/spring-boot-dsl-main-class.gradle")
|
||||
.build("bootJar");
|
||||
.script("src/main/gradle/packaging/spring-boot-dsl-main-class.gradle")
|
||||
.build("bootJar");
|
||||
File file = new File(this.gradleBuild.getProjectDir(),
|
||||
"build/libs/" + this.gradleBuild.getProjectDir().getName() + ".jar");
|
||||
assertThat(file).isFile();
|
||||
try (JarFile jar = new JarFile(file)) {
|
||||
assertThat(jar.getManifest().getMainAttributes().getValue("Start-Class"))
|
||||
.isEqualTo("com.example.ExampleApplication");
|
||||
.isEqualTo("com.example.ExampleApplication");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class RunningDocumentationTests {
|
||||
assertThat(this.gradleBuild
|
||||
.script("src/main/gradle/running/spring-boot-dsl-main-class-name.gradle")
|
||||
.build("configuredMainClass").getOutput())
|
||||
.contains("com.example.ExampleApplication");
|
||||
.contains("com.example.ExampleApplication");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -120,9 +120,9 @@ public abstract class AbstractBootArchiveIntegrationTests {
|
||||
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
try (JarFile jarFile = new JarFile(
|
||||
new File(this.gradleBuild.getProjectDir(), "build/libs")
|
||||
.listFiles()[0])) {
|
||||
.listFiles()[0])) {
|
||||
assertThat(jarFile.getManifest().getMainAttributes().getValue("Start-Class"))
|
||||
.isEqualTo("com.example.CustomMain");
|
||||
.isEqualTo("com.example.CustomMain");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -196,7 +196,8 @@ public class GradleBuild implements TestRule {
|
||||
XPathFactory xPathFactory = XPathFactory.newInstance();
|
||||
XPath xpath = xPathFactory.newXPath();
|
||||
XPathExpression expr = xpath.compile(expression);
|
||||
String version = expr.evaluate(new InputSource(new FileReader(".flattened-pom.xml")));
|
||||
String version = expr
|
||||
.evaluate(new InputSource(new FileReader(".flattened-pom.xml")));
|
||||
return version;
|
||||
}
|
||||
catch (Exception ex) {
|
||||
|
||||
Reference in New Issue
Block a user