azure.yaml
schema change to support Java build tool (maven, gradle)
#740
weikanglim
started this conversation in
Ideas
Replies: 2 comments 2 replies
-
Default to maven, allow for gradle Sync with Wallace on scheme property name. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
-
@weikanglim - I'm not a big Java dev - but is there some sort of config file that would exist in a Java project that would describe the build tools being used or similar? Outside of the name of the tool, would any other arguments need to be considered? Just trying to understand the use case before offering any suggestions. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Java build tool support
Our current plan is to support Maven build tool for the initial Java release. This also includes the support of the popular Maven wrapper /
mvnw
plugin that is packaged as part of Java repositories. The main usage ofmvnw
is to simplify maven installation for Java users, and also to lock down the specific maven version used to build a given Java repository.With this change, we'll need to introduce a new field,
buildTool
inazure.yaml
to define what build tool the user wants to target.Question: How should we structure
azure.yaml
for build tool support?Option A: Explicit
The schema explicitly requires the user to specify a
buildTool
value. If unset, a validation error is generated.Case: buildTool unspecified
Result:
An error is generated:
Missing property "buildTool"
Case: buildTool specified
Result:
The schema is valid and
azd
usesmaven
as the build tool.Option B: Implicit
The schema implicitly assumes
buildTool
is set tomaven
by default, allowing for an override value if specified.Case: buildTool unspecified
Result:
azd
will usemaven
as part of packaging implicitly.Case: buildTool specified
Result:
azd
will usegradle
as part of packaging.Option C: Implicit by presence of configuration files
We will infer the build-tool of choice by looking for project configuration files:
pom.xml
settings.gradle
orsettings.gradle.kotl
Maven will be chosen by default if both are present -- Having two project builds isn't something I think we would support.
Beta Was this translation helpful? Give feedback.
All reactions