Skip to content

Commit

Permalink
Improve messaging for missing mainClass in Spring Boot apps
Browse files Browse the repository at this point in the history
  • Loading branch information
rpalcolea committed Feb 19, 2021
1 parent b8b24c0 commit d635065
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class OspackageApplicationSpringBootPlugin implements Plugin<Project> {
}

if(!project.application.mainClass.isPresent()) {
throw new GradleException("mainClass should be configured in order to generate a valid debian file. Ex. mainClass = 'com.netflix.app.MyApp'")
throw new GradleException("mainClass should be configured in order to generate a valid debian file. Ex. mainClass.set('com.netflix.app.MyApp')")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class OspackageApplicationSpringBootPluginLauncherSpec extends IntegrationSpec {
def result = runTasksWithFailure('runStartScript')

then:
result.standardError.contains("mainClass should be configured in order to generate a valid debian file. Ex. mainClass = 'com.netflix.app.MyApp'")
result.standardError.contains("mainClass should be configured in order to generate a valid debian file. Ex. mainClass.set('com.netflix.app.MyApp')")

where:
bootVersion | _
Expand Down

0 comments on commit d635065

Please # to comment.