diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index a3912a56..50879792 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -7,6 +7,7 @@ order. === Release 1.0.0 (In progress) +* https://github.com/spring-io/initializr/issues/120[#120]: remove start-class property from Maven build * https://github.com/spring-io/initializr/issues/96[#96]: export service metrics to redis * https://github.com/spring-io/initializr/issues/115[#115]: rename /metadata/service to /metadata/config * https://github.com/spring-io/initializr/issues/89[#89]: better describe service capability diff --git a/initializr/src/main/resources/templates/starter-pom.xml b/initializr/src/main/resources/templates/starter-pom.xml index 8e3db099..38cc6518 100644 --- a/initializr/src/main/resources/templates/starter-pom.xml +++ b/initializr/src/main/resources/templates/starter-pom.xml @@ -20,7 +20,6 @@ UTF-8 - ${packageName}.${applicationName} ${javaVersion} diff --git a/initializr/src/test/groovy/io/spring/initializr/generator/ProjectGeneratorTests.groovy b/initializr/src/test/groovy/io/spring/initializr/generator/ProjectGeneratorTests.groovy index b7e563db..1c34d65b 100644 --- a/initializr/src/test/groovy/io/spring/initializr/generator/ProjectGeneratorTests.groovy +++ b/initializr/src/test/groovy/io/spring/initializr/generator/ProjectGeneratorTests.groovy @@ -59,8 +59,8 @@ class ProjectGeneratorTests { projectGenerator.listeners << listener def request = createProjectRequest('web') - generateMavenPom(request).hasStartClass('demo.DemoApplication') - .hasNoRepository().hasSpringBootStarterDependency('web') + generateMavenPom(request).hasNoRepository() + .hasSpringBootStarterDependency('web') verify(listener, times(1)).onGeneratedProject(request) } @@ -81,7 +81,7 @@ class ProjectGeneratorTests { def request = createProjectRequest('web') generateProject(request).isJavaProject().isMavenProject().pomAssert() - .hasStartClass('demo.DemoApplication').hasNoRepository().hasSpringBootStarterDependency('web') + .hasNoRepository().hasSpringBootStarterDependency('web') verify(listener, times(1)).onGeneratedProject(request) } @@ -96,8 +96,8 @@ class ProjectGeneratorTests { void mavenPomWithBootSnapshot() { def request = createProjectRequest('web') request.bootVersion = '1.0.1.BUILD-SNAPSHOT' - generateMavenPom(request).hasStartClass('demo.DemoApplication') - .hasSnapshotRepository().hasSpringBootStarterDependency('web') + generateMavenPom(request).hasSnapshotRepository() + .hasSpringBootStarterDependency('web') } @Test @@ -110,7 +110,7 @@ class ProjectGeneratorTests { projectGenerator.metadata = metadata def request = createProjectRequest('thymeleaf') - generateMavenPom(request).hasStartClass('demo.DemoApplication') + generateMavenPom(request) .hasDependency('org.foo', 'thymeleaf') .hasDependenciesCount(2) } @@ -127,7 +127,7 @@ class ProjectGeneratorTests { def request = createProjectRequest('thymeleaf') request.packaging = 'war' generateProject(request).isJavaWarProject().isMavenProject(). - pomAssert().hasStartClass('demo.DemoApplication') + pomAssert() .hasSpringBootStarterTomcat() .hasDependency('org.foo', 'thymeleaf') // This is tagged as web facet so it brings the web one .hasSpringBootStarterTest() @@ -138,7 +138,7 @@ class ProjectGeneratorTests { void mavenWarPomWithoutWebFacet() { def request = createProjectRequest('data-jpa') request.packaging = 'war' - generateMavenPom(request).hasStartClass('demo.DemoApplication') + generateMavenPom(request) .hasSpringBootStarterTomcat() .hasSpringBootStarterDependency('data-jpa') .hasSpringBootStarterDependency('web') // Added by war packaging diff --git a/initializr/src/test/groovy/io/spring/initializr/test/PomAssert.groovy b/initializr/src/test/groovy/io/spring/initializr/test/PomAssert.groovy index 1ae7a739..8fb4485c 100644 --- a/initializr/src/test/groovy/io/spring/initializr/test/PomAssert.groovy +++ b/initializr/src/test/groovy/io/spring/initializr/test/PomAssert.groovy @@ -102,11 +102,6 @@ class PomAssert { this } - PomAssert hasStartClass(String fqn) { - assertEquals fqn, eng.evaluate(createPropertyNodeXpath('start-class'), doc) - this - } - PomAssert hasDependenciesCount(int count) { assertEquals "Wrong number of declared dependencies -->'${dependencies.keySet()}", count, dependencies.size() diff --git a/initializr/src/test/groovy/io/spring/initializr/web/MainControllerDefaultsIntegrationTests.groovy b/initializr/src/test/groovy/io/spring/initializr/web/MainControllerDefaultsIntegrationTests.groovy index 41eb28f0..83372972 100644 --- a/initializr/src/test/groovy/io/spring/initializr/web/MainControllerDefaultsIntegrationTests.groovy +++ b/initializr/src/test/groovy/io/spring/initializr/web/MainControllerDefaultsIntegrationTests.groovy @@ -36,7 +36,7 @@ class MainControllerDefaultsIntegrationTests extends AbstractInitializrControlle def content = restTemplate.getForObject(createUrl('/pom.xml?style=web'), String) def pomAssert = new PomAssert(content) pomAssert.hasGroupId('org.foo').hasArtifactId('foo-bar').hasVersion('1.2.4-SNAPSHOT').hasPackaging('jar') - .hasName('FooBar').hasDescription('FooBar Project').hasStartClass('org.foo.demo.FooBarApplication') + .hasName('FooBar').hasDescription('FooBar Project') } @Test