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

Codestart modularize pom #42574

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vsevel
Copy link
Contributor

@vsevel vsevel commented Aug 15, 2024

split pom file into multiple fragments.
introduce data variables to control what is included.
optionally not include a particular artifact dependency (in case it is already inherited from another known extension)
optionally not include a version for a particular artifact dependency (in case some common dependencies are from dependency mgmt).

in our case, we would overidde the codestart.yml with:

    data:
      pom:
        properties: false
        dependency-management: false
        dependencies:
          ignored-artifacts:
            - quarkus-arc
            - quarkus-rest
            - quarkus-config-yaml
            - quarkus-scheduler
            - quarkus-cache
            - quarkus-rest-client-jackson
          ignored-version-artifact-prefix: mycompany-
        plugins:
          compiler: false
          surefire: false
          failsafe: false
        profiles:
          native: false

explanation:

  • we provide a parent
  • properties, dependency mgmt, native profile, and plugins (other than quarkus) come from the parent
  • several common quarkus extensions are dragged from a common company extension (no need to list quarkus-arc in new projects)
  • our extensions are in dependency mgmt in parent pom

see the zulip discussion

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform labels Aug 15, 2024
@vsevel vsevel requested a review from ia3andy August 15, 2024 13:22
@quarkus-bot

This comment has been minimized.

@ia3andy
Copy link
Contributor

ia3andy commented Aug 16, 2024

It looks good.

The only thing I would prefer to avoid is the ignored dependencies, it is very specific to your case and will introduce complexity. Let's find another solution to this.

@ia3andy
Copy link
Contributor

ia3andy commented Aug 16, 2024

What I suggest is making the dependencies also modular and use the ignore in your overridden template.
Same for plugins instead of introducing many data which are not useful for most apps, use an include for all plugins and override it for your case.

@vsevel
Copy link
Contributor Author

vsevel commented Aug 16, 2024

dependencies also modular and use the ignore in your overridden template.

ok let me propose a new version

Copy link
Contributor

@ia3andy ia3andy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@vsevel
Copy link
Contributor Author

vsevel commented Aug 16, 2024

I think we are complete. I am going to squash and rebase. thanks for the review. I tested it on my project, with my override and that works out nicely.
I was wondering if the FROM should have been include too. that would allow me to not override the entire codestart.yml. WDYT?

@vsevel vsevel force-pushed the feature/codestart_pom_composition branch 2 times, most recently from ff4114b to e963291 Compare August 16, 2024 10:33
@vsevel
Copy link
Contributor Author

vsevel commented Aug 16, 2024

@ia3andy squashed, rebased and re-tested.

@vsevel vsevel force-pushed the feature/codestart_pom_composition branch from e963291 to 4ba5000 Compare August 19, 2024 12:51
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 19, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 4ba5000.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/codestarts area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/platform Issues related to definition and interaction with Quarkus Platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants