This commit improves the handling of repositories with Maven.
Previously, the writer wrongly assumed that the default for releases
and snapshots are true and false respectively. However, both defaults
are true which means that snapshots repository are considered for
releases, and releases repositories are considered for snapshots.
MavenRepository has now separate flags for those and the writer makes
sure to only update the `enabled` flag if the chosen value is not
true. This doesn't increase the content for repository definitions
while offering better performance for dependencies resolution.
Closes gh-1226
This commit also upgrades the test suite to use a more recent version as
removing support for JUnit4 effectively removes support for those as
well.
Closes gh-1219
Using Spring Boot DevTools requires customizers for both the Maven and
the Gradle build. While the library can't have an opinion about the id
of the "devtools" dependency, it can provide the logic with a
configurable dependency identifier.
This commit adds such configurable customizers.
Closes gh-1135
Previously we negated the exclusions for all of src/main and src/test.
This was done to prevent any content under src/main or src/test that
matched the build output directories (build/ out/, and target/) from
being ignored. While concise, this approach has proven to be overly
broad as it undoes all exclusions and not just those for the build
output directories.
This commit switches to individual negations for each of the build
output directories that we ignore. While more verbose, this narrows
the negations to match their original intent and perhaps also makes
it easier to infer that intent from the generated .gitignore file.
Closes gh-1106
Spring Boot 2.4 has switched from providing JUnit 5 in the test starter
(JUnit Jupiter and the JUnit Vintage Engine) to only providing JUnit
Jupiter. As such, the exclusion of junit-vintage-engine is no longer
required for projects that are using Spring Boot 2.4.
Closes gh-1095
This commit migrates ProjectDescription to an interface with read-only
accessors and create a MutableProjectDescription implementation that can
be used for both purposes.
As a result, the type separation between ResolvedProjectDescription and
ProjectDescription is no longer necessary.
Closes gh-993
This commit moves project-based assertions to regular AssertJ Assert
classes. `ProjectStructure` is now an assert provider so that it can
be used with the standard `assertThat` method.
Specialized assertions are provided for the supported build systems as
well as text-based content.
Closes gh-764
This commit extracts various test utilities to a dedicated
initializr-generator-test module for easier consumption. The previous
test-jar are no longer published and a dependency to this new module
should be equivalent.
This commit also cleans various resources that were located in the wrong
place. In particular initializr-generator does not know anything about
metadata anymore.
Closes gh-988