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

Draft Create Auto Detect pom.xml file during Java detection #223

Open
msftph opened this issue Jul 24, 2023 · 3 comments
Open

Draft Create Auto Detect pom.xml file during Java detection #223

msftph opened this issue Jul 24, 2023 · 3 comments

Comments

@msftph
Copy link

msftph commented Jul 24, 2023

Is your feature request related to a problem? Please describe.

When running draft create on the following folder https://github.com/buildpacks/samples/blob/main/apps/java-maven/, draft shows the following prompt:

[Draft] --- Detecting Language ---
Use the arrow keys to navigate: ↓ ↑ → ←
? Linguist detected Java, are you using maven or gradle?:
    gradle
  > maven

Mention what platform you want to support the new feature

OSS draft

Describe the solution you'd like

Draft should detect that maven is being used by seeing the pom.xml file in the repository.

Describe alternatives you've considered

There may be a better way to detect maven.

Additional context

(none)

@davidgamero
Copy link
Collaborator

thanks for the suggestion! this is a great point

we probably can add a more provider-based approach, but a simple check in here would do it using the RepoReader to test if a pom.xml exists

what do you think @hsubramanianaks ?

@hsubramanianaks
Copy link
Contributor

@davidgamero Yep agree we can detect (look for pom.xml or *.gradle using repo reader) before prompting to users.

@brunoborges
Copy link
Member

Some projects may contain both Gradle and Maven build files. It is unlikely in the majority of cases, but for sample applications written by framework authors, it is quite common. Due to this reason, I would like to propose Maven to be considered the default auto discovery choice when both are present.

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

4 participants