Closed snicoll closed 5 years ago
We have now a core module and a "spring" module: the first is the base API that provides what we need to generate a project while the second gathers the contributors that generate a "Spring project" suitable for start.spring.io.
We need now to integrate this work in the existing github repo and it looks like the "service layer" between the web endpoint and the new API is all that's remaining.
Looking at the current initializr-generator
here is a raw proposal to shuffle things around that should allow us to merge the new API in main repo:
CommandLineHelpGenerator
to initializr-web
BuildProperties
, ProjectRequest
, ProjectRequestResolver
, ProjectRequestPostProcessor
and ProjectResourceLocator
as those concepts are no longer user and fully superseded by the new APIBasicProjectRequest
to ProjectRequest
ProjectRequestEvent
, ProjectFailedEvent
and ProjectGeneratedEvent
to the new API (see #80)Potentially, it would be more clear to move ProjectRequest
, InvalidProjectRequestException
and the code that maps a ProjectRequest
to ProjectDescription
in initializr-web
. It would make more clear that this object is web specific.
We also need a base class that serves two purposes: the metadata is invalid and the request is invalid. I don't really see how we could have a common exception type for this as our new low-level module now is the project generator. More in #67
An idea would be to create a initializr-metadata
with only the metadata so that initializr-generator-spring
can depend on it. That way, all contributors that require the metadata
to operate can make use of it (most of the spike
package, actually).
Good progress has been made here but we're still relying on ProjectRequest
in tests quite a lot so we need to review that still.
This spike project comes to an end and we should consider how the code is going to be integrated into the main project.
Ultimately, I think a module split would be a good thing where:
initializr-generator
doesn't know anything about the metadata and the way we want to generate project for a particular instance. It is a framework for generating projects with useful default implementations but no default contributors. It's mix of the two modules here with some helpers from the main project (Version
& co)initializr-generator-project
contains everything that the main project'sinitializr-generator
has + the content of thisintializr-generator-project
. The idea of such split is that we may have aninitializr-metadata
module in the future that separates the configuration system if need to beThere are a few things we need to shuffle around. Ideally I'd like this
initializr-generator-project
to only contain the strict minimum and move all interesting helpers toinitializr-generator
.