├── .cfignore
├── .gitattributes
├── .github
├── actions
│ ├── create-github-release
│ │ ├── action.yml
│ │ └── changelog-generator.yml
│ ├── send-notification
│ │ └── action.yml
│ └── sync-to-maven-central
│ │ ├── action.yml
│ │ └── artifacts.spec
├── dco.yml
├── dependabot.yml
└── workflows
│ ├── build-pull-request.yml
│ ├── build.yml
│ └── release.yml
├── .gitignore
├── .mvn
└── wrapper
│ └── maven-wrapper.properties
├── .sdkmanrc
├── CODE_OF_CONDUCT.adoc
├── CONTRIBUTING.adoc
├── LICENSE.txt
├── README.adoc
├── eclipse
├── eclipse-code-formatter.xml
├── eclipse.properties
├── org.eclipse.jdt.core.prefs
└── org.eclipse.jdt.ui.prefs
├── git
└── hooks
│ ├── forward-merge
│ └── prepare-forward-merge
├── initializr-actuator
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── io
│ │ │ └── spring
│ │ │ └── initializr
│ │ │ └── actuate
│ │ │ ├── autoconfigure
│ │ │ ├── InitializrActuatorEndpointsAutoConfiguration.java
│ │ │ ├── InitializrStatsAutoConfiguration.java
│ │ │ └── package-info.java
│ │ │ ├── info
│ │ │ ├── BomRangesInfoContributor.java
│ │ │ ├── DependencyRangesInfoContributor.java
│ │ │ └── package-info.java
│ │ │ └── stat
│ │ │ ├── ProjectGenerationStatPublisher.java
│ │ │ ├── ProjectRequestDocument.java
│ │ │ ├── ProjectRequestDocumentFactory.java
│ │ │ ├── StatsProperties.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ ├── additional-spring-configuration-metadata.json
│ │ └── spring
│ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
│ └── test
│ ├── java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── actuate
│ │ ├── ActuatorIntegrationTests.java
│ │ ├── autoconfigure
│ │ ├── InitializrActuatorEndpointsAutoConfigurationTests.java
│ │ └── InitializrStatsAutoConfigurationTests.java
│ │ ├── info
│ │ ├── BomRangesInfoContributorTests.java
│ │ └── DependencyRangesInfoContributorTests.java
│ │ ├── stat
│ │ ├── MainControllerStatsIntegrationTests.java
│ │ ├── ProjectGenerationStatPublisherTests.java
│ │ ├── ProjectRequestDocumentFactoryTests.java
│ │ └── StatsPropertiesTests.java
│ │ └── test
│ │ └── MetricsAssert.java
│ └── resources
│ ├── application-test-custom-stats.yml
│ ├── logback-test.xml
│ └── stat
│ ├── request-invalid-dependencies.json
│ ├── request-invalid-java-version.json
│ ├── request-invalid-language.json
│ ├── request-invalid-type.json
│ ├── request-no-client.json
│ └── request-simple.json
├── initializr-bom
├── pom.xml
└── src
│ └── main
│ └── xslt
│ └── post-process-flattened-pom.xsl
├── initializr-docs
├── pom.xml
└── src
│ ├── main
│ ├── asciidoc
│ │ ├── api-guide.adoc
│ │ ├── configuration-guide.adoc
│ │ ├── documentation-overview.adoc
│ │ ├── index.adoc
│ │ ├── introduction.adoc
│ │ ├── metadata-format.adoc
│ │ └── using-the-stubs.adoc
│ ├── java
│ │ └── io
│ │ │ └── spring
│ │ │ └── initializr
│ │ │ └── doc
│ │ │ └── generator
│ │ │ └── project
│ │ │ ├── CustomProjectGenerationConfigurationExample.java
│ │ │ ├── CustomProjectGenerationController.java
│ │ │ ├── CustomProjectRequest.java
│ │ │ ├── ProjectCustomizationExamples.java
│ │ │ ├── ProjectGeneratorSetupExample.java
│ │ │ ├── SampleContributor.java
│ │ │ └── package-info.java
│ └── javadoc
│ │ └── spring-javadoc.css
│ └── test
│ ├── java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ ├── doc
│ │ └── generator
│ │ │ └── project
│ │ │ └── ProjectGeneratorSetupExampleTests.java
│ │ └── stub
│ │ ├── ClientApplicationTests.java
│ │ └── SampleApp.java
│ └── resources
│ └── logback-test.xml
├── initializr-generator-spring
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── io
│ │ │ └── spring
│ │ │ └── initializr
│ │ │ └── generator
│ │ │ └── spring
│ │ │ ├── build
│ │ │ ├── BuildCustomizer.java
│ │ │ ├── BuildMetadataResolver.java
│ │ │ ├── BuildProjectGenerationConfiguration.java
│ │ │ ├── DefaultStarterBuildCustomizer.java
│ │ │ ├── DependencyManagementBuildCustomizer.java
│ │ │ ├── SimpleBuildCustomizer.java
│ │ │ ├── SpringBootVersionRepositoriesBuildCustomizer.java
│ │ │ ├── WarPackagingWebStarterBuildCustomizer.java
│ │ │ ├── gradle
│ │ │ │ ├── ConditionalOnGradleVersion.java
│ │ │ │ ├── DependencyManagementPluginVersionResolver.java
│ │ │ │ ├── DevelopmentOnlyDependencyGradleBuildCustomizer.java
│ │ │ │ ├── GradleAnnotationProcessorScopeBuildCustomizer.java
│ │ │ │ ├── GradleBuildProjectContributor.java
│ │ │ │ ├── GradleConfigurationBuildCustomizer.java
│ │ │ │ ├── GradleProjectGenerationConfiguration.java
│ │ │ │ ├── GradleWrapperContributor.java
│ │ │ │ ├── InitializrDependencyManagementPluginVersionResolver.java
│ │ │ │ ├── OnGradleVersionCondition.java
│ │ │ │ ├── SettingsGradleProjectContributor.java
│ │ │ │ ├── SpringBootPluginBuildCustomizer.java
│ │ │ │ └── package-info.java
│ │ │ ├── maven
│ │ │ │ ├── DefaultMavenBuildCustomizer.java
│ │ │ │ ├── MavenBuildProjectContributor.java
│ │ │ │ ├── MavenProjectGenerationConfiguration.java
│ │ │ │ ├── MavenWrapperContributor.java
│ │ │ │ ├── OptionalDependencyMavenBuildCustomizer.java
│ │ │ │ ├── ParentOverridesHelpDocumentCustomizer.java
│ │ │ │ └── package-info.java
│ │ │ └── package-info.java
│ │ │ ├── code
│ │ │ ├── MainApplicationTypeCustomizer.java
│ │ │ ├── MainCompilationUnitCustomizer.java
│ │ │ ├── MainSourceCodeCustomizer.java
│ │ │ ├── MainSourceCodeProjectContributor.java
│ │ │ ├── ServletInitializerContributor.java
│ │ │ ├── ServletInitializerCustomizer.java
│ │ │ ├── SourceCodeProjectGenerationConfiguration.java
│ │ │ ├── TestApplicationTypeCustomizer.java
│ │ │ ├── TestSourceCodeCustomizer.java
│ │ │ ├── TestSourceCodeProjectContributor.java
│ │ │ ├── groovy
│ │ │ │ ├── GroovyDependenciesConfigurer.java
│ │ │ │ ├── GroovyMavenBuildCustomizer.java
│ │ │ │ ├── GroovyProjectGenerationConfiguration.java
│ │ │ │ ├── GroovyProjectGenerationDefaultContributorsConfiguration.java
│ │ │ │ └── package-info.java
│ │ │ ├── java
│ │ │ │ ├── JavaProjectGenerationConfiguration.java
│ │ │ │ ├── JavaProjectGenerationDefaultContributorsConfiguration.java
│ │ │ │ └── package-info.java
│ │ │ ├── kotlin
│ │ │ │ ├── InitializrMetadataKotlinVersionResolver.java
│ │ │ │ ├── KotlinDependenciesConfigurer.java
│ │ │ │ ├── KotlinGradleBuildCustomizer.java
│ │ │ │ ├── KotlinJacksonBuildCustomizer.java
│ │ │ │ ├── KotlinJpaGradleBuildCustomizer.java
│ │ │ │ ├── KotlinJpaMavenBuildCustomizer.java
│ │ │ │ ├── KotlinMavenBuildCustomizer.java
│ │ │ │ ├── KotlinMavenFullBuildCustomizer.java
│ │ │ │ ├── KotlinProjectGenerationConfiguration.java
│ │ │ │ ├── KotlinProjectGenerationDefaultContributorsConfiguration.java
│ │ │ │ ├── KotlinProjectSettings.java
│ │ │ │ ├── KotlinVersionResolver.java
│ │ │ │ ├── SimpleKotlinProjectSettings.java
│ │ │ │ └── package-info.java
│ │ │ └── package-info.java
│ │ │ ├── configuration
│ │ │ ├── ApplicationConfigurationProjectGenerationConfiguration.java
│ │ │ ├── WebFoldersContributor.java
│ │ │ └── package-info.java
│ │ │ ├── container
│ │ │ └── docker
│ │ │ │ └── compose
│ │ │ │ ├── ComposeHelpDocumentCustomizer.java
│ │ │ │ ├── ComposeProjectContributor.java
│ │ │ │ └── package-info.java
│ │ │ ├── documentation
│ │ │ ├── GettingStartedSection.java
│ │ │ ├── HelpDocument.java
│ │ │ ├── HelpDocumentCustomizer.java
│ │ │ ├── HelpDocumentGitIgnoreCustomizer.java
│ │ │ ├── HelpDocumentProjectContributor.java
│ │ │ ├── HelpDocumentProjectGenerationConfiguration.java
│ │ │ ├── HelpDocumentProjectGenerationDefaultContributorsConfiguration.java
│ │ │ ├── PreDefinedSection.java
│ │ │ ├── RequestedDependenciesHelpDocumentCustomizer.java
│ │ │ └── package-info.java
│ │ │ ├── properties
│ │ │ ├── ApplicationProperties.java
│ │ │ ├── ApplicationPropertiesContributor.java
│ │ │ ├── ApplicationPropertiesCustomizer.java
│ │ │ ├── ApplicationPropertiesProjectGenerationConfiguration.java
│ │ │ └── package-info.java
│ │ │ ├── scm
│ │ │ └── git
│ │ │ │ ├── GitAttributes.java
│ │ │ │ ├── GitAttributesContributor.java
│ │ │ │ ├── GitAttributesCustomizer.java
│ │ │ │ ├── GitIgnore.java
│ │ │ │ ├── GitIgnoreContributor.java
│ │ │ │ ├── GitIgnoreCustomizer.java
│ │ │ │ ├── GitProjectGenerationConfiguration.java
│ │ │ │ └── package-info.java
│ │ │ └── util
│ │ │ ├── LambdaSafe.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ └── spring.factories
│ │ ├── gradle
│ │ └── 8
│ │ │ └── wrapper
│ │ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ ├── gradle-wrapper.jar
│ │ │ │ └── gradle-wrapper.properties
│ │ │ ├── gradlew
│ │ │ └── gradlew.bat
│ │ ├── maven
│ │ └── 3
│ │ │ └── wrapper
│ │ │ ├── .mvn
│ │ │ └── wrapper
│ │ │ │ └── maven-wrapper.properties
│ │ │ ├── mvnw
│ │ │ └── mvnw.cmd
│ │ └── templates
│ │ └── documentation
│ │ ├── additional-links.mustache
│ │ ├── docker-compose.mustache
│ │ ├── guides.mustache
│ │ ├── parent-overrides.mustache
│ │ ├── reference-documentation.mustache
│ │ └── warnings.mustache
│ └── test
│ ├── java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── generator
│ │ └── spring
│ │ ├── AbstractComplianceTests.java
│ │ ├── ProjectGeneratorIntegrationTests.java
│ │ ├── build
│ │ ├── BuildComplianceTests.java
│ │ ├── BuildMetadataResolverTests.java
│ │ ├── DefaultStarterBuildCustomizerTests.java
│ │ ├── DependencyManagementBuildCustomizerTests.java
│ │ ├── SimpleBuildCustomizerTests.java
│ │ ├── SpringBootVersionRepositoriesBuildCustomizerTests.java
│ │ ├── WarPackagingWebStarterBuildCustomizerTests.java
│ │ ├── gradle
│ │ │ ├── ConditionalOnGradleVersionTests.java
│ │ │ ├── DevelopmentOnlyDependencyGradleBuildCustomizerTests.java
│ │ │ ├── GradleAnnotationProcessorScopeBuildCustomizerTests.java
│ │ │ ├── GradleBuildProjectContributorTests.java
│ │ │ ├── GradleConfigurationBuildCustomizerTests.java
│ │ │ ├── GradleKtsProjectGenerationConfigurationTests.java
│ │ │ ├── GradleProjectGenerationConfigurationTests.java
│ │ │ ├── GradleWrapperContributorTests.java
│ │ │ └── SettingsGradleProjectContributorTests.java
│ │ └── maven
│ │ │ ├── DefaultMavenBuildCustomizerTests.java
│ │ │ ├── MavenBuildProjectContributorTests.java
│ │ │ ├── MavenProjectGenerationConfigurationTests.java
│ │ │ ├── MavenWrapperContributorTests.java
│ │ │ └── OptionalDependencyMavenBuildCustomizerTests.java
│ │ ├── code
│ │ ├── CodeComplianceTests.java
│ │ ├── SourceCodeProjectGenerationConfigurationTests.java
│ │ ├── groovy
│ │ │ ├── GroovyMavenBuildCustomizerTests.java
│ │ │ └── GroovyProjectGenerationConfigurationTests.java
│ │ ├── java
│ │ │ └── JavaProjectGenerationConfigurationTests.java
│ │ └── kotlin
│ │ │ ├── KotlinDependenciesConfigurerTests.java
│ │ │ ├── KotlinGradleBuildCustomizerTests.java
│ │ │ ├── KotlinJacksonBuildCustomizerTests.java
│ │ │ ├── KotlinJpaGradleBuildCustomizerTests.java
│ │ │ ├── KotlinJpaMavenBuildCustomizerTests.java
│ │ │ ├── KotlinMavenBuildCustomizerTests.java
│ │ │ ├── KotlinMavenFullBuildCustomizerTests.java
│ │ │ └── KotlinProjectGenerationConfigurationTests.java
│ │ ├── configuration
│ │ └── WebFoldersContributorTests.java
│ │ ├── container
│ │ └── docker
│ │ │ └── compose
│ │ │ ├── ComposeHelpDocumentCustomizerTests.java
│ │ │ └── ComposeProjectContributorTests.java
│ │ ├── documentation
│ │ ├── GettingStartedSectionTests.java
│ │ ├── HelpDocumentGitIgnoreCustomizerTests.java
│ │ ├── HelpDocumentProjectContributorTests.java
│ │ ├── HelpDocumentProjectGenerationConfigurationTests.java
│ │ ├── HelpDocumentTests.java
│ │ └── RequestedDependenciesHelpDocumentCustomizerTests.java
│ │ ├── properties
│ │ ├── ApplicationPropertiesContributorTests.java
│ │ └── ApplicationPropertiesTests.java
│ │ └── scm
│ │ └── git
│ │ ├── GitAttributesTests.java
│ │ ├── GitIgnoreTests.java
│ │ └── GitProjectGenerationConfigurationTests.java
│ └── resources
│ ├── logback-test.xml
│ └── project
│ ├── gradle
│ ├── annotation-processor-dependency-build.gradle.gen
│ ├── annotation-processor-dependency-build.gradle.kts.gen
│ ├── bom-ordering-build.gradle.gen
│ ├── bom-ordering-build.gradle.kts.gen
│ ├── bom-property-build.gradle.gen
│ ├── bom-property-build.gradle.kts.gen
│ ├── compile-only-dependency-build.gradle.gen
│ ├── compile-only-dependency-build.gradle.kts.gen
│ ├── gitignore.gen
│ ├── kotlin-java11-build.gradle.gen
│ ├── kotlin-java11-build.gradle.kts.gen
│ ├── repositories-build.gradle.gen
│ ├── repositories-build.gradle.kts.gen
│ ├── repositories-milestone-build.gradle.gen
│ ├── repositories-milestone-build.gradle.kts.gen
│ ├── version-override-build.gradle.gen
│ └── version-override-build.gradle.kts.gen
│ ├── groovy
│ ├── next
│ │ ├── build.gradle.gen
│ │ ├── build.gradle.kts.gen
│ │ └── pom.xml.gen
│ └── standard
│ │ ├── DemoApplication.groovy.gen
│ │ ├── DemoApplicationTests.groovy.gen
│ │ ├── DemoApplicationTestsWeb.groovy.gen
│ │ ├── MyProjectApplication.groovy.gen
│ │ ├── MyProjectApplicationTests.groovy.gen
│ │ ├── ServletInitializer.groovy.gen
│ │ ├── build.gradle.gen
│ │ ├── build.gradle.kts.gen
│ │ ├── pom.xml.gen
│ │ ├── war-build.gradle.gen
│ │ ├── war-build.gradle.kts.gen
│ │ └── war-pom.xml.gen
│ ├── java
│ └── standard
│ │ ├── DemoApplication.java.gen
│ │ ├── DemoApplicationTests.java.gen
│ │ ├── DemoApplicationTestsWeb.java.gen
│ │ ├── MyProjectApplication.java.gen
│ │ ├── MyProjectApplicationTests.java.gen
│ │ ├── ServletInitializer.java.gen
│ │ ├── build.gradle.gen
│ │ ├── build.gradle.kts.gen
│ │ ├── pom.xml.gen
│ │ ├── war-build.gradle.gen
│ │ ├── war-build.gradle.kts.gen
│ │ └── war-pom.xml.gen
│ ├── kotlin
│ └── standard
│ │ ├── DemoApplication.kt.gen
│ │ ├── DemoApplicationTests.kt.gen
│ │ ├── DemoApplicationTestsWeb.kt.gen
│ │ ├── MyProjectApplication.kt.gen
│ │ ├── MyProjectApplicationTests.kt.gen
│ │ ├── ServletInitializer.kt.gen
│ │ ├── build.gradle.gen
│ │ ├── build.gradle.kts.gen
│ │ ├── pom.xml.gen
│ │ ├── war-build.gradle.gen
│ │ ├── war-build.gradle.kts.gen
│ │ └── war-pom.xml.gen
│ └── maven
│ ├── annotation-processor-dependency-pom.xml.gen
│ ├── bom-ordering-pom.xml.gen
│ ├── bom-property-pom.xml.gen
│ ├── compile-only-dependency-pom.xml.gen
│ ├── gitignore.gen
│ ├── kotlin-java11-pom.xml.gen
│ ├── repositories-milestone-pom.xml.gen
│ ├── repositories-pom.xml.gen
│ └── version-override-pom.xml.gen
├── initializr-generator-test
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── generator
│ │ └── test
│ │ ├── InitializrMetadataTestBuilder.java
│ │ ├── buildsystem
│ │ ├── gradle
│ │ │ ├── GradleBuildAssert.java
│ │ │ ├── GradleSettingsAssert.java
│ │ │ ├── GroovyDslGradleBuildAssert.java
│ │ │ ├── GroovyDslGradleSettingsAssert.java
│ │ │ ├── KotlinDslGradleBuildAssert.java
│ │ │ ├── KotlinDslGradleSettingsAssert.java
│ │ │ └── package-info.java
│ │ └── maven
│ │ │ ├── MavenBuildAssert.java
│ │ │ └── package-info.java
│ │ ├── io
│ │ ├── AbstractTextAssert.java
│ │ ├── NodeAssert.java
│ │ ├── TextAssert.java
│ │ ├── TextTestUtils.java
│ │ └── package-info.java
│ │ ├── package-info.java
│ │ └── project
│ │ ├── AbstractJvmModuleAssert.java
│ │ ├── AbstractModuleAssert.java
│ │ ├── AbstractProjectAssert.java
│ │ ├── AbstractProjectGenerationTester.java
│ │ ├── JvmModuleAssert.java
│ │ ├── ModuleAssert.java
│ │ ├── ProjectAssetTester.java
│ │ ├── ProjectGeneratorTester.java
│ │ ├── ProjectStructure.java
│ │ └── package-info.java
│ └── test
│ ├── java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── generator
│ │ └── test
│ │ ├── buildsystem
│ │ ├── gradle
│ │ │ ├── GroovyDslGradleBuildAssertTests.java
│ │ │ ├── GroovyDslGradleSettingsAssertTests.java
│ │ │ ├── KotlinDslGradleBuildAssertTests.java
│ │ │ └── KotlinDslGradleSettingsAssertTests.java
│ │ └── maven
│ │ │ └── MavenBuildAssertTests.java
│ │ ├── io
│ │ └── TextAssertTests.java
│ │ └── project
│ │ ├── JvmModuleAssertTests.java
│ │ ├── ModuleAssertTests.java
│ │ ├── ProjectAssetTesterTests.java
│ │ ├── ProjectGeneratorTesterTests.java
│ │ └── ProjectStructureTests.java
│ └── resources
│ ├── logback-test.xml
│ └── project
│ └── build
│ ├── gradle
│ ├── sample-build.gradle
│ ├── sample-build.gradle.kts
│ ├── sample-settings.gradle
│ └── sample-settings.gradle.kts
│ └── maven
│ ├── sample-dependency-multiple-identical-gav-pom.xml
│ ├── sample-dependency-version-pom.xml
│ ├── sample-packaging-pom.xml
│ ├── sample-pom.xml
│ ├── sample-profiles-pom.xml
│ └── sample-repositories-pom.xml
├── initializr-generator
├── pom.xml
└── src
│ ├── main
│ ├── java
│ │ └── io
│ │ │ └── spring
│ │ │ └── initializr
│ │ │ └── generator
│ │ │ ├── buildsystem
│ │ │ ├── BillOfMaterials.java
│ │ │ ├── BomContainer.java
│ │ │ ├── Build.java
│ │ │ ├── BuildItemContainer.java
│ │ │ ├── BuildItemResolver.java
│ │ │ ├── BuildSettings.java
│ │ │ ├── BuildSystem.java
│ │ │ ├── BuildSystemFactory.java
│ │ │ ├── BuildWriter.java
│ │ │ ├── Dependency.java
│ │ │ ├── DependencyComparator.java
│ │ │ ├── DependencyContainer.java
│ │ │ ├── DependencyScope.java
│ │ │ ├── MavenRepository.java
│ │ │ ├── MavenRepositoryContainer.java
│ │ │ ├── PropertyContainer.java
│ │ │ ├── SimpleBuildItemResolver.java
│ │ │ ├── gradle
│ │ │ │ ├── Attribute.java
│ │ │ │ ├── GradleBuild.java
│ │ │ │ ├── GradleBuildSettings.java
│ │ │ │ ├── GradleBuildSystem.java
│ │ │ │ ├── GradleBuildSystemFactory.java
│ │ │ │ ├── GradleBuildWriter.java
│ │ │ │ ├── GradleBuildscript.java
│ │ │ │ ├── GradleConfiguration.java
│ │ │ │ ├── GradleConfigurationContainer.java
│ │ │ │ ├── GradleDependency.java
│ │ │ │ ├── GradleExtension.java
│ │ │ │ ├── GradleExtensionContainer.java
│ │ │ │ ├── GradlePlugin.java
│ │ │ │ ├── GradlePluginContainer.java
│ │ │ │ ├── GradleSettingsWriter.java
│ │ │ │ ├── GradleSnippet.java
│ │ │ │ ├── GradleSnippetContainer.java
│ │ │ │ ├── GradleTask.java
│ │ │ │ ├── GradleTaskContainer.java
│ │ │ │ ├── GroovyDslGradleBuildWriter.java
│ │ │ │ ├── GroovyDslGradleSettingsWriter.java
│ │ │ │ ├── Invocation.java
│ │ │ │ ├── KotlinDslGradleBuildWriter.java
│ │ │ │ ├── KotlinDslGradleSettingsWriter.java
│ │ │ │ ├── StandardGradlePlugin.java
│ │ │ │ └── package-info.java
│ │ │ ├── maven
│ │ │ │ ├── MavenBuild.java
│ │ │ │ ├── MavenBuildSettings.java
│ │ │ │ ├── MavenBuildSystem.java
│ │ │ │ ├── MavenBuildSystemFactory.java
│ │ │ │ ├── MavenBuildWriter.java
│ │ │ │ ├── MavenDependency.java
│ │ │ │ ├── MavenDeveloper.java
│ │ │ │ ├── MavenDistributionManagement.java
│ │ │ │ ├── MavenExtension.java
│ │ │ │ ├── MavenExtensionContainer.java
│ │ │ │ ├── MavenLicense.java
│ │ │ │ ├── MavenParent.java
│ │ │ │ ├── MavenPlugin.java
│ │ │ │ ├── MavenPluginContainer.java
│ │ │ │ ├── MavenProfile.java
│ │ │ │ ├── MavenProfileActivation.java
│ │ │ │ ├── MavenProfileContainer.java
│ │ │ │ ├── MavenResource.java
│ │ │ │ ├── MavenResourceContainer.java
│ │ │ │ ├── MavenScm.java
│ │ │ │ └── package-info.java
│ │ │ └── package-info.java
│ │ │ ├── condition
│ │ │ ├── ConditionalOnBuildSystem.java
│ │ │ ├── ConditionalOnLanguage.java
│ │ │ ├── ConditionalOnPackaging.java
│ │ │ ├── ConditionalOnPlatformVersion.java
│ │ │ ├── ConditionalOnRequestedDependency.java
│ │ │ ├── OnBuildSystemCondition.java
│ │ │ ├── OnLanguageCondition.java
│ │ │ ├── OnPackagingCondition.java
│ │ │ ├── OnPlatformVersionCondition.java
│ │ │ ├── OnRequestedDependencyCondition.java
│ │ │ ├── ProjectGenerationCondition.java
│ │ │ └── package-info.java
│ │ │ ├── container
│ │ │ └── docker
│ │ │ │ └── compose
│ │ │ │ ├── ComposeFile.java
│ │ │ │ ├── ComposeFileWriter.java
│ │ │ │ ├── ComposeService.java
│ │ │ │ ├── ComposeServiceContainer.java
│ │ │ │ └── package-info.java
│ │ │ ├── io
│ │ │ ├── IndentingWriter.java
│ │ │ ├── IndentingWriterFactory.java
│ │ │ ├── SimpleIndentStrategy.java
│ │ │ ├── package-info.java
│ │ │ ├── template
│ │ │ │ ├── MustacheTemplateRenderer.java
│ │ │ │ ├── TemplateRenderer.java
│ │ │ │ └── package-info.java
│ │ │ └── text
│ │ │ │ ├── BulletedSection.java
│ │ │ │ ├── MustacheSection.java
│ │ │ │ ├── Section.java
│ │ │ │ └── package-info.java
│ │ │ ├── language
│ │ │ ├── AbstractLanguage.java
│ │ │ ├── Annotatable.java
│ │ │ ├── Annotation.java
│ │ │ ├── AnnotationContainer.java
│ │ │ ├── ClassName.java
│ │ │ ├── CodeBlock.java
│ │ │ ├── CompilationUnit.java
│ │ │ ├── Language.java
│ │ │ ├── LanguageFactory.java
│ │ │ ├── Parameter.java
│ │ │ ├── SourceCode.java
│ │ │ ├── SourceCodeWriter.java
│ │ │ ├── SourceStructure.java
│ │ │ ├── TypeDeclaration.java
│ │ │ ├── groovy
│ │ │ │ ├── GroovyCompilationUnit.java
│ │ │ │ ├── GroovyFieldDeclaration.java
│ │ │ │ ├── GroovyLanguage.java
│ │ │ │ ├── GroovyLanguageFactory.java
│ │ │ │ ├── GroovyMethodDeclaration.java
│ │ │ │ ├── GroovySourceCode.java
│ │ │ │ ├── GroovySourceCodeWriter.java
│ │ │ │ ├── GroovyTypeDeclaration.java
│ │ │ │ └── package-info.java
│ │ │ ├── java
│ │ │ │ ├── JavaCompilationUnit.java
│ │ │ │ ├── JavaFieldDeclaration.java
│ │ │ │ ├── JavaLanguage.java
│ │ │ │ ├── JavaLanguageFactory.java
│ │ │ │ ├── JavaMethodDeclaration.java
│ │ │ │ ├── JavaSourceCode.java
│ │ │ │ ├── JavaSourceCodeWriter.java
│ │ │ │ ├── JavaTypeDeclaration.java
│ │ │ │ └── package-info.java
│ │ │ ├── kotlin
│ │ │ │ ├── KotlinCompilationUnit.java
│ │ │ │ ├── KotlinFunctionDeclaration.java
│ │ │ │ ├── KotlinLanguage.java
│ │ │ │ ├── KotlinLanguageFactory.java
│ │ │ │ ├── KotlinModifier.java
│ │ │ │ ├── KotlinPropertyDeclaration.java
│ │ │ │ ├── KotlinSourceCode.java
│ │ │ │ ├── KotlinSourceCodeWriter.java
│ │ │ │ ├── KotlinTypeDeclaration.java
│ │ │ │ └── package-info.java
│ │ │ └── package-info.java
│ │ │ ├── packaging
│ │ │ ├── Packaging.java
│ │ │ ├── PackagingFactory.java
│ │ │ ├── jar
│ │ │ │ ├── JarPackaging.java
│ │ │ │ ├── JarPackagingFactory.java
│ │ │ │ └── package-info.java
│ │ │ ├── package-info.java
│ │ │ └── war
│ │ │ │ ├── WarPackaging.java
│ │ │ │ ├── WarPackagingFactory.java
│ │ │ │ └── package-info.java
│ │ │ ├── project
│ │ │ ├── DefaultProjectAssetGenerator.java
│ │ │ ├── DefaultProjectDescriptionDiffFactory.java
│ │ │ ├── MutableProjectDescription.java
│ │ │ ├── ProjectAssetGenerator.java
│ │ │ ├── ProjectDescription.java
│ │ │ ├── ProjectDescriptionCustomizer.java
│ │ │ ├── ProjectDescriptionDiff.java
│ │ │ ├── ProjectDescriptionDiffFactory.java
│ │ │ ├── ProjectDirectoryFactory.java
│ │ │ ├── ProjectGenerationConfiguration.java
│ │ │ ├── ProjectGenerationConfigurationTypeFilter.java
│ │ │ ├── ProjectGenerationContext.java
│ │ │ ├── ProjectGenerationException.java
│ │ │ ├── ProjectGenerator.java
│ │ │ ├── contributor
│ │ │ │ ├── MultipleResourcesProjectContributor.java
│ │ │ │ ├── ProjectContributor.java
│ │ │ │ ├── SingleResourceProjectContributor.java
│ │ │ │ └── package-info.java
│ │ │ └── package-info.java
│ │ │ └── version
│ │ │ ├── InvalidVersionException.java
│ │ │ ├── Version.java
│ │ │ ├── VersionParser.java
│ │ │ ├── VersionProperty.java
│ │ │ ├── VersionRange.java
│ │ │ ├── VersionReference.java
│ │ │ └── package-info.java
│ └── resources
│ │ └── META-INF
│ │ └── spring.factories
│ └── test
│ ├── java
│ ├── com
│ │ └── example
│ │ │ └── Example.java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── generator
│ │ ├── buildsystem
│ │ ├── BomContainerTests.java
│ │ ├── BuildItemContainerTests.java
│ │ ├── BuildSystemTests.java
│ │ ├── BuildTests.java
│ │ ├── DependencyComparatorTests.java
│ │ ├── DependencyContainerTests.java
│ │ ├── DependencyTests.java
│ │ ├── MavenRepositoryContainerTests.java
│ │ ├── MavenRepositoryTests.java
│ │ ├── gradle
│ │ │ ├── AttributeTests.java
│ │ │ ├── GradleBuildSettingsTests.java
│ │ │ ├── GradleBuildWriterTests.java
│ │ │ ├── GradleConfigurationContainerTests.java
│ │ │ ├── GradleDependencyTests.java
│ │ │ ├── GradleExtensionTests.java
│ │ │ ├── GradlePluginContainerTests.java
│ │ │ ├── GradleTaskContainerTests.java
│ │ │ ├── GradleTaskTests.java
│ │ │ ├── GroovyDslGradleBuildWriterTests.java
│ │ │ ├── GroovyDslGradleSettingsWriterTests.java
│ │ │ ├── KotlinDslGradleBuildWriterTests.java
│ │ │ └── KotlinDslGradleSettingsWriterTests.java
│ │ └── maven
│ │ │ ├── MavenBuildTests.java
│ │ │ ├── MavenBuildWriterTests.java
│ │ │ ├── MavenDependencyTests.java
│ │ │ ├── MavenDeveloperTests.java
│ │ │ ├── MavenDistributionManagementTests.java
│ │ │ ├── MavenLicenseTests.java
│ │ │ ├── MavenPluginContainerTests.java
│ │ │ ├── MavenPluginTests.java
│ │ │ ├── MavenProfileActivationTests.java
│ │ │ ├── MavenProfileContainerTests.java
│ │ │ ├── MavenProfileTests.java
│ │ │ ├── MavenResourceContainerTests.java
│ │ │ ├── MavenScmTests.java
│ │ │ └── NodeAssert.java
│ │ ├── condition
│ │ ├── ConditionalOnBuildSystemTests.java
│ │ ├── ConditionalOnLanguageTests.java
│ │ ├── ConditionalOnPackagingTests.java
│ │ ├── ConditionalOnPlatformVersionTests.java
│ │ └── ConditionalOnRequestedDependencyTests.java
│ │ ├── container
│ │ └── docker
│ │ │ └── compose
│ │ │ ├── ComposeFileWriterTests.java
│ │ │ └── ComposeServiceContainerTests.java
│ │ ├── io
│ │ ├── IndentingWriterFactoryTests.java
│ │ ├── IndentingWriterTests.java
│ │ ├── SimpleIndentStrategyTests.java
│ │ ├── template
│ │ │ └── MustacheTemplateRendererTests.java
│ │ └── text
│ │ │ ├── BulletedSectionTests.java
│ │ │ └── MustacheSectionTests.java
│ │ ├── language
│ │ ├── AnnotationContainerTests.java
│ │ ├── AnnotationTests.java
│ │ ├── ClassNameTests.java
│ │ ├── CodeBlockTests.java
│ │ ├── LanguageTests.java
│ │ ├── SourceStructureTests.java
│ │ ├── TypeDeclarationTests.java
│ │ ├── groovy
│ │ │ └── GroovySourceCodeWriterTests.java
│ │ ├── java
│ │ │ └── JavaSourceCodeWriterTests.java
│ │ └── kotlin
│ │ │ └── KotlinSourceCodeWriterTests.java
│ │ ├── packaging
│ │ └── PackagingTests.java
│ │ ├── project
│ │ ├── DefaultProjectAssetGeneratorTests.java
│ │ ├── MutableProjectDescriptionTests.java
│ │ ├── ProjectDescriptionDiffTests.java
│ │ ├── ProjectGenerationConfigurationTypeFilterTests.java
│ │ ├── ProjectGeneratorTests.java
│ │ └── contributor
│ │ │ ├── MultipleResourcesProjectContributorTests.java
│ │ │ ├── TestProjectGenerationConfiguration.java
│ │ │ ├── TestProjectGenerationConfiguration2.java
│ │ │ ├── TestProjectGenerationConfiguration2ExcludingTypeFilter.java
│ │ │ └── TestProjectGenerationConfigurationExcludingTypeFilter.java
│ │ └── version
│ │ ├── VersionParserTests.java
│ │ ├── VersionPropertyTests.java
│ │ ├── VersionRangeTests.java
│ │ ├── VersionReferenceTests.java
│ │ └── VersionTests.java
│ └── resources
│ ├── META-INF
│ └── spring.factories
│ ├── data
│ └── multi
│ │ ├── one.properties
│ │ └── two.xml
│ ├── logback-test.xml
│ └── templates
│ └── mustache
│ └── test.mustache
├── initializr-metadata
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── metadata
│ │ ├── BillOfMaterials.java
│ │ ├── DefaultMetadataElement.java
│ │ ├── Defaultable.java
│ │ ├── DependenciesCapability.java
│ │ ├── Dependency.java
│ │ ├── DependencyGroup.java
│ │ ├── DependencyMetadata.java
│ │ ├── DependencyMetadataProvider.java
│ │ ├── Describable.java
│ │ ├── InitializrConfiguration.java
│ │ ├── InitializrMetadata.java
│ │ ├── InitializrMetadataBuilder.java
│ │ ├── InitializrMetadataCustomizer.java
│ │ ├── InitializrMetadataProvider.java
│ │ ├── InitializrProperties.java
│ │ ├── InvalidInitializrMetadataException.java
│ │ ├── Link.java
│ │ ├── MetadataElement.java
│ │ ├── Repository.java
│ │ ├── ServiceCapability.java
│ │ ├── ServiceCapabilityType.java
│ │ ├── SimpleInitializrMetadataProvider.java
│ │ ├── SingleSelectCapability.java
│ │ ├── TextCapability.java
│ │ ├── Type.java
│ │ ├── TypeCapability.java
│ │ ├── package-info.java
│ │ └── support
│ │ ├── MetadataBuildItemMapper.java
│ │ ├── MetadataBuildItemResolver.java
│ │ └── package-info.java
│ └── test
│ ├── java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── metadata
│ │ ├── BillOfMaterialsTests.java
│ │ ├── DependenciesCapabilityTests.java
│ │ ├── DependencyTests.java
│ │ ├── InitializrConfigurationTests.java
│ │ ├── InitializrMetadataBuilderTests.java
│ │ ├── InitializrMetadataTests.java
│ │ ├── LinkTests.java
│ │ ├── SingleSelectCapabilityTests.java
│ │ ├── TextCapabilityTests.java
│ │ ├── TypeCapabilityTests.java
│ │ ├── TypeTests.java
│ │ └── support
│ │ └── MetadataBuildItemResolverTests.java
│ └── resources
│ ├── application-test-custom-defaults.yml
│ ├── application-test-custom-env.yml
│ ├── application-test-default.yml
│ ├── application-test-ssl.yml
│ ├── logback-test.xml
│ └── metadata
│ └── config
│ ├── test-bom.json
│ ├── test-min.json
│ └── test-repository.json
├── initializr-parent
└── pom.xml
├── initializr-service-sample
├── README.adoc
├── pom.xml
└── src
│ └── main
│ ├── java
│ └── sample
│ │ └── service
│ │ ├── ServiceApplication.java
│ │ └── package-info.java
│ └── resources
│ └── application.yml
├── initializr-version-resolver
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── versionresolver
│ │ ├── DefaultMavenVersionResolver.java
│ │ ├── MavenVersionResolver.java
│ │ └── package-info.java
│ └── test
│ ├── java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── versionresolver
│ │ └── DefaultMavenVersionResolverTests.java
│ └── resources
│ └── logback-test.xml
├── initializr-web
├── pom.xml
└── src
│ ├── assembly
│ ├── snippets.xml
│ └── stub.xml
│ ├── main
│ ├── java
│ │ └── io
│ │ │ └── spring
│ │ │ └── initializr
│ │ │ └── web
│ │ │ ├── autoconfigure
│ │ │ ├── InitializrAutoConfiguration.java
│ │ │ ├── InitializrModule.java
│ │ │ ├── InitializrWebConfig.java
│ │ │ └── package-info.java
│ │ │ ├── controller
│ │ │ ├── AbstractMetadataController.java
│ │ │ ├── CommandLineMetadataController.java
│ │ │ ├── DefaultProjectGenerationController.java
│ │ │ ├── ProjectGenerationController.java
│ │ │ ├── ProjectMetadataController.java
│ │ │ ├── SpringCliDistributionController.java
│ │ │ └── package-info.java
│ │ │ ├── mapper
│ │ │ ├── DependencyMetadataJsonMapper.java
│ │ │ ├── DependencyMetadataV21JsonMapper.java
│ │ │ ├── InitializrMetadataJsonMapper.java
│ │ │ ├── InitializrMetadataV21JsonMapper.java
│ │ │ ├── InitializrMetadataV22JsonMapper.java
│ │ │ ├── InitializrMetadataV2JsonMapper.java
│ │ │ ├── InitializrMetadataVersion.java
│ │ │ ├── LinkMapper.java
│ │ │ └── package-info.java
│ │ │ ├── project
│ │ │ ├── DefaultProjectRequestPlatformVersionTransformer.java
│ │ │ ├── DefaultProjectRequestToDescriptionConverter.java
│ │ │ ├── InvalidProjectRequestException.java
│ │ │ ├── MetadataProjectDescriptionCustomizer.java
│ │ │ ├── ProjectFailedEvent.java
│ │ │ ├── ProjectGeneratedEvent.java
│ │ │ ├── ProjectGenerationInvoker.java
│ │ │ ├── ProjectGenerationResult.java
│ │ │ ├── ProjectRequest.java
│ │ │ ├── ProjectRequestEvent.java
│ │ │ ├── ProjectRequestPlatformVersionTransformer.java
│ │ │ ├── ProjectRequestToDescriptionConverter.java
│ │ │ ├── WebProjectRequest.java
│ │ │ └── package-info.java
│ │ │ └── support
│ │ │ ├── Agent.java
│ │ │ ├── CommandLineHelpGenerator.java
│ │ │ ├── DefaultDependencyMetadataProvider.java
│ │ │ ├── DefaultInitializrMetadataProvider.java
│ │ │ ├── InitializrMetadataUpdateStrategy.java
│ │ │ ├── SpringBootMetadataReader.java
│ │ │ ├── SpringIoInitializrMetadataUpdateStrategy.java
│ │ │ └── package-info.java
│ └── resources
│ │ ├── META-INF
│ │ └── spring
│ │ │ └── org.springframework.boot.autoconfigure.AutoConfiguration.imports
│ │ ├── static
│ │ └── install.sh
│ │ └── templates
│ │ ├── cli
│ │ ├── boot-cli-capabilities.mustache
│ │ ├── cli-capabilities.mustache
│ │ ├── curl-examples.mustache
│ │ └── httpie-examples.mustache
│ │ └── gs.mustache
│ └── test
│ ├── java
│ └── io
│ │ └── spring
│ │ └── initializr
│ │ └── web
│ │ ├── AbstractFullStackInitializrIntegrationTests.java
│ │ ├── AbstractInitializrControllerIntegrationTests.java
│ │ ├── AbstractInitializrIntegrationTests.java
│ │ ├── autoconfigure
│ │ └── InitializrAutoConfigurationTests.java
│ │ ├── controller
│ │ ├── CommandLineExampleIntegrationTests.java
│ │ ├── CommandLineMetadataControllerIntegrationTests.java
│ │ ├── CommandLineMetadataControllerSslIntegrationTests.java
│ │ ├── ProjectGenerationControllerArchiveIntegrationTests.java
│ │ ├── ProjectGenerationControllerCustomDefaultsIntegrationTests.java
│ │ ├── ProjectGenerationControllerCustomEnvIntegrationTests.java
│ │ ├── ProjectGenerationControllerCustomVersionTransformerIntegrationTests.java
│ │ ├── ProjectGenerationControllerIntegrationTests.java
│ │ ├── ProjectMetadataControllerCustomDefaultsIntegrationTests.java
│ │ ├── ProjectMetadataControllerIntegrationTests.java
│ │ ├── ProjectMetadataControllerSslIntegrationTests.java
│ │ ├── SpringCliDistributionControllerCustomEnvsIntegrationTests.java
│ │ ├── SpringCliDistributionControllerIntegrationTests.java
│ │ └── custom
│ │ │ ├── CustomProjectContributor.java
│ │ │ ├── CustomProjectDescription.java
│ │ │ ├── CustomProjectDescriptionDiff.java
│ │ │ ├── CustomProjectGenerationController.java
│ │ │ ├── CustomProjectRequest.java
│ │ │ └── ProjectGenerationControllerCustomRequestIntegrationTests.java
│ │ ├── mapper
│ │ ├── DependencyMetadataJsonMapperTests.java
│ │ ├── InitializrMetadataV21JsonMapperTests.java
│ │ ├── InitializrMetadataV22JsonMapperTests.java
│ │ └── LinkMapperTests.java
│ │ ├── project
│ │ ├── DefaultProjectRequestPlatformVersionTransformerTests.java
│ │ ├── DefaultProjectRequestToDescriptionConverterTests.java
│ │ ├── MetadataProjectDescriptionCustomizerTests.java
│ │ ├── ProjectGenerationDescriptionCustomizerTests.java
│ │ └── ProjectGenerationInvokerTests.java
│ │ ├── support
│ │ ├── AgentTests.java
│ │ ├── CommandLineHelpGeneratorTests.java
│ │ ├── DefaultDependencyMetadataProviderTests.java
│ │ ├── DefaultInitializrMetadataProviderTests.java
│ │ ├── SpringBootMetadataReaderTests.java
│ │ └── SpringIoInitializrMetadataUpdateStrategyTests.java
│ │ └── test
│ │ ├── JsonFieldPath.java
│ │ ├── JsonFieldProcessor.java
│ │ ├── MockMvcClientHttpRequestFactory.java
│ │ ├── MockMvcClientHttpRequestFactoryTestExecutionListener.java
│ │ └── ResponseFieldSnippet.java
│ └── resources
│ ├── META-INF
│ └── spring.factories
│ ├── application-test-custom-defaults.yml
│ ├── application-test-custom-env.yml
│ ├── application-test-default.yml
│ ├── application-test-ssl.yml
│ ├── logback-test.xml
│ ├── metadata
│ ├── config
│ │ └── test-default.json
│ ├── dependencies
│ │ ├── test-dependencies-2.4.4.json
│ │ └── test-dependencies-2.6.1.json
│ ├── springio
│ │ ├── spring-boot-invalid-version.json
│ │ ├── spring-boot-no-default.json
│ │ └── spring-boot.json
│ ├── test-default-2.0.0-ssl.json
│ ├── test-default-2.0.0.json
│ ├── test-default-2.1.0-ssl.json
│ ├── test-default-2.1.0.json
│ └── test-default-2.2.0.json
│ └── org
│ └── springframework
│ └── restdocs
│ └── templates
│ └── asciidoctor
│ └── default-response-fields.snippet
├── mvnw
├── mvnw.cmd
├── pom.xml
└── src
└── checkstyle
├── checkstyle-suppressions.xml
├── checkstyle.xml
├── import-control.xml
├── nohttp-checkstyle-suppressions.xml
└── nohttp-checkstyle.xml
/.cfignore:
--------------------------------------------------------------------------------
1 | .gradle
2 | *.sw?
3 | .#*
4 | *#
5 | *~
6 | .classpath
7 | .project
8 | .settings
9 | build
10 | target
11 | .springBeans
12 | tmp*
13 | spring.zip
14 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | *.bat text eol=crlf
--------------------------------------------------------------------------------
/.github/actions/create-github-release/action.yml:
--------------------------------------------------------------------------------
1 | name: Create GitHub Release
2 | description: Create the release on GitHub with a changelog
3 | inputs:
4 | milestone:
5 | description: Name of the GitHub milestone for which a release will be created
6 | required: true
7 | token:
8 | description: Token to use for authentication with GitHub
9 | required: true
10 | runs:
11 | using: composite
12 | steps:
13 | - name: Generate Changelog
14 | uses: spring-io/github-changelog-generator@86958813a62af8fb223b3fd3b5152035504bcb83 #v0.0.12
15 | with:
16 | milestone: ${{ inputs.milestone }}
17 | token: ${{ inputs.token }}
18 | config-file: .github/actions/create-github-release/changelog-generator.yml
19 | - name: Create GitHub Release
20 | env:
21 | GITHUB_TOKEN: ${{ inputs.token }}
22 | shell: bash
23 | run: gh release create ${{ format('v{0}', inputs.milestone) }} --notes-file changelog.md
24 |
--------------------------------------------------------------------------------
/.github/actions/create-github-release/changelog-generator.yml:
--------------------------------------------------------------------------------
1 | changelog:
2 | repository: spring-io/initializr
3 | sections:
4 | - title: ":star: New Features"
5 | labels:
6 | - "type: enhancement"
7 | - title: ":lady_beetle: Bug Fixes"
8 | labels:
9 | - "type: bug"
10 | - "type: regression"
11 | - title: ":notebook_with_decorative_cover: Documentation"
12 | labels:
13 | - "type: documentation"
14 | - title: ":hammer: Dependency Upgrades"
15 | sort: "title"
16 | labels:
17 | - "type: dependency-upgrade"
18 |
--------------------------------------------------------------------------------
/.github/actions/sync-to-maven-central/artifacts.spec:
--------------------------------------------------------------------------------
1 | {
2 | "files": [
3 | {
4 | "aql": {
5 | "items.find": {
6 | "$and": [
7 | {
8 | "@build.name": "${buildName}",
9 | "@build.number": "${buildNumber}"
10 | }
11 | ]
12 | }
13 | },
14 | "target": "nexus/"
15 | }
16 | ]
17 | }
18 |
--------------------------------------------------------------------------------
/.github/dco.yml:
--------------------------------------------------------------------------------
1 | require:
2 | members: false
3 |
--------------------------------------------------------------------------------
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | updates:
3 | - package-ecosystem: "github-actions"
4 | directory: "/"
5 | schedule:
6 | interval: "weekly"
7 | labels:
8 | - "type: task"
9 |
--------------------------------------------------------------------------------
/.github/workflows/build-pull-request.yml:
--------------------------------------------------------------------------------
1 | name: Build Pull Request
2 | on: pull_request
3 |
4 | permissions:
5 | contents: read
6 |
7 | jobs:
8 | build:
9 | name: Build pull request
10 | runs-on: ubuntu-latest
11 | if: ${{ github.repository == 'spring-io/initializr' }}
12 | steps:
13 | - name: Check out
14 | uses: actions/checkout@v4
15 |
16 | - name: Set up JDK 17
17 | uses: actions/setup-java@v4
18 | with:
19 | java-version: '17'
20 | distribution: 'liberica'
21 | cache: 'maven'
22 |
23 | - name: Build with Maven
24 | run: ./mvnw --batch-mode --update-snapshots -Pfull install
25 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .mvn/wrapper/maven-wrapper.jar
2 | .flattened-pom.xml
3 | .gradle
4 | *.sw?
5 | .#*
6 | *#
7 | *~
8 | .classpath
9 | .project
10 | .settings
11 | .gitignore
12 | .idea
13 | .factorypath
14 | *.iml
15 | bin
16 | target
17 | .springBeans
18 | .vscode/
19 | .sts4-cache/
20 | tmp*
21 | grapes
22 |
--------------------------------------------------------------------------------
/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | wrapperVersion=3.3.2
18 | distributionType=only-script
19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20 |
--------------------------------------------------------------------------------
/.sdkmanrc:
--------------------------------------------------------------------------------
1 | # Enable auto-env through the sdkman_auto_env config
2 | # Add key=value pairs of SDKs to use below
3 | java=17.0.15-librca
4 |
--------------------------------------------------------------------------------
/eclipse/eclipse.properties:
--------------------------------------------------------------------------------
1 | copyright-year=2012-2018
2 |
--------------------------------------------------------------------------------
/initializr-actuator/src/main/java/io/spring/initializr/actuate/autoconfigure/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Auto-configuration for Actuator concerns.
19 | */
20 | package io.spring.initializr.actuate.autoconfigure;
21 |
--------------------------------------------------------------------------------
/initializr-actuator/src/main/java/io/spring/initializr/actuate/info/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Application info for service metadata.
19 | */
20 | package io.spring.initializr.actuate.info;
21 |
--------------------------------------------------------------------------------
/initializr-actuator/src/main/java/io/spring/initializr/actuate/stat/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project statistics support.
19 | */
20 | package io.spring.initializr.actuate.stat;
21 |
--------------------------------------------------------------------------------
/initializr-actuator/src/main/resources/META-INF/additional-spring-configuration-metadata.json:
--------------------------------------------------------------------------------
1 | {
2 | "properties": [
3 | {
4 | "name": "initializr.stats.elastic.entity-name",
5 | "type": "java.lang.String",
6 | "description": "Name of the entity to use to publish stats.",
7 | "deprecation": {
8 | "reason": "Elasticsearch does no longer support mapping types.",
9 | "level": "error"
10 | }
11 | }
12 | ]
13 | }
--------------------------------------------------------------------------------
/initializr-actuator/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | io.spring.initializr.actuate.autoconfigure.InitializrActuatorEndpointsAutoConfiguration
2 | io.spring.initializr.actuate.autoconfigure.InitializrStatsAutoConfiguration
--------------------------------------------------------------------------------
/initializr-actuator/src/test/java/io/spring/initializr/actuate/stat/StatsPropertiesTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.actuate.stat;
18 |
19 | import org.junit.jupiter.api.Test;
20 |
21 | import static org.assertj.core.api.Assertions.assertThat;
22 |
23 | /**
24 | * Tests for {@link StatsProperties}.
25 | *
26 | * @author Stephane Nicoll
27 | */
28 | class StatsPropertiesTests {
29 |
30 | private final StatsProperties properties = new StatsProperties();
31 |
32 | @Test
33 | void cleanTrailingSlash() {
34 | this.properties.getElastic().setUri("https://example.com/");
35 | assertThat(this.properties.getElastic().getUri()).isEqualTo("https://example.com");
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/application-test-custom-stats.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | stats:
3 | elastic:
4 | uri: http://localhost/elastic
5 | username: test-user
6 | password: test-password
7 | max-attempts: 1
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/stat/request-invalid-dependencies.json:
--------------------------------------------------------------------------------
1 | {
2 | "generationTimestamp": 0,
3 | "type": "gradle-project",
4 | "buildSystem": "gradle",
5 | "groupId": "com.example.acme",
6 | "artifactId": "test",
7 | "javaVersion": "1.8",
8 | "language": "java",
9 | "packaging": "jar",
10 | "packageName": "com.example.acme.test",
11 | "version": {
12 | "id": "2.1.0.RELEASE",
13 | "major": "2",
14 | "minor": "2.1"
15 | },
16 | "dependencies": {
17 | "id": "web",
18 | "values": [
19 | "web"
20 | ],
21 | "count": 1
22 | },
23 | "errorState": {
24 | "invalid": true,
25 | "dependencies": {
26 | "invalid": true,
27 | "values": [
28 | "invalid-2",
29 | "invalid-1"
30 | ]
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/stat/request-invalid-java-version.json:
--------------------------------------------------------------------------------
1 | {
2 | "generationTimestamp": 0,
3 | "type": "gradle-project",
4 | "buildSystem": "gradle",
5 | "groupId": "com.example.acme",
6 | "artifactId": "test",
7 | "javaVersion": "1.2",
8 | "language": "java",
9 | "packaging": "jar",
10 | "packageName": "com.example.acme.test",
11 | "version": {
12 | "id": "2.1.0.RELEASE",
13 | "major": "2",
14 | "minor": "2.1"
15 | },
16 | "dependencies": {
17 | "id": "data-jpa web",
18 | "values": [
19 | "web",
20 | "data-jpa"
21 | ],
22 | "count": 2
23 | },
24 | "errorState": {
25 | "invalid": true,
26 | "javaVersion": true
27 | }
28 | }
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/stat/request-invalid-language.json:
--------------------------------------------------------------------------------
1 | {
2 | "generationTimestamp": 0,
3 | "type": "gradle-project",
4 | "buildSystem": "gradle",
5 | "groupId": "com.example.acme",
6 | "artifactId": "test",
7 | "javaVersion": "1.8",
8 | "language": "c",
9 | "packaging": "jar",
10 | "packageName": "com.example.acme.test",
11 | "version": {
12 | "id": "2.1.0.RELEASE",
13 | "major": "2",
14 | "minor": "2.1"
15 | },
16 | "dependencies": {
17 | "id": "data-jpa web",
18 | "values": [
19 | "web",
20 | "data-jpa"
21 | ],
22 | "count": 2
23 | },
24 | "errorState": {
25 | "invalid": true,
26 | "language": true
27 | }
28 | }
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/stat/request-invalid-type.json:
--------------------------------------------------------------------------------
1 | {
2 | "generationTimestamp": 0,
3 | "type": "not_a_type",
4 | "groupId": "com.example.acme",
5 | "artifactId": "test",
6 | "javaVersion": "1.8",
7 | "language": "java",
8 | "packaging": "jar",
9 | "packageName": "com.example.acme.test",
10 | "version": {
11 | "id": "2.1.0.RELEASE",
12 | "major": "2",
13 | "minor": "2.1"
14 | },
15 | "dependencies": {
16 | "id": "data-jpa web",
17 | "values": [
18 | "web",
19 | "data-jpa"
20 | ],
21 | "count": 2
22 | },
23 | "errorState": {
24 | "invalid": true,
25 | "type": true
26 | }
27 | }
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/stat/request-no-client.json:
--------------------------------------------------------------------------------
1 | {
2 | "generationTimestamp": 0,
3 | "type": "gradle-project",
4 | "buildSystem": "gradle",
5 | "groupId": "com.example.acme",
6 | "artifactId": "test",
7 | "javaVersion": "1.8",
8 | "language": "java",
9 | "packaging": "jar",
10 | "packageName": "com.example.acme.test",
11 | "version": {
12 | "id": "2.1.0.RELEASE",
13 | "major": "2",
14 | "minor": "2.1"
15 | },
16 | "dependencies": {
17 | "id": "data-jpa web",
18 | "values": [
19 | "web",
20 | "data-jpa"
21 | ],
22 | "count": 2
23 | }
24 | }
--------------------------------------------------------------------------------
/initializr-actuator/src/test/resources/stat/request-simple.json:
--------------------------------------------------------------------------------
1 | {
2 | "generationTimestamp": 0,
3 | "type": "maven-project",
4 | "buildSystem": "maven",
5 | "groupId": "com.example.acme",
6 | "artifactId": "project",
7 | "javaVersion": "1.8",
8 | "language": "java",
9 | "packaging": "jar",
10 | "packageName": "com.example.acme.project",
11 | "version": {
12 | "id": "2.4.1",
13 | "major": "2",
14 | "minor": "2.4"
15 | },
16 | "client": {
17 | "id": "curl",
18 | "version": "1.2.4",
19 | "ip": "10.0.0.42",
20 | "country": "BE"
21 | },
22 | "dependencies": {
23 | "id": "data-jpa web",
24 | "values": [
25 | "web",
26 | "data-jpa"
27 | ],
28 | "count": 2
29 | }
30 | }
--------------------------------------------------------------------------------
/initializr-bom/src/main/xslt/post-process-flattened-pom.xsl:
--------------------------------------------------------------------------------
1 |
2 |
5 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/initializr-docs/src/main/asciidoc/api-guide.adoc:
--------------------------------------------------------------------------------
1 | [[api-guide]]
2 | = API Guide
3 |
4 | include::metadata-format.adoc[leveloffset=+1]
5 |
6 | include::using-the-stubs.adoc[leveloffset=+1]
7 |
--------------------------------------------------------------------------------
/initializr-docs/src/main/java/io/spring/initializr/doc/generator/project/CustomProjectRequest.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.doc.generator.project;
18 |
19 | import io.spring.initializr.web.project.WebProjectRequest;
20 |
21 | /**
22 | * A sample custom {@link WebProjectRequest}.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class CustomProjectRequest extends WebProjectRequest {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/initializr-docs/src/main/java/io/spring/initializr/doc/generator/project/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Document code snippet for project generation.
19 | */
20 | package io.spring.initializr.doc.generator.project;
21 |
--------------------------------------------------------------------------------
/initializr-docs/src/test/java/io/spring/initializr/stub/SampleApp.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.stub;
18 |
19 | import io.spring.initializr.actuate.autoconfigure.InitializrActuatorEndpointsAutoConfiguration;
20 | import io.spring.initializr.web.autoconfigure.InitializrAutoConfiguration;
21 |
22 | import org.springframework.boot.autoconfigure.SpringBootApplication;
23 |
24 | /**
25 | * A sample app where the Initializr auto-configuration has been disabled.
26 | *
27 | * @author Stephane Nicoll
28 | */
29 | @SpringBootApplication(
30 | exclude = { InitializrAutoConfiguration.class, InitializrActuatorEndpointsAutoConfiguration.class })
31 | public class SampleApp {
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/initializr-docs/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/gradle/GradleWrapperContributor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.spring.build.gradle;
18 |
19 | import io.spring.initializr.generator.project.contributor.MultipleResourcesProjectContributor;
20 |
21 | /**
22 | * A {@link MultipleResourcesProjectContributor} that contributes Gradle's wrapper to a
23 | * project.
24 | *
25 | * @author Andy Wilkinson
26 | */
27 | class GradleWrapperContributor extends MultipleResourcesProjectContributor {
28 |
29 | GradleWrapperContributor(String gradleVersion) {
30 | super("classpath:gradle/" + gradleVersion + "/wrapper",
31 | (filename) -> filename.equals("gradlew") || filename.equals("gradlew.bat"));
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/gradle/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Gradle build contributors.
19 | */
20 | package io.spring.initializr.generator.spring.build.gradle;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/maven/MavenWrapperContributor.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.spring.build.maven;
18 |
19 | import io.spring.initializr.generator.project.contributor.MultipleResourcesProjectContributor;
20 |
21 | /**
22 | * A {@link MultipleResourcesProjectContributor} that contributes Maven's wrapper to a
23 | * project.
24 | *
25 | * @author Andy Wilkinson
26 | */
27 | class MavenWrapperContributor extends MultipleResourcesProjectContributor {
28 |
29 | MavenWrapperContributor(String mavenVersion) {
30 | super("classpath:maven/" + mavenVersion + "/wrapper",
31 | (filename) -> filename.equals("mvnw") || filename.equals("mvnw.cmd"));
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/maven/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Maven build contributors.
19 | */
20 | package io.spring.initializr.generator.spring.build.maven;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Build contributors. Generate a build according to the chosen Spring Boot generation.
19 | */
20 | package io.spring.initializr.generator.spring.build;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/code/groovy/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Groovy code contributors.
19 | */
20 | package io.spring.initializr.generator.spring.code.groovy;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/code/java/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Java code contributors.
19 | */
20 | package io.spring.initializr.generator.spring.code.java;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/code/kotlin/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Kotlin code contributors.
19 | */
20 | package io.spring.initializr.generator.spring.code.kotlin;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/code/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Code contributors. Generate a main and test classes as well as a
19 | * {@code ServletInitializer} class with {@code war} packaging.
20 | */
21 | package io.spring.initializr.generator.spring.code;
22 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/configuration/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Configuration contributors. Generate additional project structure or configuration
19 | * assets based on requested dependencies.
20 | */
21 | package io.spring.initializr.generator.spring.configuration;
22 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/container/docker/compose/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for Docker Compose.
19 | */
20 | package io.spring.initializr.generator.spring.container.docker.compose;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/documentation/HelpDocumentCustomizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.spring.documentation;
18 |
19 | import org.springframework.core.Ordered;
20 |
21 | /**
22 | * Callback for customizing a project's {@link HelpDocument}. Invoked with an
23 | * {@link Ordered order} of {@code 0} by default, considering overriding
24 | * {@link #getOrder()} to customize this behaviour.
25 | *
26 | * @author Stephane Nicoll
27 | */
28 | @FunctionalInterface
29 | public interface HelpDocumentCustomizer extends Ordered {
30 |
31 | void customize(HelpDocument document);
32 |
33 | @Override
34 | default int getOrder() {
35 | return 0;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/documentation/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Documentation contributors. Generate a {@code HELP.md} at the root of the project with
19 | * additional information based on requested dependencies.
20 | */
21 | package io.spring.initializr.generator.spring.documentation;
22 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/properties/ApplicationPropertiesCustomizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2024 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.spring.properties;
18 |
19 | /**
20 | * Callback for customizing a project's {@link ApplicationProperties}.
21 | *
22 | * @author Moritz Halbritter
23 | */
24 | @FunctionalInterface
25 | public interface ApplicationPropertiesCustomizer {
26 |
27 | /**
28 | * Customizes the project's {@link ApplicationProperties}.
29 | * @param properties the properties to customize
30 | */
31 | void customize(ApplicationProperties properties);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/properties/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2024 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for application properties.
19 | */
20 | package io.spring.initializr.generator.spring.properties;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/scm/git/GitAttributesCustomizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.spring.scm.git;
18 |
19 | import org.springframework.core.Ordered;
20 |
21 | /**
22 | * Callback for customizing a project's {@link GitAttributes}. Invoked with an
23 | * {@link Ordered order} of {@code 0} by default, considering overriding
24 | * {@link #getOrder()} to customize this behaviour.
25 | *
26 | * @author Moritz Halbritter
27 | */
28 | @FunctionalInterface
29 | public interface GitAttributesCustomizer extends Ordered {
30 |
31 | void customize(GitAttributes gitAttributes);
32 |
33 | @Override
34 | default int getOrder() {
35 | return 0;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/scm/git/GitIgnoreCustomizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.spring.scm.git;
18 |
19 | import org.springframework.core.Ordered;
20 |
21 | /**
22 | * Callback for customizing a project's {@link GitIgnore}. Invoked with an {@link Ordered
23 | * order} of {@code 0} by default, considering overriding {@link #getOrder()} to customize
24 | * this behaviour.
25 | *
26 | * @author Stephane Nicoll
27 | */
28 | @FunctionalInterface
29 | public interface GitIgnoreCustomizer extends Ordered {
30 |
31 | void customize(GitIgnore gitIgnore);
32 |
33 | @Override
34 | default int getOrder() {
35 | return 0;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/scm/git/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Git contributors. Generate a sensible {@code .gitignore}.
19 | */
20 | package io.spring.initializr.generator.spring.scm.git;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/util/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Miscellaneous utility classes.
19 | */
20 | package io.spring.initializr.generator.spring.util;
21 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | io.spring.initializr.generator.project.ProjectGenerationConfiguration=\
2 | io.spring.initializr.generator.spring.build.BuildProjectGenerationConfiguration,\
3 | io.spring.initializr.generator.spring.build.gradle.GradleProjectGenerationConfiguration,\
4 | io.spring.initializr.generator.spring.build.maven.MavenProjectGenerationConfiguration,\
5 | io.spring.initializr.generator.spring.code.SourceCodeProjectGenerationConfiguration,\
6 | io.spring.initializr.generator.spring.code.groovy.GroovyProjectGenerationConfiguration,\
7 | io.spring.initializr.generator.spring.code.java.JavaProjectGenerationConfiguration,\
8 | io.spring.initializr.generator.spring.code.kotlin.KotlinProjectGenerationConfiguration,\
9 | io.spring.initializr.generator.spring.configuration.ApplicationConfigurationProjectGenerationConfiguration,\
10 | io.spring.initializr.generator.spring.documentation.HelpDocumentProjectGenerationConfiguration,\
11 | io.spring.initializr.generator.spring.properties.ApplicationPropertiesProjectGenerationConfiguration,\
12 | io.spring.initializr.generator.spring.scm.git.GitProjectGenerationConfiguration
13 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/gradle/8/wrapper/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/spring-io/initializr/645394d27215e635bcb1102e34109040e8eecb8f/initializr-generator-spring/src/main/resources/gradle/8/wrapper/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/gradle/8/wrapper/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip
4 | networkTimeout=10000
5 | validateDistributionUrl=true
6 | zipStoreBase=GRADLE_USER_HOME
7 | zipStorePath=wrapper/dists
8 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/maven/3/wrapper/.mvn/wrapper/maven-wrapper.properties:
--------------------------------------------------------------------------------
1 | # Licensed to the Apache Software Foundation (ASF) under one
2 | # or more contributor license agreements. See the NOTICE file
3 | # distributed with this work for additional information
4 | # regarding copyright ownership. The ASF licenses this file
5 | # to you under the Apache License, Version 2.0 (the
6 | # "License"); you may not use this file except in compliance
7 | # with the License. You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing,
12 | # software distributed under the License is distributed on an
13 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 | # KIND, either express or implied. See the License for the
15 | # specific language governing permissions and limitations
16 | # under the License.
17 | wrapperVersion=3.3.2
18 | distributionType=only-script
19 | distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
20 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/templates/documentation/additional-links.mustache:
--------------------------------------------------------------------------------
1 | ### Additional Links
2 | These additional references should also help you:
3 |
4 | {{#items}}
5 | * [{{description}}]({{href}})
6 | {{/items}}
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/templates/documentation/docker-compose.mustache:
--------------------------------------------------------------------------------
1 | ### Docker Compose support
2 | This project contains a Docker Compose file named `compose.yaml`.
3 | {{#services.size}}
4 | In this file, the following services have been defined:
5 |
6 | {{#services}}
7 | * {{name}}: [`{{image}}:{{imageTag}}`]({{imageWebsite}})
8 | {{/services}}
9 |
10 | Please review the tags of the used images and set them to the same as you're running in production.
11 | {{/services.size}}{{^services}}
12 | However, no services were found. As of now, the application won't start!
13 |
14 | Please make sure to add at least one service in the `compose.yaml` file.
15 | {{/services}}
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/templates/documentation/guides.mustache:
--------------------------------------------------------------------------------
1 | ### Guides
2 | The following guides illustrate how to use some features concretely:
3 |
4 | {{#items}}
5 | * [{{description}}]({{href}})
6 | {{/items}}
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/templates/documentation/parent-overrides.mustache:
--------------------------------------------------------------------------------
1 | ### Maven Parent overrides
2 |
3 | Due to Maven's design, elements are inherited from the parent POM to the project POM.
4 | While most of the inheritance is fine, it also inherits unwanted elements like `` and `` from the parent.
5 | To prevent this, the project POM contains empty overrides for these elements.
6 | If you manually switch to a different parent and actually want the inheritance, you need to remove those overrides.
7 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/templates/documentation/reference-documentation.mustache:
--------------------------------------------------------------------------------
1 | ### Reference Documentation
2 | For further reference, please consider the following sections:
3 |
4 | {{#items}}
5 | * [{{description}}]({{href}})
6 | {{/items}}
--------------------------------------------------------------------------------
/initializr-generator-spring/src/main/resources/templates/documentation/warnings.mustache:
--------------------------------------------------------------------------------
1 | # Read Me First
2 | The following was discovered as part of building this project:
3 |
4 | {{#items}}
5 | * {{.}}
6 | {{/items}}
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ${CONSOLE_LOG_PATTERN}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | configurations {
17 | compileOnly {
18 | extendsFrom annotationProcessor
19 | }
20 | }
21 |
22 | repositories {
23 | mavenCentral()
24 | }
25 |
26 | dependencies {
27 | implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
28 | implementation 'org.springframework.boot:spring-boot-starter-web'
29 | annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
30 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
31 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
32 | }
33 |
34 | tasks.named('test') {
35 | useJUnitPlatform()
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | configurations {
17 | compileOnly {
18 | extendsFrom(configurations.annotationProcessor.get())
19 | }
20 | }
21 |
22 | repositories {
23 | mavenCentral()
24 | }
25 |
26 | dependencies {
27 | implementation("org.springframework.boot:spring-boot-starter-data-jpa")
28 | implementation("org.springframework.boot:spring-boot-starter-web")
29 | annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
30 | testImplementation("org.springframework.boot:spring-boot-starter-test")
31 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
32 | }
33 |
34 | tasks.withType {
35 | useJUnitPlatform()
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation 'org.acme:foo'
22 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
23 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
24 | }
25 |
26 | dependencyManagement {
27 | imports {
28 | mavenBom 'org.acme:bar-bom:1.0'
29 | mavenBom 'org.acme:biz-bom:1.0'
30 | mavenBom 'org.acme:foo-bom:1.0'
31 | }
32 | }
33 |
34 | tasks.named('test') {
35 | useJUnitPlatform()
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation("org.acme:foo")
22 | testImplementation("org.springframework.boot:spring-boot-starter-test")
23 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
24 | }
25 |
26 | dependencyManagement {
27 | imports {
28 | mavenBom("org.acme:bar-bom:1.0")
29 | mavenBom("org.acme:biz-bom:1.0")
30 | mavenBom("org.acme:foo-bom:1.0")
31 | }
32 | }
33 |
34 | tasks.withType {
35 | useJUnitPlatform()
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | ext {
21 | set('fooVersion', "1.3.3")
22 | }
23 |
24 | dependencies {
25 | implementation 'org.acme:foo'
26 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
27 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
28 | }
29 |
30 | dependencyManagement {
31 | imports {
32 | mavenBom "org.acme:foo-bom:${fooVersion}"
33 | }
34 | }
35 |
36 | tasks.named('test') {
37 | useJUnitPlatform()
38 | }
39 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | extra["fooVersion"] = "1.3.3"
21 |
22 | dependencies {
23 | implementation("org.acme:foo")
24 | testImplementation("org.springframework.boot:spring-boot-starter-test")
25 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
26 | }
27 |
28 | dependencyManagement {
29 | imports {
30 | mavenBom("org.acme:foo-bom:${property("fooVersion")}")
31 | }
32 | }
33 |
34 | tasks.withType {
35 | useJUnitPlatform()
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
22 | implementation 'org.springframework.boot:spring-boot-starter-web'
23 | compileOnly 'org.acme:foo'
24 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
25 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
26 | }
27 |
28 | tasks.named('test') {
29 | useJUnitPlatform()
30 | }
31 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation("org.springframework.boot:spring-boot-starter-data-jpa")
22 | implementation("org.springframework.boot:spring-boot-starter-web")
23 | compileOnly("org.acme:foo")
24 | testImplementation("org.springframework.boot:spring-boot-starter-test")
25 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
26 | }
27 |
28 | tasks.withType {
29 | useJUnitPlatform()
30 | }
31 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/gitignore.gen:
--------------------------------------------------------------------------------
1 | .gradle
2 | /build/
3 | !gradle/wrapper/gradle-wrapper.jar
4 |
5 | ### STS ###
6 | .apt_generated
7 | .classpath
8 | .factorypath
9 | .project
10 | .settings
11 | .springBeans
12 | .sts4-cache
13 |
14 | ### IntelliJ IDEA ###
15 | .idea
16 | *.iws
17 | *.iml
18 | *.ipr
19 | /out/
20 |
21 | ### NetBeans ###
22 | /nbproject/private/
23 | /nbbuild/
24 | /dist/
25 | /nbdist/
26 | /.nb-gradle/
27 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'org.jetbrains.kotlin.jvm' version '1.1.1'
3 | id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
4 | id 'org.springframework.boot' version '2.4.1'
5 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
6 | }
7 |
8 | group = 'com.example'
9 | version = '0.0.1-SNAPSHOT'
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(11)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation 'org.springframework.boot:spring-boot-starter'
23 | implementation 'org.jetbrains.kotlin:kotlin-reflect'
24 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
25 | testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
26 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
27 | }
28 |
29 | kotlin {
30 | compilerOptions {
31 | freeCompilerArgs.addAll '-Xjsr305=strict'
32 | }
33 | }
34 |
35 | tasks.named('test') {
36 | useJUnitPlatform()
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("jvm") version "1.1.1"
3 | kotlin("plugin.spring") version "1.1.1"
4 | id("org.springframework.boot") version "2.4.1"
5 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
6 | }
7 |
8 | group = "com.example"
9 | version = "0.0.1-SNAPSHOT"
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(11)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation("org.springframework.boot:spring-boot-starter")
23 | implementation("org.jetbrains.kotlin:kotlin-reflect")
24 | testImplementation("org.springframework.boot:spring-boot-starter-test")
25 | testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
26 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
27 | }
28 |
29 | kotlin {
30 | compilerOptions {
31 | freeCompilerArgs.addAll("-Xjsr305=strict")
32 | }
33 | }
34 |
35 | tasks.withType {
36 | useJUnitPlatform()
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | maven { url 'https://example.com/foo' }
19 | maven { url 'https://example.com/bar' }
20 | }
21 |
22 | dependencies {
23 | implementation 'org.acme:bar'
24 | implementation 'org.acme:foo'
25 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
26 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
27 | }
28 |
29 | tasks.named('test') {
30 | useJUnitPlatform()
31 | }
32 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | maven { url = uri("https://example.com/foo") }
19 | maven { url = uri("https://example.com/bar") }
20 | }
21 |
22 | dependencies {
23 | implementation("org.acme:bar")
24 | implementation("org.acme:foo")
25 | testImplementation("org.springframework.boot:spring-boot-starter-test")
26 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
27 | }
28 |
29 | tasks.withType {
30 | useJUnitPlatform()
31 | }
32 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.0-M1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | maven { url 'https://repo.spring.io/milestone' }
19 | }
20 |
21 | dependencies {
22 | implementation 'org.acme:foo'
23 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
24 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
25 | }
26 |
27 | tasks.named('test') {
28 | useJUnitPlatform()
29 | }
30 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.0-M1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | maven { url = uri("https://repo.spring.io/milestone") }
19 | }
20 |
21 | dependencies {
22 | implementation("org.acme:foo")
23 | testImplementation("org.springframework.boot:spring-boot-starter-test")
24 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
25 | }
26 |
27 | tasks.withType {
28 | useJUnitPlatform()
29 | }
30 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | ext {
21 | set('springBarVersion', "0.2.0.RELEASE")
22 | set('spring-foo.version', "0.1.0.RELEASE")
23 | }
24 |
25 | dependencies {
26 | implementation 'org.springframework.boot:spring-boot-starter-web'
27 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
28 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
29 | }
30 |
31 | tasks.named('test') {
32 | useJUnitPlatform()
33 | }
34 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | extra["springBarVersion"] = "0.2.0.RELEASE"
21 | extra["spring-foo.version"] = "0.1.0.RELEASE"
22 |
23 | dependencies {
24 | implementation("org.springframework.boot:spring-boot-starter-web")
25 | testImplementation("org.springframework.boot:spring-boot-starter-test")
26 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
27 | }
28 |
29 | tasks.withType {
30 | useJUnitPlatform()
31 | }
32 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'groovy'
3 | id 'org.springframework.boot' version '3.0.0'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(17)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation 'org.springframework.boot:spring-boot-starter'
22 | implementation 'org.apache.groovy:groovy'
23 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
24 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
25 | }
26 |
27 | tasks.named('test') {
28 | useJUnitPlatform()
29 | }
30 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | groovy
3 | id("org.springframework.boot") version "3.0.0"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(17)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation("org.springframework.boot:spring-boot-starter")
22 | implementation("org.apache.groovy:groovy")
23 | testImplementation("org.springframework.boot:spring-boot-starter-test")
24 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
25 | }
26 |
27 | tasks.withType {
28 | useJUnitPlatform()
29 | }
30 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/DemoApplication.groovy.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.springframework.boot.SpringApplication
4 | import org.springframework.boot.autoconfigure.SpringBootApplication
5 |
6 | @SpringBootApplication
7 | class DemoApplication {
8 |
9 | static void main(String[] args) {
10 | SpringApplication.run(DemoApplication, args)
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/DemoApplicationTests.groovy.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.junit.jupiter.api.Test
4 | import org.springframework.boot.test.context.SpringBootTest
5 |
6 | @SpringBootTest
7 | class DemoApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/DemoApplicationTestsWeb.groovy.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.junit.jupiter.api.Test
4 | import org.springframework.boot.test.context.SpringBootTest
5 |
6 | @SpringBootTest
7 | class DemoApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/MyProjectApplication.groovy.gen:
--------------------------------------------------------------------------------
1 | package com.example.acme.myproject
2 |
3 | import org.springframework.boot.SpringApplication
4 | import org.springframework.boot.autoconfigure.SpringBootApplication
5 |
6 | @SpringBootApplication
7 | class MyProjectApplication {
8 |
9 | static void main(String[] args) {
10 | SpringApplication.run(MyProjectApplication, args)
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/MyProjectApplicationTests.groovy.gen:
--------------------------------------------------------------------------------
1 | package com.example.acme.myproject
2 |
3 | import org.junit.jupiter.api.Test
4 | import org.springframework.boot.test.context.SpringBootTest
5 |
6 | @SpringBootTest
7 | class MyProjectApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/ServletInitializer.groovy.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder
4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
5 |
6 | class ServletInitializer extends SpringBootServletInitializer {
7 |
8 | @Override
9 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
10 | application.sources(DemoApplication)
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'groovy'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation 'org.springframework.boot:spring-boot-starter'
22 | implementation 'org.codehaus.groovy:groovy'
23 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
24 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
25 | }
26 |
27 | tasks.named('test') {
28 | useJUnitPlatform()
29 | }
30 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | groovy
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation("org.springframework.boot:spring-boot-starter")
22 | implementation("org.codehaus.groovy:groovy")
23 | testImplementation("org.springframework.boot:spring-boot-starter-test")
24 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
25 | }
26 |
27 | tasks.withType {
28 | useJUnitPlatform()
29 | }
30 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'groovy'
3 | id 'war'
4 | id 'org.springframework.boot' version '2.4.1'
5 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
6 | }
7 |
8 | group = 'com.example'
9 | version = '0.0.1-SNAPSHOT'
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(8)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation 'org.springframework.boot:spring-boot-starter-web'
23 | implementation 'org.codehaus.groovy:groovy'
24 | providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
25 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
26 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
27 | }
28 |
29 | tasks.named('test') {
30 | useJUnitPlatform()
31 | }
32 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | groovy
3 | war
4 | id("org.springframework.boot") version "2.4.1"
5 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
6 | }
7 |
8 | group = "com.example"
9 | version = "0.0.1-SNAPSHOT"
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(8)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation("org.springframework.boot:spring-boot-starter-web")
23 | implementation("org.codehaus.groovy:groovy")
24 | providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
25 | testImplementation("org.springframework.boot:spring-boot-starter-test")
26 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
27 | }
28 |
29 | tasks.withType {
30 | useJUnitPlatform()
31 | }
32 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/DemoApplication.java.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class DemoApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(DemoApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/DemoApplicationTests.java.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class DemoApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/DemoApplicationTestsWeb.java.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class DemoApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/MyProjectApplication.java.gen:
--------------------------------------------------------------------------------
1 | package com.example.acme.myproject;
2 |
3 | import org.springframework.boot.SpringApplication;
4 | import org.springframework.boot.autoconfigure.SpringBootApplication;
5 |
6 | @SpringBootApplication
7 | public class MyProjectApplication {
8 |
9 | public static void main(String[] args) {
10 | SpringApplication.run(MyProjectApplication.class, args);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/MyProjectApplicationTests.java.gen:
--------------------------------------------------------------------------------
1 | package com.example.acme.myproject;
2 |
3 | import org.junit.jupiter.api.Test;
4 | import org.springframework.boot.test.context.SpringBootTest;
5 |
6 | @SpringBootTest
7 | class MyProjectApplicationTests {
8 |
9 | @Test
10 | void contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/ServletInitializer.java.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo;
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder;
4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
5 |
6 | public class ServletInitializer extends SpringBootServletInitializer {
7 |
8 | @Override
9 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
10 | return application.sources(DemoApplication.class);
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'org.springframework.boot' version '2.4.1'
4 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
5 | }
6 |
7 | group = 'com.example'
8 | version = '0.0.1-SNAPSHOT'
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation 'org.springframework.boot:spring-boot-starter'
22 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
23 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
24 | }
25 |
26 | tasks.named('test') {
27 | useJUnitPlatform()
28 | }
29 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | id("org.springframework.boot") version "2.4.1"
4 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
5 | }
6 |
7 | group = "com.example"
8 | version = "0.0.1-SNAPSHOT"
9 |
10 | java {
11 | toolchain {
12 | languageVersion = JavaLanguageVersion.of(8)
13 | }
14 | }
15 |
16 | repositories {
17 | mavenCentral()
18 | }
19 |
20 | dependencies {
21 | implementation("org.springframework.boot:spring-boot-starter")
22 | testImplementation("org.springframework.boot:spring-boot-starter-test")
23 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
24 | }
25 |
26 | tasks.withType {
27 | useJUnitPlatform()
28 | }
29 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'java'
3 | id 'war'
4 | id 'org.springframework.boot' version '2.4.1'
5 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
6 | }
7 |
8 | group = 'com.example'
9 | version = '0.0.1-SNAPSHOT'
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(8)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation 'org.springframework.boot:spring-boot-starter-web'
23 | providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
24 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
25 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
26 | }
27 |
28 | tasks.named('test') {
29 | useJUnitPlatform()
30 | }
31 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | java
3 | war
4 | id("org.springframework.boot") version "2.4.1"
5 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
6 | }
7 |
8 | group = "com.example"
9 | version = "0.0.1-SNAPSHOT"
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(8)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation("org.springframework.boot:spring-boot-starter-web")
23 | providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
24 | testImplementation("org.springframework.boot:spring-boot-starter-test")
25 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
26 | }
27 |
28 | tasks.withType {
29 | useJUnitPlatform()
30 | }
31 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/DemoApplication.kt.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication
4 | import org.springframework.boot.runApplication
5 |
6 | @SpringBootApplication
7 | class DemoApplication
8 |
9 | fun main(args: Array) {
10 | runApplication(*args)
11 | }
12 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/DemoApplicationTests.kt.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.junit.jupiter.api.Test
4 | import org.springframework.boot.test.context.SpringBootTest
5 |
6 | @SpringBootTest
7 | class DemoApplicationTests {
8 |
9 | @Test
10 | fun contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/DemoApplicationTestsWeb.kt.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.junit.jupiter.api.Test
4 | import org.springframework.boot.test.context.SpringBootTest
5 |
6 | @SpringBootTest
7 | class DemoApplicationTests {
8 |
9 | @Test
10 | fun contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/MyProjectApplication.kt.gen:
--------------------------------------------------------------------------------
1 | package com.example.acme.myproject
2 |
3 | import org.springframework.boot.autoconfigure.SpringBootApplication
4 | import org.springframework.boot.runApplication
5 |
6 | @SpringBootApplication
7 | class MyProjectApplication
8 |
9 | fun main(args: Array) {
10 | runApplication(*args)
11 | }
12 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/MyProjectApplicationTests.kt.gen:
--------------------------------------------------------------------------------
1 | package com.example.acme.myproject
2 |
3 | import org.junit.jupiter.api.Test
4 | import org.springframework.boot.test.context.SpringBootTest
5 |
6 | @SpringBootTest
7 | class MyProjectApplicationTests {
8 |
9 | @Test
10 | fun contextLoads() {
11 | }
12 |
13 | }
14 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/ServletInitializer.kt.gen:
--------------------------------------------------------------------------------
1 | package com.example.demo
2 |
3 | import org.springframework.boot.builder.SpringApplicationBuilder
4 | import org.springframework.boot.web.servlet.support.SpringBootServletInitializer
5 |
6 | class ServletInitializer : SpringBootServletInitializer() {
7 |
8 | override fun configure(application: SpringApplicationBuilder): SpringApplicationBuilder {
9 | return application.sources(DemoApplication::class.java)
10 | }
11 |
12 | }
13 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'org.jetbrains.kotlin.jvm' version '1.1.1'
3 | id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
4 | id 'org.springframework.boot' version '2.4.1'
5 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
6 | }
7 |
8 | group = 'com.example'
9 | version = '0.0.1-SNAPSHOT'
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(8)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation 'org.springframework.boot:spring-boot-starter'
23 | implementation 'org.jetbrains.kotlin:kotlin-reflect'
24 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
25 | testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
26 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
27 | }
28 |
29 | kotlin {
30 | compilerOptions {
31 | freeCompilerArgs.addAll '-Xjsr305=strict'
32 | }
33 | }
34 |
35 | tasks.named('test') {
36 | useJUnitPlatform()
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("jvm") version "1.1.1"
3 | kotlin("plugin.spring") version "1.1.1"
4 | id("org.springframework.boot") version "2.4.1"
5 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
6 | }
7 |
8 | group = "com.example"
9 | version = "0.0.1-SNAPSHOT"
10 |
11 | java {
12 | toolchain {
13 | languageVersion = JavaLanguageVersion.of(8)
14 | }
15 | }
16 |
17 | repositories {
18 | mavenCentral()
19 | }
20 |
21 | dependencies {
22 | implementation("org.springframework.boot:spring-boot-starter")
23 | implementation("org.jetbrains.kotlin:kotlin-reflect")
24 | testImplementation("org.springframework.boot:spring-boot-starter-test")
25 | testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
26 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
27 | }
28 |
29 | kotlin {
30 | compilerOptions {
31 | freeCompilerArgs.addAll("-Xjsr305=strict")
32 | }
33 | }
34 |
35 | tasks.withType {
36 | useJUnitPlatform()
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'org.jetbrains.kotlin.jvm' version '1.1.1'
3 | id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
4 | id 'war'
5 | id 'org.springframework.boot' version '2.4.1'
6 | id 'io.spring.dependency-management' version '1.0.6.RELEASE'
7 | }
8 |
9 | group = 'com.example'
10 | version = '0.0.1-SNAPSHOT'
11 |
12 | java {
13 | toolchain {
14 | languageVersion = JavaLanguageVersion.of(8)
15 | }
16 | }
17 |
18 | repositories {
19 | mavenCentral()
20 | }
21 |
22 | dependencies {
23 | implementation 'org.springframework.boot:spring-boot-starter-web'
24 | implementation 'org.jetbrains.kotlin:kotlin-reflect'
25 | providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat'
26 | testImplementation 'org.springframework.boot:spring-boot-starter-test'
27 | testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5'
28 | testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
29 | }
30 |
31 | kotlin {
32 | compilerOptions {
33 | freeCompilerArgs.addAll '-Xjsr305=strict'
34 | }
35 | }
36 |
37 | tasks.named('test') {
38 | useJUnitPlatform()
39 | }
40 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.kts.gen:
--------------------------------------------------------------------------------
1 | plugins {
2 | kotlin("jvm") version "1.1.1"
3 | kotlin("plugin.spring") version "1.1.1"
4 | war
5 | id("org.springframework.boot") version "2.4.1"
6 | id("io.spring.dependency-management") version "1.0.6.RELEASE"
7 | }
8 |
9 | group = "com.example"
10 | version = "0.0.1-SNAPSHOT"
11 |
12 | java {
13 | toolchain {
14 | languageVersion = JavaLanguageVersion.of(8)
15 | }
16 | }
17 |
18 | repositories {
19 | mavenCentral()
20 | }
21 |
22 | dependencies {
23 | implementation("org.springframework.boot:spring-boot-starter-web")
24 | implementation("org.jetbrains.kotlin:kotlin-reflect")
25 | providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")
26 | testImplementation("org.springframework.boot:spring-boot-starter-test")
27 | testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
28 | testRuntimeOnly("org.junit.platform:junit-platform-launcher")
29 | }
30 |
31 | kotlin {
32 | compilerOptions {
33 | freeCompilerArgs.addAll("-Xjsr305=strict")
34 | }
35 | }
36 |
37 | tasks.withType {
38 | useJUnitPlatform()
39 | }
40 |
--------------------------------------------------------------------------------
/initializr-generator-spring/src/test/resources/project/maven/gitignore.gen:
--------------------------------------------------------------------------------
1 | /target/
2 | .mvn/wrapper/maven-wrapper.jar
3 |
4 | ### STS ###
5 | .apt_generated
6 | .classpath
7 | .factorypath
8 | .project
9 | .settings
10 | .springBeans
11 | .sts4-cache
12 |
13 | ### IntelliJ IDEA ###
14 | .idea
15 | *.iws
16 | *.iml
17 | *.ipr
18 |
19 | ### NetBeans ###
20 | /nbproject/private/
21 | /nbbuild/
22 | /dist/
23 | /nbdist/
24 | /.nb-gradle/
25 | /build/
26 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/buildsystem/gradle/GroovyDslGradleSettingsAssert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.test.buildsystem.gradle;
18 |
19 | /**
20 | * Simple assertions for a gradle settings using the Groovy DSL.
21 | *
22 | * @author Stephane Nicoll
23 | */
24 | public class GroovyDslGradleSettingsAssert extends GradleSettingsAssert {
25 |
26 | public GroovyDslGradleSettingsAssert(String content) {
27 | super(content, GroovyDslGradleSettingsAssert.class);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/buildsystem/gradle/KotlinDslGradleSettingsAssert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.test.buildsystem.gradle;
18 |
19 | /**
20 | * Simple assertions for a gradle settings using the Kotlin DSL.
21 | *
22 | * @author Prithvi singh
23 | */
24 | public class KotlinDslGradleSettingsAssert extends GradleSettingsAssert {
25 |
26 | protected KotlinDslGradleSettingsAssert(String content) {
27 | super(content, KotlinDslGradleSettingsAssert.class);
28 | }
29 |
30 | }
31 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/buildsystem/gradle/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing a Gradle build.
19 | */
20 | package io.spring.initializr.generator.test.buildsystem.gradle;
21 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/buildsystem/maven/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing a Maven build.
19 | */
20 | package io.spring.initializr.generator.test.buildsystem.maven;
21 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/io/TextAssert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.test.io;
18 |
19 | import java.nio.file.Path;
20 |
21 | /**
22 | * Assertions for text content.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class TextAssert extends AbstractTextAssert {
27 |
28 | public TextAssert(String actual) {
29 | super(actual, TextAssert.class);
30 | }
31 |
32 | public TextAssert(Path textFile) {
33 | super(textFile, TextAssert.class);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/io/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing project assets.
19 | */
20 | package io.spring.initializr.generator.test.io;
21 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing project generation.
19 | */
20 | package io.spring.initializr.generator.test;
21 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/project/JvmModuleAssert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.test.project;
18 |
19 | import java.nio.file.Path;
20 |
21 | import io.spring.initializr.generator.language.Language;
22 |
23 | /**
24 | * Assertions for a module with code for a particular {@link Language}.
25 | *
26 | * @author Stephane Nicoll
27 | */
28 | public class JvmModuleAssert extends AbstractJvmModuleAssert {
29 |
30 | public JvmModuleAssert(Path projectDirectory, Language language) {
31 | super(projectDirectory, language, JvmModuleAssert.class);
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/project/ModuleAssert.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.test.project;
18 |
19 | import java.nio.file.Path;
20 |
21 | /**
22 | * Assertions for a module.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class ModuleAssert extends AbstractModuleAssert {
27 |
28 | public ModuleAssert(Path projectDirectory) {
29 | super(projectDirectory, ModuleAssert.class);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/main/java/io/spring/initializr/generator/test/project/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for testing project generation.
19 | */
20 | package io.spring.initializr.generator.test.project;
21 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ${CONSOLE_LOG_PATTERN}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/gradle/sample-build.gradle:
--------------------------------------------------------------------------------
1 | plugins {
2 | id 'com.example' version '1.0.0.RELEASE'
3 | id 'java'
4 | }
5 |
6 | group = 'com.example'
7 | version = '0.0.1-SNAPSHOT'
8 | sourceCompatibility = '1.8'
9 |
10 | repositories {
11 | mavenCentral()
12 | }
13 |
14 | ext {
15 | set('acmeVersion', "Brussels.SR2")
16 | }
17 |
18 | dependencies {
19 | implementation 'com.example.acme:library'
20 | testImplementation 'com.example.acme:library-test'
21 | }
22 |
23 | dependencyManagement {
24 | imports {
25 | mavenBom "com.example.acme:library-bom:${acmeVersion}"
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/gradle/sample-build.gradle.kts:
--------------------------------------------------------------------------------
1 | plugins {
2 | id("com.example") version "1.0.0.RELEASE"
3 | id("java")
4 | }
5 |
6 | group = "com.example"
7 | version = "0.0.1-SNAPSHOT"
8 | sourceCompatibility = "1.8"
9 |
10 | repositories {
11 | mavenCentral()
12 | }
13 |
14 | ext {
15 | set("acmeVersion", "Brussels.SR2")
16 | }
17 |
18 | dependencies {
19 | implementation "com.example.acme:library"
20 | testImplementation "com.example.acme:library-test"
21 | }
22 |
23 | dependencyManagement {
24 | imports {
25 | mavenBom "com.example.acme:library-bom:${acmeVersion}"
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/gradle/sample-settings.gradle:
--------------------------------------------------------------------------------
1 | rootProject.name = 'demo'
2 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/gradle/sample-settings.gradle.kts:
--------------------------------------------------------------------------------
1 | rootProject.name = 'demo'
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/maven/sample-dependency-multiple-identical-gav-pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | com.example
7 | demo
8 | 0.0.1-SNAPSHOT
9 |
10 |
11 |
12 | com.example.acme
13 | library
14 | 1.2.0
15 |
16 |
17 |
18 | com.example.acme
19 | library
20 | 1.2.0
21 | test
22 | test-jar
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/maven/sample-dependency-version-pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | com.example
7 | demo
8 | 0.0.1-SNAPSHOT
9 |
10 |
11 |
12 | com.example.acme
13 | library
14 | 1.2.0
15 |
16 |
17 |
18 | com.example.acme
19 | library-test
20 | 1.3.0
21 | test
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/maven/sample-packaging-pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | com.example
7 | demo
8 | 0.0.1-SNAPSHOT
9 | zip
10 |
11 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/maven/sample-profiles-pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | com.example
7 | demo
8 | 0.0.1-SNAPSHOT
9 |
10 |
11 |
12 | one
13 |
14 |
15 | two
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/initializr-generator-test/src/test/resources/project/build/maven/sample-repositories-pom.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 | 4.0.0
6 | com.example
7 | demo
8 | 0.0.1-SNAPSHOT
9 |
10 |
11 |
12 | acme-milestones
13 | Acme Milestones
14 | https://repo.example.com/milestone
15 |
16 |
17 | acme-snapshots
18 | Acme Snapshots
19 | https://repo.example.com/snapshot
20 |
21 | true
22 |
23 |
24 |
25 | acme-empty
26 | Acme Empty
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/BuildWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.buildsystem;
18 |
19 | import java.io.IOException;
20 | import java.io.Writer;
21 |
22 | /**
23 | * Strategy that can be implemented by a {@link BuildSystem} that can generate a proper
24 | * build representation for the project in a single text asset.
25 | *
26 | * @author Stephane Nicoll
27 | */
28 | public interface BuildWriter {
29 |
30 | /**
31 | * Write the {@link Build} to the specified {@link Writer}.
32 | * @param out the writer to use
33 | * @throws IOException if writing the build to {@code out} failed
34 | */
35 | void writeBuild(Writer out) throws IOException;
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/GroovyDslGradleSettingsWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.buildsystem.gradle;
18 |
19 | /**
20 | * A {@link GradleBuild} writer for {@code settings.gradle}.
21 | *
22 | * @author Jean-Baptiste Nizet
23 | */
24 | public class GroovyDslGradleSettingsWriter extends GradleSettingsWriter {
25 |
26 | @Override
27 | protected String wrapWithQuotes(String value) {
28 | return "'" + value + "'";
29 | }
30 |
31 | @Override
32 | protected String urlAssignment(String url) {
33 | return "url " + wrapWithQuotes(url);
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/KotlinDslGradleSettingsWriter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.buildsystem.gradle;
18 |
19 | /**
20 | * A {@link GradleBuild} writer for {@code settings.gradle.kts}.
21 | *
22 | * @author Jean-Baptiste Nizet
23 | */
24 | public class KotlinDslGradleSettingsWriter extends GradleSettingsWriter {
25 |
26 | @Override
27 | protected String wrapWithQuotes(String value) {
28 | return "\"" + value + "\"";
29 | }
30 |
31 | @Override
32 | protected String urlAssignment(String url) {
33 | return "url = uri(\"" + url + "\")";
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/StandardGradlePlugin.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.buildsystem.gradle;
18 |
19 | /**
20 | * A standard {@link GradlePlugin} used in the {@code plugins} block.
21 | *
22 | * @author HaiTao Zhang
23 | */
24 | public class StandardGradlePlugin extends GradlePlugin {
25 |
26 | private String version;
27 |
28 | public StandardGradlePlugin(String id) {
29 | super(id, false);
30 | }
31 |
32 | public void setVersion(String version) {
33 | this.version = version;
34 | }
35 |
36 | public String getVersion() {
37 | return this.version;
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/gradle/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Gradle build system. Provides a {@link io.spring.initializr.generator.buildsystem.Build
19 | * Build} abstraction and a writer for {@code build.gradle} and {@code settings.gradle}.
20 | */
21 | package io.spring.initializr.generator.buildsystem.gradle;
22 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuildSystem.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.buildsystem.maven;
18 |
19 | import io.spring.initializr.generator.buildsystem.BuildSystem;
20 |
21 | /**
22 | * Maven {@link BuildSystem}.
23 | *
24 | * @author Andy Wilkinson
25 | */
26 | public final class MavenBuildSystem implements BuildSystem {
27 |
28 | /**
29 | * Maven {@link BuildSystem} identifier.
30 | */
31 | public static final String ID = "maven";
32 |
33 | @Override
34 | public String id() {
35 | return ID;
36 | }
37 |
38 | @Override
39 | public String toString() {
40 | return id();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/MavenBuildSystemFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.buildsystem.maven;
18 |
19 | import io.spring.initializr.generator.buildsystem.BuildSystemFactory;
20 |
21 | /**
22 | * {@link BuildSystemFactory Factory} for {@link MavenBuildSystem}.
23 | *
24 | * @author Andy Wilkinson
25 | */
26 | class MavenBuildSystemFactory implements BuildSystemFactory {
27 |
28 | @Override
29 | public MavenBuildSystem createBuildSystem(String id) {
30 | if (MavenBuildSystem.ID.equals(id)) {
31 | return new MavenBuildSystem();
32 | }
33 | return null;
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/maven/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Maven build system. Provides a {@link io.spring.initializr.generator.buildsystem.Build
19 | * Build} abstraction and a writer for {@code pom.xml}.
20 | */
21 | package io.spring.initializr.generator.buildsystem.maven;
22 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/buildsystem/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Build systems abstraction.
19 | */
20 | package io.spring.initializr.generator.buildsystem;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/condition/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project generation {@code Condition} annotations and supporting classes.
19 | */
20 | package io.spring.initializr.generator.condition;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/container/docker/compose/ComposeFile.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.container.docker.compose;
18 |
19 | /**
20 | * Model for a Docker Compose file.
21 | *
22 | * @author Moritz Halbritter
23 | * @author Stephane Nicoll
24 | */
25 | public class ComposeFile {
26 |
27 | private final ComposeServiceContainer services = new ComposeServiceContainer();
28 |
29 | /**
30 | * Return the {@linkplain ComposeServiceContainer service container} to use to
31 | * configure services.
32 | * @return the {@link ComposeServiceContainer}
33 | */
34 | public ComposeServiceContainer services() {
35 | return this.services;
36 | }
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/container/docker/compose/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Docker Compose support.
19 | */
20 | package io.spring.initializr.generator.container.docker.compose;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/io/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for writing project assets.
19 | */
20 | package io.spring.initializr.generator.io;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/io/template/TemplateRenderer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.io.template;
18 |
19 | import java.io.IOException;
20 | import java.util.Map;
21 |
22 | /**
23 | * Template rendering abstraction.
24 | *
25 | * @author Stephane Nicoll
26 | */
27 | @FunctionalInterface
28 | public interface TemplateRenderer {
29 |
30 | /**
31 | * Render the template with the specified name and the specified model.
32 | * @param templateName the name of the template
33 | * @param model the model to use
34 | * @return the rendering result
35 | * @throws IOException if rendering the template failed
36 | */
37 | String render(String templateName, Map model) throws IOException;
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/io/template/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Template rendering abstraction.
19 | */
20 | package io.spring.initializr.generator.io.template;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/io/text/Section.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.io.text;
18 |
19 | import java.io.IOException;
20 | import java.io.PrintWriter;
21 |
22 | /**
23 | * Define the section of a document that knows how to write itself.
24 | *
25 | * @author Stephane Nicoll
26 | * @author Madhura Bhave
27 | */
28 | public interface Section {
29 |
30 | /**
31 | * Write the content of the section to the specified {@link PrintWriter writer}.
32 | * @param writer the writer to use
33 | * @throws IOException if writing the section failed
34 | */
35 | void write(PrintWriter writer) throws IOException;
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/io/text/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support for textual resources.
19 | */
20 | package io.spring.initializr.generator.io.text;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/Annotatable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language;
18 |
19 | /**
20 | * A representation of something that can be annotated.
21 | *
22 | * @author Andy Wilkinson
23 | * @author Stephane Nicoll
24 | */
25 | public interface Annotatable {
26 |
27 | /**
28 | * Return the {@link AnnotationContainer} to use to configure the annotations of this
29 | * element.
30 | * @return the annotation container
31 | */
32 | AnnotationContainer annotations();
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/LanguageFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language;
18 |
19 | /**
20 | * A factory for creating a {@link Language}.
21 | *
22 | * @author Andy Wilkinson
23 | */
24 | public interface LanguageFactory {
25 |
26 | /**
27 | * Creates and returns a {@link Language} for the given id and JVM version. If the
28 | * factory does not recognise the given {@code id}, {@code null} should be returned.
29 | * @param id the id of the language
30 | * @param jvmVersion the jvm version or {@code null} to use the default
31 | * @return the language or {@code null}
32 | */
33 | Language createLanguage(String id, String jvmVersion);
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyCompilationUnit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.groovy;
18 |
19 | import io.spring.initializr.generator.language.CompilationUnit;
20 |
21 | /**
22 | * A Groovy-specific {@link CompilationUnit}.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class GroovyCompilationUnit extends CompilationUnit {
27 |
28 | GroovyCompilationUnit(String packageName, String name) {
29 | super(packageName, name);
30 | }
31 |
32 | @Override
33 | protected GroovyTypeDeclaration doCreateTypeDeclaration(String name) {
34 | return new GroovyTypeDeclaration(name);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovyLanguageFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.groovy;
18 |
19 | import io.spring.initializr.generator.language.Language;
20 | import io.spring.initializr.generator.language.LanguageFactory;
21 |
22 | /**
23 | * A {@link LanguageFactory} for Groovy.
24 | *
25 | * @author Stephane Nicoll
26 | */
27 | class GroovyLanguageFactory implements LanguageFactory {
28 |
29 | @Override
30 | public Language createLanguage(String id, String jvmVersion) {
31 | if (GroovyLanguage.ID.equals(id)) {
32 | return new GroovyLanguage(jvmVersion);
33 | }
34 | return null;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/GroovySourceCode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.groovy;
18 |
19 | import io.spring.initializr.generator.language.SourceCode;
20 |
21 | /**
22 | * Groovy {@link SourceCode}.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class GroovySourceCode extends SourceCode {
27 |
28 | /**
29 | * Creates a new instance.
30 | */
31 | public GroovySourceCode() {
32 | super(GroovyCompilationUnit::new);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/groovy/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Groovy language. Provides a
19 | * {@link io.spring.initializr.generator.language.groovy.GroovyCompilationUnit compilation
20 | * unit} implementation and a write for Groovy
21 | * {@link io.spring.initializr.generator.language.groovy.GroovySourceCode source code}.
22 | */
23 | package io.spring.initializr.generator.language.groovy;
24 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaCompilationUnit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.java;
18 |
19 | import io.spring.initializr.generator.language.CompilationUnit;
20 |
21 | /**
22 | * A Java-specific {@link CompilationUnit}.
23 | *
24 | * @author Andy Wilkinson
25 | */
26 | public class JavaCompilationUnit extends CompilationUnit {
27 |
28 | JavaCompilationUnit(String packageName, String name) {
29 | super(packageName, name);
30 | }
31 |
32 | @Override
33 | protected JavaTypeDeclaration doCreateTypeDeclaration(String name) {
34 | return new JavaTypeDeclaration(name);
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaLanguageFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.java;
18 |
19 | import io.spring.initializr.generator.language.Language;
20 | import io.spring.initializr.generator.language.LanguageFactory;
21 |
22 | /**
23 | * A {@link LanguageFactory} for Java.
24 | *
25 | * @author Andy Wilkinson
26 | */
27 | class JavaLanguageFactory implements LanguageFactory {
28 |
29 | @Override
30 | public Language createLanguage(String id, String jvmVersion) {
31 | if (JavaLanguage.ID.equals(id)) {
32 | return new JavaLanguage(jvmVersion);
33 | }
34 | return null;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/JavaSourceCode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.java;
18 |
19 | import io.spring.initializr.generator.language.SourceCode;
20 |
21 | /**
22 | * Java {@link SourceCode}.
23 | *
24 | * @author Andy Wilkinson
25 | */
26 | public class JavaSourceCode extends SourceCode {
27 |
28 | /**
29 | * Creates a new instance.
30 | */
31 | public JavaSourceCode() {
32 | super(JavaCompilationUnit::new);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/java/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Java language. Provides a
19 | * {@link io.spring.initializr.generator.language.java.JavaCompilationUnit compilation
20 | * unit} implementation and a write for Java
21 | * {@link io.spring.initializr.generator.language.java.JavaSourceCode source code}.
22 | */
23 | package io.spring.initializr.generator.language.java;
24 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinLanguageFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.kotlin;
18 |
19 | import io.spring.initializr.generator.language.Language;
20 | import io.spring.initializr.generator.language.LanguageFactory;
21 |
22 | /**
23 | * A {@link LanguageFactory} for Kotlin.
24 | *
25 | * @author Stephane Nicoll
26 | */
27 | class KotlinLanguageFactory implements LanguageFactory {
28 |
29 | @Override
30 | public Language createLanguage(String id, String jvmVersion) {
31 | if (KotlinLanguage.ID.equals(id)) {
32 | return new KotlinLanguage(jvmVersion);
33 | }
34 | return null;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/KotlinSourceCode.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language.kotlin;
18 |
19 | import io.spring.initializr.generator.language.SourceCode;
20 |
21 | /**
22 | * Kotlin {@link SourceCode}.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class KotlinSourceCode extends SourceCode {
27 |
28 | /**
29 | * Creates a new instance.
30 | */
31 | public KotlinSourceCode() {
32 | super(KotlinCompilationUnit::new);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/kotlin/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Kotlin language. Provides a
19 | * {@link io.spring.initializr.generator.language.kotlin.KotlinCompilationUnit compilation
20 | * unit} implementation and a write for Kotlin
21 | * {@link io.spring.initializr.generator.language.kotlin.KotlinSourceCode source code}.
22 | */
23 | package io.spring.initializr.generator.language.kotlin;
24 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/language/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Language abstraction.
19 | */
20 | package io.spring.initializr.generator.language;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/PackagingFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.packaging;
18 |
19 | /**
20 | * A factory for creating a {@link Packaging}.
21 | *
22 | * @author Andy Wilkinson
23 | */
24 | public interface PackagingFactory {
25 |
26 | /**
27 | * Creates and returns a {@link Packaging} for the given id. If the factory does not
28 | * recognise the given {@code id}, {@code null} should be returned.
29 | * @param id the id of the packaging
30 | * @return the packaging or {@code null}
31 | */
32 | Packaging createPackaging(String id);
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/jar/JarPackaging.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.packaging.jar;
18 |
19 | import io.spring.initializr.generator.packaging.Packaging;
20 |
21 | /**
22 | * Jar {@link Packaging}.
23 | *
24 | * @author Andy Wilkinson
25 | */
26 | public final class JarPackaging implements Packaging {
27 |
28 | /**
29 | * Jar {@link Packaging} identifier.
30 | */
31 | public static final String ID = "jar";
32 |
33 | @Override
34 | public String id() {
35 | return ID;
36 | }
37 |
38 | @Override
39 | public String toString() {
40 | return id();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/jar/JarPackagingFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.packaging.jar;
18 |
19 | import io.spring.initializr.generator.packaging.Packaging;
20 | import io.spring.initializr.generator.packaging.PackagingFactory;
21 |
22 | /**
23 | * {@link PackagingFactory Factory} for {@link JarPackaging}.
24 | *
25 | * @author Andy Wilkinson
26 | */
27 | class JarPackagingFactory implements PackagingFactory {
28 |
29 | @Override
30 | public Packaging createPackaging(String id) {
31 | if (JarPackaging.ID.equals(id)) {
32 | return new JarPackaging();
33 | }
34 | return null;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/jar/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Java archive packaging.
19 | */
20 | package io.spring.initializr.generator.packaging.jar;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Packaging abstraction.
19 | */
20 | package io.spring.initializr.generator.packaging;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/war/WarPackaging.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.packaging.war;
18 |
19 | import io.spring.initializr.generator.packaging.Packaging;
20 |
21 | /**
22 | * War {@link Packaging}.
23 | *
24 | * @author Andy Wilkinson
25 | */
26 | public final class WarPackaging implements Packaging {
27 |
28 | /**
29 | * War {@link Packaging} identifier.
30 | */
31 | public static final String ID = "war";
32 |
33 | @Override
34 | public String id() {
35 | return ID;
36 | }
37 |
38 | @Override
39 | public String toString() {
40 | return id();
41 | }
42 |
43 | }
44 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/war/WarPackagingFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.packaging.war;
18 |
19 | import io.spring.initializr.generator.packaging.Packaging;
20 | import io.spring.initializr.generator.packaging.PackagingFactory;
21 |
22 | /**
23 | * {@link PackagingFactory Factory} for {@link WarPackaging}.
24 | *
25 | * @author Andy Wilkinson
26 | */
27 | class WarPackagingFactory implements PackagingFactory {
28 |
29 | @Override
30 | public Packaging createPackaging(String id) {
31 | if (WarPackaging.ID.equals(id)) {
32 | return new WarPackaging();
33 | }
34 | return null;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/packaging/war/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Web Application archive packaging.
19 | */
20 | package io.spring.initializr.generator.packaging.war;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/project/DefaultProjectDescriptionDiffFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.project;
18 |
19 | /**
20 | * A default {@link ProjectDescriptionDiffFactory} implementation that creates default
21 | * {@link ProjectDescriptionDiff} instances.
22 | *
23 | * @author Chris Bono
24 | */
25 | public class DefaultProjectDescriptionDiffFactory implements ProjectDescriptionDiffFactory {
26 |
27 | @Override
28 | public ProjectDescriptionDiff create(ProjectDescription description) {
29 | return new ProjectDescriptionDiff(description);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/project/ProjectDirectoryFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.project;
18 |
19 | import java.io.IOException;
20 | import java.nio.file.Path;
21 |
22 | /**
23 | * A factory of project directory.
24 | *
25 | * @author Stephane Nicoll
26 | */
27 | @FunctionalInterface
28 | public interface ProjectDirectoryFactory {
29 |
30 | /**
31 | * Create a dedicated project directory for the specified {@link ProjectDescription}.
32 | * @param description the description of a project to generate
33 | * @return a dedicated existing directory
34 | * @throws IOException if creating the directory failed
35 | */
36 | Path createProjectDirectory(ProjectDescription description) throws IOException;
37 |
38 | }
39 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/project/ProjectGenerationContext.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.project;
18 |
19 | import org.springframework.context.annotation.AnnotationConfigApplicationContext;
20 |
21 | /**
22 | * Provide configuration and infrastructure to generate a project.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class ProjectGenerationContext extends AnnotationConfigApplicationContext {
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/project/ProjectGenerationException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.project;
18 |
19 | /**
20 | * Thrown when a project generation failure occurs.
21 | *
22 | * @author Stephane Nicoll
23 | */
24 | @SuppressWarnings("serial")
25 | public class ProjectGenerationException extends RuntimeException {
26 |
27 | public ProjectGenerationException(String message) {
28 | super(message);
29 | }
30 |
31 | public ProjectGenerationException(String message, Throwable cause) {
32 | super(message, cause);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/project/contributor/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project contribution abstraction.
19 | */
20 | package io.spring.initializr.generator.project.contributor;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/project/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project generation support classes.
19 | *
20 | * @see io.spring.initializr.generator.project.ProjectGenerator
21 | */
22 | package io.spring.initializr.generator.project;
23 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/java/io/spring/initializr/generator/version/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Version support classes.
19 | */
20 | package io.spring.initializr.generator.version;
21 |
--------------------------------------------------------------------------------
/initializr-generator/src/main/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | io.spring.initializr.generator.buildsystem.BuildSystemFactory=\
2 | io.spring.initializr.generator.buildsystem.gradle.GradleBuildSystemFactory,\
3 | io.spring.initializr.generator.buildsystem.maven.MavenBuildSystemFactory
4 |
5 | io.spring.initializr.generator.language.LanguageFactory=\
6 | io.spring.initializr.generator.language.groovy.GroovyLanguageFactory,\
7 | io.spring.initializr.generator.language.java.JavaLanguageFactory,\
8 | io.spring.initializr.generator.language.kotlin.KotlinLanguageFactory
9 |
10 | io.spring.initializr.generator.packaging.PackagingFactory=\
11 | io.spring.initializr.generator.packaging.jar.JarPackagingFactory,\
12 | io.spring.initializr.generator.packaging.war.WarPackagingFactory
13 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/java/com/example/Example.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2023 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.example;
18 |
19 | public class Example {
20 |
21 | public static class Inner {
22 |
23 | public static class Nested {
24 |
25 | }
26 |
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/java/io/spring/initializr/generator/buildsystem/gradle/AttributeTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2024 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.buildsystem.gradle;
18 |
19 | import org.junit.jupiter.api.Test;
20 |
21 | import static org.assertj.core.api.Assertions.assertThat;
22 |
23 | /**
24 | * Tests for {@link Attribute}.
25 | *
26 | * @author Moritz Halbritter
27 | */
28 | class AttributeTests {
29 |
30 | @Test
31 | void attributeSetHasSensibleToString() {
32 | assertThat(Attribute.set("name", "value")).hasToString("name = value");
33 | }
34 |
35 | @Test
36 | void attributeAppendHasSensibleToString() {
37 | assertThat(Attribute.append("name", "value")).hasToString("name += value");
38 | }
39 |
40 | }
41 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/java/io/spring/initializr/generator/language/TypeDeclarationTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2025 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.language;
18 |
19 | import org.junit.jupiter.api.Test;
20 |
21 | import static org.assertj.core.api.Assertions.assertThat;
22 |
23 | /**
24 | * Tests for {@link TypeDeclaration}.
25 | *
26 | * @author Moritz Halbritter
27 | */
28 | class TypeDeclarationTests {
29 |
30 | @Test
31 | void implementWithVarArgs() {
32 | TypeDeclaration declaration = new TypeDeclaration("Test");
33 | declaration.implement("Interface1", "Interface2");
34 | assertThat(declaration.getImplements()).containsExactly("Interface1", "Interface2");
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/java/io/spring/initializr/generator/project/contributor/TestProjectGenerationConfiguration2.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.project.contributor;
18 |
19 | import io.spring.initializr.generator.project.ProjectGenerationConfiguration;
20 |
21 | /**
22 | * Test contributor.
23 | */
24 | @ProjectGenerationConfiguration
25 | public class TestProjectGenerationConfiguration2 {
26 |
27 | }
28 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/java/io/spring/initializr/generator/project/contributor/TestProjectGenerationConfiguration2ExcludingTypeFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.project.contributor;
18 |
19 | import io.spring.initializr.generator.project.ProjectGenerationConfigurationTypeFilter;
20 |
21 | public class TestProjectGenerationConfiguration2ExcludingTypeFilter
22 | implements ProjectGenerationConfigurationTypeFilter {
23 |
24 | private final ProjectGenerationConfigurationTypeFilter delegate = ProjectGenerationConfigurationTypeFilter
25 | .exclude(TestProjectGenerationConfiguration2.class);
26 |
27 | @Override
28 | public boolean test(Class> type) {
29 | return this.delegate.test(type);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/java/io/spring/initializr/generator/project/contributor/TestProjectGenerationConfigurationExcludingTypeFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.generator.project.contributor;
18 |
19 | import io.spring.initializr.generator.project.ProjectGenerationConfigurationTypeFilter;
20 |
21 | public class TestProjectGenerationConfigurationExcludingTypeFilter implements ProjectGenerationConfigurationTypeFilter {
22 |
23 | private final ProjectGenerationConfigurationTypeFilter delegate = ProjectGenerationConfigurationTypeFilter
24 | .exclude(TestProjectGenerationConfiguration.class);
25 |
26 | @Override
27 | public boolean test(Class> type) {
28 | return this.delegate.test(type);
29 | }
30 |
31 | }
32 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | io.spring.initializr.generator.project.ProjectGenerationConfigurationTypeFilter=\
2 | io.spring.initializr.generator.project.contributor.TestProjectGenerationConfigurationExcludingTypeFilter,\
3 | io.spring.initializr.generator.project.contributor.TestProjectGenerationConfiguration2ExcludingTypeFilter
4 |
5 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/resources/data/multi/one.properties:
--------------------------------------------------------------------------------
1 | test=1
2 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/resources/data/multi/two.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ${CONSOLE_LOG_PATTERN}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/initializr-generator/src/test/resources/templates/mustache/test.mustache:
--------------------------------------------------------------------------------
1 | {{key}}
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/Defaultable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | /**
20 | * Metadata with a default value.
21 | *
22 | * @param the value type
23 | * @author Dave Syer
24 | */
25 | public interface Defaultable {
26 |
27 | /**
28 | * Return the default value.
29 | * @return the default value
30 | */
31 | T getDefault();
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/DependencyMetadataProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | import io.spring.initializr.generator.version.Version;
20 |
21 | /**
22 | * Provide the {@link DependencyMetadata} for a given spring boot version.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public interface DependencyMetadataProvider {
27 |
28 | /**
29 | * Return the dependency metadata to use for the specified {@code bootVersion}.
30 | * @param metadata the intializr metadata
31 | * @param bootVersion the Spring Boot version
32 | * @return the dependency metadata
33 | */
34 | DependencyMetadata get(InitializrMetadata metadata, Version bootVersion);
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/Describable.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | /**
20 | * An item that can describe itself.
21 | *
22 | * @author Dave Syer
23 | */
24 | public interface Describable {
25 |
26 | /**
27 | * Returns the item description.
28 | * @return the description
29 | */
30 | String getDescription();
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/InitializrMetadataCustomizer.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2020 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | /**
20 | * Strategy interface used to customize the {@link InitializrMetadata}.
21 | *
22 | * @author Dave Syer
23 | */
24 | public interface InitializrMetadataCustomizer {
25 |
26 | /**
27 | * Customize the {@link InitializrMetadata}, updating or moving around capabilities
28 | * before they are validated.
29 | * @param metadata the initializr metadata
30 | */
31 | void customize(InitializrMetadata metadata);
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/InitializrMetadataProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | /**
20 | * Provide the {@link InitializrMetadata} to use.
21 | *
22 | * @author Stephane Nicoll
23 | */
24 | public interface InitializrMetadataProvider {
25 |
26 | /**
27 | * Return the metadata to use. Rather than keeping a handle to a particular instance,
28 | * implementations may decide to refresh or recompute the metadata if necessary.
29 | * @return the initializr metadata
30 | */
31 | InitializrMetadata get();
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/InvalidInitializrMetadataException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | /**
20 | * Thrown when the configuration defines invalid metadata.
21 | *
22 | * @author Stephane Nicoll
23 | */
24 | @SuppressWarnings("serial")
25 | public class InvalidInitializrMetadataException extends RuntimeException {
26 |
27 | public InvalidInitializrMetadataException(String message, Throwable cause) {
28 | super(message, cause);
29 | }
30 |
31 | public InvalidInitializrMetadataException(String message) {
32 | super(message);
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/SimpleInitializrMetadataProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | /**
20 | * A simple {@link InitializrMetadataProvider} implementation.
21 | *
22 | * @author Stephane Nicoll
23 | */
24 | public class SimpleInitializrMetadataProvider implements InitializrMetadataProvider {
25 |
26 | private final InitializrMetadata metadata;
27 |
28 | public SimpleInitializrMetadataProvider(InitializrMetadata metadata) {
29 | this.metadata = metadata;
30 | }
31 |
32 | @Override
33 | public InitializrMetadata get() {
34 | return this.metadata;
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project metadata support.
19 | */
20 | package io.spring.initializr.metadata;
21 |
--------------------------------------------------------------------------------
/initializr-metadata/src/main/java/io/spring/initializr/metadata/support/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project metadata support classes.
19 | */
20 | package io.spring.initializr.metadata.support;
21 |
--------------------------------------------------------------------------------
/initializr-metadata/src/test/java/io/spring/initializr/metadata/TypeTests.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.metadata;
18 |
19 | import org.junit.jupiter.api.Test;
20 |
21 | import static org.assertj.core.api.Assertions.assertThat;
22 |
23 | /**
24 | * @author Stephane Nicoll
25 | */
26 | class TypeTests {
27 |
28 | @Test
29 | void parseAction() {
30 | Type type = new Type();
31 | type.setId("foo");
32 | type.setAction("my-action.zip");
33 | assertThat(type.getAction()).isEqualTo("/my-action.zip");
34 | }
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-metadata/src/test/resources/application-test-custom-defaults.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | groupId:
3 | value: org.foo
4 | artifactId:
5 | value: foo-bar
6 | version:
7 | value: 1.2.4-SNAPSHOT
8 | name:
9 | value: FooBar
10 | description:
11 | value: FooBar Project
12 | packageName:
13 | value: org.foo.demo
--------------------------------------------------------------------------------
/initializr-metadata/src/test/resources/application-test-custom-env.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | env:
3 | artifactRepository: https://repo.spring.io/lib-release
4 | google-analytics-tracking-code: UA-1234567-89
5 | fallbackApplicationName: FooBarApplication
6 | invalidApplicationNames:
7 | - InvalidApplication
8 | kotlin:
9 | default-version: 1.0.0-beta-2423
--------------------------------------------------------------------------------
/initializr-metadata/src/test/resources/application-test-ssl.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | env:
3 | forceSsl: true
--------------------------------------------------------------------------------
/initializr-metadata/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ${CONSOLE_LOG_PATTERN}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/initializr-metadata/src/test/resources/metadata/config/test-bom.json:
--------------------------------------------------------------------------------
1 | {
2 | "configuration": {
3 | "env": {
4 | "forceSsl": false,
5 | "boms": {
6 | "my-bom": {
7 | "groupId": "org.acme",
8 | "artifactId": "my-bom",
9 | "version": "2.4.1"
10 | },
11 | "another-bom": {
12 | "groupId": "org.acme",
13 | "artifactId": "another-bom",
14 | "version": "4.5.6.RELEASE"
15 | }
16 | }
17 | }
18 | }
19 | }
--------------------------------------------------------------------------------
/initializr-metadata/src/test/resources/metadata/config/test-repository.json:
--------------------------------------------------------------------------------
1 | {
2 | "configuration": {
3 | "env": {
4 | "repositories": {
5 | "my-repo": {
6 | "name": "my repo",
7 | "url": "https://example.com/my",
8 | "snapshotsEnabled": true
9 | },
10 | "another-repo": {
11 | "name": "another repo",
12 | "url": "https://example.com/another",
13 | "snapshotsEnabled": false
14 | }
15 | }
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/initializr-service-sample/src/main/java/sample/service/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2022 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Sample application.
19 | */
20 | package sample.service;
21 |
--------------------------------------------------------------------------------
/initializr-service-sample/src/main/resources/application.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | env:
3 | kotlin:
4 | default-version: "1.9.22"
5 | group-id:
6 | value: org.acme
7 | dependencies:
8 | - name: Web
9 | content:
10 | - name: Web
11 | id: web
12 | description: Servlet web application with Spring MVC and Tomcat
13 | languages:
14 | - name: Java
15 | id: java
16 | default: true
17 | - name: Kotlin
18 | id: kotlin
19 | default: false
20 | - name: Groovy
21 | id: groovy
22 | default: false
23 | javaVersions:
24 | - id: 17
25 | default: true
26 | - id: 11
27 | default: false
28 | - id: 1.8
29 | name: 8
30 | default: false
31 | packagings:
32 | - name: Jar
33 | id: jar
34 | default: true
35 | - name: War
36 | id: war
37 | default: false
38 | types:
39 | - name: Maven Project
40 | id: maven-project
41 | description: Generate a Maven based project archive
42 | tags:
43 | build: maven
44 | format: project
45 | default: true
46 | action: /starter.zip
47 | - name: Gradle Project
48 | id: gradle-project
49 | description: Generate a Gradle based project archive
50 | tags:
51 | build: gradle
52 | format: project
53 | default: false
54 | action: /starter.zip
55 |
--------------------------------------------------------------------------------
/initializr-version-resolver/src/main/java/io/spring/initializr/versionresolver/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Classes relating to version resolution.
19 | */
20 | package io.spring.initializr.versionresolver;
21 |
--------------------------------------------------------------------------------
/initializr-version-resolver/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | ${CONSOLE_LOG_PATTERN}
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/initializr-web/src/assembly/snippets.xml:
--------------------------------------------------------------------------------
1 |
5 | snippets
6 |
7 | zip
8 |
9 | false
10 |
11 |
12 | target/snippets
13 |
14 |
15 | stubs/**
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/initializr-web/src/assembly/stub.xml:
--------------------------------------------------------------------------------
1 |
5 | stubs
6 |
7 | jar
8 |
9 | false
10 |
11 |
12 | target/snippets/stubs
13 | META-INF/${project.groupId}/${project.artifactId}/${project.version}/mappings
14 |
15 | **/*
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/autoconfigure/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Auto-configuration for project generator and web endpoints.
19 | */
20 | package io.spring.initializr.web.autoconfigure;
21 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/controller/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project generation controllers.
19 | */
20 | package io.spring.initializr.web.controller;
21 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/mapper/DependencyMetadataJsonMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.web.mapper;
18 |
19 | import io.spring.initializr.metadata.DependencyMetadata;
20 |
21 | /**
22 | * Generate a JSON representation of a set of dependencies.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public interface DependencyMetadataJsonMapper {
27 |
28 | /**
29 | * Write a json representation of the specified metadata.
30 | * @param metadata the dependency metadata
31 | * @return the JSON representation
32 | */
33 | String write(DependencyMetadata metadata);
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/mapper/InitializrMetadataJsonMapper.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.web.mapper;
18 |
19 | import io.spring.initializr.metadata.InitializrMetadata;
20 |
21 | /**
22 | * Generate a JSON representation of the metadata.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public interface InitializrMetadataJsonMapper {
27 |
28 | /**
29 | * Write a json representation of the specified metadata.
30 | * @param metadata the initializr metadata
31 | * @param appUrl the app URL
32 | * @return the JSON representation
33 | */
34 | String write(InitializrMetadata metadata, String appUrl);
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/mapper/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Metadata json mapping.
19 | */
20 | package io.spring.initializr.web.mapper;
21 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/project/InvalidProjectRequestException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.web.project;
18 |
19 | import io.spring.initializr.generator.project.ProjectGenerationException;
20 |
21 | /**
22 | * Thrown when a {@link ProjectRequest} is invalid.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | @SuppressWarnings("serial")
27 | public class InvalidProjectRequestException extends ProjectGenerationException {
28 |
29 | public InvalidProjectRequestException(String message) {
30 | super(message);
31 | }
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/project/ProjectGeneratedEvent.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.web.project;
18 |
19 | import io.spring.initializr.metadata.InitializrMetadata;
20 |
21 | /**
22 | * Event published when a new project has been generated successfully.
23 | *
24 | * @author Stephane Nicoll
25 | */
26 | public class ProjectGeneratedEvent extends ProjectRequestEvent {
27 |
28 | public ProjectGeneratedEvent(ProjectRequest request, InitializrMetadata metadata) {
29 | super(request, metadata);
30 | }
31 |
32 | }
33 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/project/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Project generation handling.
19 | */
20 | package io.spring.initializr.web.project;
21 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/support/InitializrMetadataUpdateStrategy.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package io.spring.initializr.web.support;
18 |
19 | import io.spring.initializr.metadata.InitializrMetadata;
20 |
21 | /**
22 | * A strategy interface for updating the {@link InitializrMetadata metadata} on a running
23 | * instance.
24 | *
25 | * @author Stephane Nicoll
26 | */
27 | @FunctionalInterface
28 | public interface InitializrMetadataUpdateStrategy {
29 |
30 | /**
31 | * Update the current {@link InitializrMetadata}.
32 | * @param current the metadata to update
33 | * @return the updated metadata, or {@code current} (never {@code null})
34 | */
35 | InitializrMetadata update(InitializrMetadata current);
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/initializr-web/src/main/java/io/spring/initializr/web/support/package-info.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2012-2019 the original author or authors.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * https://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | /**
18 | * Support classes for web endpoints.
19 | */
20 | package io.spring.initializr.web.support;
21 |
--------------------------------------------------------------------------------
/initializr-web/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports:
--------------------------------------------------------------------------------
1 | io.spring.initializr.web.autoconfigure.InitializrAutoConfiguration
2 |
--------------------------------------------------------------------------------
/initializr-web/src/main/resources/templates/cli/boot-cli-capabilities.mustache:
--------------------------------------------------------------------------------
1 | {{{logo}}}
2 | :: Service capabilities :: {{serviceUrl}}
3 |
4 | Supported dependencies
5 | {{{dependencies}}}
6 |
7 | Project types (* denotes the default)
8 | {{{types}}}
9 |
10 | Parameters
11 | {{{parameters}}}
12 |
--------------------------------------------------------------------------------
/initializr-web/src/main/resources/templates/cli/cli-capabilities.mustache:
--------------------------------------------------------------------------------
1 | {{{logo}}}
2 | :: Spring Initializr :: {{serviceUrl}}
3 |
4 | This service generates quickstart projects that can be easily customized.
5 | Possible customizations include a project's dependencies, Java version, and
6 | build system or build structure. See below for further details.
7 |
8 | The services uses a HAL based hypermedia format to expose a set of resources
9 | to interact with. If you access this root resource requesting application/json
10 | as media type the response will contain the following links:
11 | {{{types}}}
12 |
13 | The URI templates take a set of parameters to customize the result of a request
14 | to the linked resource.
15 | {{{parameters}}}
16 |
17 | The following section has a list of supported identifiers for the comma-separated
18 | list of "dependencies".
19 | {{{dependencies}}}
20 | {{#hasExamples}}
21 | Examples:
22 |
23 | {{{examples}}}
24 | {{/hasExamples}}
25 |
--------------------------------------------------------------------------------
/initializr-web/src/main/resources/templates/cli/curl-examples.mustache:
--------------------------------------------------------------------------------
1 | To create a default demo.zip:
2 | $ curl -G {{serviceUrl}}/starter.zip -o demo.zip
3 |
4 | To create a web project using Java 11:
5 | $ curl -G {{serviceUrl}}/starter.zip -d dependencies=web \
6 | -d javaVersion=11 -o demo.zip
7 |
8 | To create a web/data-jpa gradle project unpacked:
9 | $ curl -G {{serviceUrl}}/starter.tgz -d dependencies=web,data-jpa \
10 | -d type=gradle-project -d baseDir=my-dir | tar -xzvf -
11 |
12 | To generate a Maven POM with war packaging:
13 | $ curl -G {{serviceUrl}}/pom.xml -d packaging=war -o pom.xml
14 |
--------------------------------------------------------------------------------
/initializr-web/src/main/resources/templates/cli/httpie-examples.mustache:
--------------------------------------------------------------------------------
1 | To create a default project:
2 | $ http {{serviceUrl}}/starter.zip -d
3 |
4 | To create a web project using Java 11:
5 | $ http {{serviceUrl}}/starter.zip dependencies==web \
6 | javaVersion==11 -d
7 |
8 | To create a web/data-jpa gradle project unpacked:
9 | $ http {{serviceUrl}}/starter.tgz dependencies==web,data-jpa \
10 | type==gradle-project baseDir==my-dir | tar -xzvf -
11 |
12 | To generate a Maven POM with war packaging:
13 | $ http {{serviceUrl}}/pom.xml packaging==war -o pom.xml
14 |
--------------------------------------------------------------------------------
/initializr-web/src/main/resources/templates/gs.mustache:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Spring Initializr
5 |
7 |
8 |
9 |
10 |
40 |
Getting Started
41 |
42 |
43 | {{#repos}}
44 | - {{name}}}
45 | {{/repos}}
46 |
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/initializr-web/src/test/resources/META-INF/spring.factories:
--------------------------------------------------------------------------------
1 | io.spring.initializr.generator.project.ProjectGenerationConfiguration=io.spring.initializr.web.controller.custom.CustomProjectContributor
--------------------------------------------------------------------------------
/initializr-web/src/test/resources/application-test-custom-defaults.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | groupId:
3 | value: org.foo
4 | artifactId:
5 | value: foo-bar
6 | version:
7 | value: 1.2.4-SNAPSHOT
8 | name:
9 | value: FooBar
10 | description:
11 | value: FooBar Project
12 | packageName:
13 | value: org.foo.demo
--------------------------------------------------------------------------------
/initializr-web/src/test/resources/application-test-custom-env.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | env:
3 | artifactRepository: https://repo.spring.io/lib-release
4 | google-analytics-tracking-code: UA-1234567-89
5 | fallbackApplicationName: FooBarApplication
6 | invalidApplicationNames:
7 | - InvalidApplication
8 | kotlin:
9 | default-version: 1.0.0-beta-2423
10 | platform:
11 | compatibility-range: "2.0.0.RELEASE"
12 |
--------------------------------------------------------------------------------
/initializr-web/src/test/resources/application-test-ssl.yml:
--------------------------------------------------------------------------------
1 | initializr:
2 | env:
3 | forceSsl: true
--------------------------------------------------------------------------------
/initializr-web/src/test/resources/logback-test.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/initializr-web/src/test/resources/org/springframework/restdocs/templates/asciidoctor/default-response-fields.snippet:
--------------------------------------------------------------------------------
1 | [source,json,options="nowrap"]
2 | ----
3 | {{value}}
4 | ----
--------------------------------------------------------------------------------
/src/checkstyle/checkstyle-suppressions.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/src/checkstyle/checkstyle.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 |
16 |
18 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/src/checkstyle/import-control.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/src/checkstyle/nohttp-checkstyle-suppressions.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/checkstyle/nohttp-checkstyle.xml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------