Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Generate Maven Archetype #60

Draft
wants to merge 1 commit into
base: 1.6.x
Choose a base branch
from

Conversation

ihostage
Copy link
Contributor

It's PoC inspired by a phrase of Renato "and the whole idea is to reduce Lagom’s code base" © 😄

My idea is that has only one template for Hello Java example.
We can use Giter8 for generating Lagom Maven Archetype and remove the very similar files from https://github.com/lagom/lagom/tree/master/dev/archetypes/maven-java/src/main/resources.

@renatocaval @ignasi35 @marcospereira @dwijnand What do you think?

  • Move integration tests from Lagom core repository.

@lightbend-cla-validator

At least one pull request committer is not linked to a user. See https://help.github.com/en/articles/why-are-my-commits-linked-to-the-wrong-user#commits-are-not-linked-to-any-user

@ihostage
Copy link
Contributor Author

Also, I created PR foundweekends/giter8#432. With this feature template for Maven Archetype can will more elegant 😄

@ignasi35
Copy link
Contributor

Hi @ihostage, thanks for all the effort you've put into this but I see multiple problems.

In the past we thought a single code base with multiple targets was a good idea and it always ended up being a wrong assumption. We tried making a single code base work in both Maven and sbt, we also tried making a single code base deployable to multiple targets (DC/OS-Marathon, Kubernetes,...) and things always get hairy fast.

The Hello World code base is small and stable enough that keeping duplicates is not a big pain. Actually, I think we haven't made any significant change for around 2 years.

But the main issue I see is moving the maven archetype code and publishing away from lagom/lagom since we now introduce 2 problems:

  • the maven archetype generation and code is not tested on each PR
  • when creating a release of Lagom we have to come here and manually release the maven archetype for the new version.

Maven users should not need to install sbt or clone a repo to use an archetype so we must continue to publish the archetype for each version of Lagom we produce.

Having said all this, is there any use case you had in mind that motivates this convergence?

@ihostage
Copy link
Contributor Author

Maven users should not need to install sbt or clone a repo to use an archetype so we must continue to publish the archetype for each version of Lagom we produce.

@ignasi35 You absolutely right 😉
But I did not offer to migrate release pipeline of Maven Archetype to this repository 😄 It's an only first step for start discussing. 😄
It's good that Maven Archetype releasing with Lagom together. 👍
But I thought that if we can generate Maven Archetype by G8, we can use this repository on Lagom release pipeline. For example, we can use git submodule or maybe more easy solution if will find.

My hight-level proposal maybe writes as:

  1. Remove duplicate Java source of Hello World from Lagom repository
  2. Run sbt new (or g8 directly) on Lagom repository before packaging Maven Archetype.

By the way, Hello World for Maven and Sbt are different now 😄 Sbt template has not integration tests.

@ihostage
Copy link
Contributor Author

Anyway, exploring this idea I implemented one feature for G8 and this already no zero result 😂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants