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 plugin should be able to create a new Quarkus module when there is a root pom.xml file #12829

Closed
agoncal opened this issue Oct 20, 2020 · 7 comments · Fixed by #12916
Closed
Labels
Milestone

Comments

@agoncal
Copy link
Contributor

agoncal commented Oct 20, 2020

Description

This issue is the follows up of a Zulip discusson[1]. Today, if you use the Maven plugin to create a new project (mvn quarkus-maven-plugin:create) and that there is a root pom.xml file, it errors[2]:

Unable to generate the project in a directory that already contains a pom.xml

Instead it should create the project, and add a module into the <modules> section. In some use-cases, you can have a pom.xml at the root of several non-Quarkus modules. And from this root, you want to create several Quarkus modules. Having this feature would allow creating Quarkus modules in existing Maven projects with sub-modules.

[1] https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Forcing.20Maven.20plugin.20to.20create.20with.20existing.20pom.2Exml
[2] https://github.com/quarkusio/quarkus/blob/master/devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java#L166

@agoncal agoncal added the kind/enhancement New feature or request label Oct 20, 2020
@quarkusbot
Copy link

/cc @quarkusio/devtools

@ghokun
Copy link
Contributor

ghokun commented Oct 24, 2020

Hi, I am working on this issue. Covered most of the parts:

  • Check parent poms packaging, continue if it is "pom" or fail if not.
  • Add modules section to parent pom or do nothing if it already exist.
  • Add parent section to newly created projects pom.
  • IT for submodule creation

I only checked existence of pom.xml file so it already assumes you are in a maven project. Should I be worried about gradle side of things ?

@agoncal
Copy link
Contributor Author

agoncal commented Oct 24, 2020

I don't know if the Quarkus team wants both Maven and Gradle to have the same set of functionalities. @quarkusbot added the "area/maven" label, so I suppose it's Maven only ;o)

@maxandersen
Copy link
Member

maven and gradle should aim for same set of functionallities - the bot added area/maven because you only mentioned maven in your title ;)

@maxandersen maxandersen added the area/gradle Gradle label Oct 25, 2020
@agoncal
Copy link
Contributor Author

agoncal commented Oct 25, 2020

@maxandersen I thought the bot was a clever bot ;o)

@ghokun
Copy link
Contributor

ghokun commented Oct 25, 2020

I will try to make required adjustments to my PR #12916

@aloubyansky
Copy link
Member

@ghokun feel free to open a separate PR for Gradle in case that's what you meant. Whatever you prefer. And thanks!

@gsmet gsmet changed the title Maven plugin should be able to create a new Quarkus module when there is a root `pom.xml file Maven plugin should be able to create a new Quarkus module when there is a root pom.xml file Nov 5, 2020
@gsmet gsmet added this to the 1.10 - master milestone Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants