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

Maven & Gradle projects should use the associated plugins #45

Open
InfoSec812 opened this issue Jan 10, 2019 · 5 comments
Open

Maven & Gradle projects should use the associated plugins #45

InfoSec812 opened this issue Jan 10, 2019 · 5 comments

Comments

@InfoSec812
Copy link

When creating a Vert.x project using Maven or Gradle, the project should implement the corresponding plugins fabric8io/vertx-maven-plugin or jponge/vertx-gradle-plugin.

@pmlopes
Copy link
Owner

pmlopes commented Jan 11, 2019

I think we need to rework the templates. Currently we have many templates:

  • maven
  • gradle
  • npm
  • sbt
  • plus many web apps and examples...

The templates got really complex as templates are shared across projects (the pom.xml is used by anything that does maven so it starts to be spaghetti with lots of if-else constructs.)

I think we can do better, I think we could try to use the examples repo to source the examples and all the web projects should avoid custom builds but settle on the create-react-app, create-ng-app, etc... so the cost of maintenance is lower.

This however still has the issue that the root: pom.xml, build.gradle needs to be created here as the pom's from the examples repo are not usable in a real life project.

Also projects should use a bill of materials (BOM) to avoid the specification of the version all the time.

If this is a good idea, we could list here which examples are a good starter and we can try to create an import script to have them on the app.

WDYT @InfoSec812 @slinkydeveloper ?

@pmlopes
Copy link
Owner

pmlopes commented Jan 11, 2019

I'm also inclined to drop SBT as honestly I got it to work for the hello world example but I've no idea how to maintain it... and for NPM I'll default to https://reactiverse.io/es4x/ as it feels more natural to js developers than the current vert.x 3 way...

@slinkydeveloper
Copy link
Collaborator

I think we can do better, I think we could try to use the examples repo to source the examples and all the web projects should avoid custom builds but settle on the create-react-app, create-ng-app, etc... so the cost of maintenance is lower.

For the web app codegen I agree. For openapi templates too I want to delegate java models codegen to another external gen http://www.jsonschema2pojo.org/

If this is a good idea, we could list here which examples are a good starter and we can try to create an import script to have them on the app.

If I understand correctly your idea, I think that loading with a script from examples' pom.xml and then use a couple of regex to substitute things is complex too to mantain. A change in vertx-examples repo breaks this codegen. I have another idea: We can create sub templates (and custom logic) for build-plugins, we render it and then we pass it to main pom. The main pom cycles through various possible extensions points and renders. I can work on it if you prefeer. In this way we can leave user choice to user shade plugin to create fat jar or vertx maven plugin etc.

@slinkydeveloper
Copy link
Collaborator

Wait but using web app codegens like create-react-app could break the js multi runtime compatibility browser/nodejs?

@pmlopes
Copy link
Owner

pmlopes commented Jan 11, 2019

I was thinking something simpler, like just copy the examples. For example copy the web examples src/main/java and each package which is a demo becomes a template...

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

No branches or pull requests

3 participants