Closed hohwille closed 5 years ago
I would go for the flattened approach. I observed, that for initial code navigation for newcomers it is simpler to understand as you get all information at hand on the first view. If you have an hierarchical structure, you have to navigate the folders to get an understanding about the modules. Moreover, it is less overhead for maven :) May be also an issue in future having a large bunch of starter projects in eclipse ;)
For starters I find easier as @maybeec says to find them all flattened
But strictly for modules, I would prefer the hierarchical approach, modules are more nicely "encapsulated" and you can see the general contents and not get lost into too many details
So... that will be my option number 3 :-)
I have updated my initial text accordingly and added 3.
So we all agree that we vote against 2. fine.
Now we simply have to decide if modules
should be flat (1) or structured (3).
@maybeec any thoughts? BTW: Maven overhead is not required for directory structure. There is absolutely no necessity to added intermediate module POMs if they are considered overhead.
I am quite open for both decisions however IMHO 1. is more symmetric/consistent than 3.
For the groupIds I got feedback from @maybeec:
We already agreed on io.oasp.java.modules, io.oasp.java.samples, io.oasp.java.templates so we should distinguish starters as well as they provide added values to modules.
http://repo1.maven.org/maven2/io/oasp/java/
So therefore I would drop my concerns about the different groupIds. Then let us already confirm that the starters will all live in the groupId io.oasp.java.starters
(as already done in #612) and include that change in a PR solving this issue.
For the artifactId I recommended oasp4j-starter-xyz
(following the official conventions as by example spring-boot-starter-jdbc
):
https://www.yammer.com/capgemini.com/#/Threads/show?threadId=929127660
However https://github.com/oasp/oasp4j/pull/612/ uses oasp4j-xyz-starter
as artifactId.
We should asap finalize an "official" agreement for one of both namings and then align the code to use only that schema consistently. Also we should add such decisions to our docs. Maybe here:
https://github.com/oasp-forge/oasp4j-wiki/wiki/oasp-code-contributions
@sjimenez77 merged my PR to "fix" the starters accordingly. Currently we therefore have solution 1. in place. We had some proposing voices for solution 3. If we agree on that we would also need a PR for that (that could also help to boost the vote as them people could compare both approaches better). BTW: According to our roadmap - as we are using flatten plugin, this will have no effect on the release. Therefore we could also take some time to proceed with this. It is just a "development view" that changes here.
I tried to start with a PR for 3. However, I was facing some general issues and considerations:
pom
with child modules) or leaf projects with code/content (here packaging jar
). You can not properly mix both.oasp4j-jpa
and we also have some oasp4j-jpa-*
modules. According to 3. we should then have a folder jpa
with a container project that would actually host e.g. oasp4j-jpa-envers
in a subfolder envers
but what would be the name of the folder containing oasp4j-jpa
? Should we therefore rename the artifactIds and break compatibility? I would not do that only for a structural development change.oasp4j-cxf-client
and oasp4j-cxf-server
.Therefore I would not vote for solution 3. Also we should probably think beyond and introduce a structure that gives orientation if we have even many more modules in the future. The most natural separation on top-level should IMHO be our layering:
This would not interfere so far and could already be a first step to restructure.
After that we can then still think about creating subfolders like jpa
and cxf
as a next step and still have to solve the above issues. But maybe already the first step (layer separation) would already be sufficient until we do the merge and rebranding that is outstanding anyways and within that we can then also change artifactIds as with this step we IMHO need a "upgrade-support-tool" anyhow (that can refactor all pom.xml and *.java files of a project with a simple mapping of old to new names/Ids that we provide for the upgrade.
Lets recover the initial idea: separating starters from modules as they serve a completely different purpose. From my perspective, we should not start to be too academic here and just have a flat representation of modules and starters but both seperated. This will even comply to the general idea of parent poms to provided shared dependencies (esp. for starters). The initial idea to restructure everything was good, but turned out to be not easily feasiable and having a log of overhead even as we introduce a lot of parent poms, which may not be necessary from a code sharing perspective at all.
So according to our current code-base I can consider this issue as done. If there are concrete suggestions for further improvements then file a new issue.
In #589 @maybeec suggested to restructure the starters to make the modules folder somewhat more clean. https://github.com/oasp/oasp4j/tree/develop/modules
Possibilities are: