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

Feature/sjad #4473

Draft
wants to merge 169 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
849de05
Add a new child action "orchestrate". And create a sample azure.yaml …
rujche Sep 6, 2024
acee60b
Get list of pom files.
rujche Sep 9, 2024
88d4d1b
add the code for azd java analyzer
saragluna Sep 10, 2024
6ba0816
Hook the java analyzer with the azd init.
saragluna Sep 11, 2024
6a4b664
Enhance
saragluna Sep 11, 2024
bafcbc4
Implement java_project_bicep_file_generator.go.
rujche Sep 11, 2024
b69a47e
Improve log: Add information about the file path.
rujche Sep 11, 2024
69bc59a
Enhance the java analyzer
saragluna Sep 13, 2024
8d67fc5
Add feature: Support add mysql when run "azd init".
rujche Sep 13, 2024
91900aa
Delete java_project_bicep_file_generator.go.
rujche Sep 13, 2024
2da438b
Add logic about accessing mysql in aca.
rujche Sep 14, 2024
f4e00ef
Merge pull request #1 from rujche/rujche/java-analyzer
saragluna Sep 14, 2024
2aa6cac
Fix typo by changing "DbMysql" to "DbMySql".
rujche Sep 14, 2024
cace7fa
Merge pull request #2 from rujche/rujche/java-analyzer
saragluna Sep 14, 2024
082b9b2
Use managed-identity instead of username and password. Now it has err…
rujche Sep 18, 2024
b0c39a6
Access MySql by managed identity instead of username&password.
rujche Sep 20, 2024
f90416f
Add Azure Deps in appdetect.go
saragluna Sep 23, 2024
84b7852
Customize the azd VS Code extension
saragluna Sep 23, 2024
6587f83
improve the java analyzer for event-driven
saragluna Sep 23, 2024
103a005
refactor the java analyzer
saragluna Sep 26, 2024
2e01347
Create service connector by bicep file.
rujche Sep 27, 2024
708681a
1. Remove duplicated 'azd extension add'.
rujche Sep 29, 2024
353a802
Update name of resources: linkerCreatorIdentity and appLinkToMySql
rujche Sep 29, 2024
6d853de
Merge remote-tracking branch 'saragluna/java-analyzer' into rujche/ja…
rujche Sep 29, 2024
85ec20b
Merge pull request #3 from rujche/rujche/java-analyzer
saragluna Sep 29, 2024
2856fb9
Merge remote-tracking branch 'saragluna/java-analyzer' into rujche/ja…
rujche Sep 29, 2024
b70878e
1. Add rule about postgresql in project_analyzer_java.go.
rujche Oct 7, 2024
437eeb6
Fix the error about CORS.
rujche Oct 7, 2024
3410c97
Merge pull request #4 from rujche/rujche/java-analyzer
saragluna Oct 8, 2024
f244293
Merge branch 'main' into saragluna/java-analyzer
rujche Oct 8, 2024
df2f5f2
add support for service bus
saragluna Oct 8, 2024
b6e6ecc
fix servicebus
saragluna Oct 8, 2024
073d857
Remove the logic of create tag after create service connector.
rujche Oct 8, 2024
ef73ce1
Merge remote-tracking branch 'saragluna/java-analyzer' into rujche/ja…
rujche Oct 8, 2024
4c84661
Merge pull request #5 from rujche/rujche/java-analyzer
rujche Oct 8, 2024
f1e2fc1
support both mi and connection string for service bus
saragluna Oct 9, 2024
23362f8
For PostgreSQL, support both password and passwordless.
rujche Oct 10, 2024
193f054
For MySQL, support both password and passwordless.
rujche Oct 11, 2024
48cbeb5
Remove logic of adding tag after creating service connector. Because …
rujche Oct 11, 2024
9f4fe27
Fix bug: create service connector only work for the first time run of…
rujche Oct 11, 2024
207ffa3
Merge pull request #6 from rujche/rujche/java-analyzer
rujche Oct 12, 2024
0594412
Add new feature: analyze project to add Mongo DB.
rujche Oct 12, 2024
c45382a
Delete unused content in main.bicept.
rujche Oct 12, 2024
dca325f
Merge pull request #7 from rujche/rujche/java-analyzer
rujche Oct 12, 2024
babf604
Fix bug: Get auth type should only be required for MySQL and PostgreSQL.
rujche Oct 14, 2024
12b169e
Merge pull request #8 from rujche/rujche/java-analyzer
rujche Oct 14, 2024
a2a3a73
Make sure app work well after deployed to ACA no matter what value "s…
rujche Oct 15, 2024
2f4d2e9
Merge pull request #9 from rujche/rujche/java-analyzer
rujche Oct 15, 2024
a83f7d7
Implement feature: detect port in Dockerfile.
rujche Oct 15, 2024
35f762c
Merge pull request #10 from rujche/rujche/java-analyzer
rujche Oct 15, 2024
de2e922
Implement feature: detect redis by analyzing pom file.
rujche Oct 15, 2024
8607043
Merge pull request #11 from rujche/rujche/java-analyzer
rujche Oct 15, 2024
a482496
Detect Mongo DB by dependency spring-boot-starter-data-mongodb-reacti…
rujche Oct 15, 2024
671902a
Merge pull request #12 from rujche/rujche/java-analyzer
rujche Oct 15, 2024
9c53e73
Support all kinds of properties file like application(-profile).yaml(…
rujche Oct 16, 2024
6e14a1b
Merge pull request #13 from rujche/rujche/java-analyzer
rujche Oct 16, 2024
6c117ee
Merge the java analyzer code from the main branch to sjad (#1)
saragluna Oct 22, 2024
ea4083f
Merge branch 'main' into feature/sjad
saragluna Oct 24, 2024
b44c961
Merge branch 'main' into feature/sjad
saragluna Oct 25, 2024
f8a10da
remove the orchestrate command (#2)
saragluna Oct 25, 2024
a6e2da5
fix ut
saragluna Oct 28, 2024
d1cd151
fix ut
saragluna Oct 29, 2024
a8f91b1
Support detecting event hubs by analyzing pom.xml and application.yml…
rujche Oct 29, 2024
d992c70
Support detect Azure Event Hubs - 2 (#6)
rujche Oct 30, 2024
ef8ebe2
switch to service bus avm (#7)
saragluna Oct 30, 2024
39fda8c
Support detect Azure Event Hubs, connect by connection string. (#8)
rujche Nov 1, 2024
2a21115
Use to AVM to support PostgreSql (#9)
rujche Nov 4, 2024
65cbfe1
Add a span to indicate if java detector has started or finished (#10)
haoozhang Nov 4, 2024
030ec5b
Use to AVM to support MySql: Auth by managed identity and username & …
rujche Nov 5, 2024
41331c0
output resources from app init (#4)
saragluna Nov 5, 2024
73810a1
Merge branch 'main' into feature/sjad
saragluna Nov 5, 2024
b5069e5
update azure yaml schema to support `resources` (#12)
haoozhang Nov 5, 2024
31f8240
Update azure.yaml schema reference for private preview (#13)
haoozhang Nov 6, 2024
08e3776
Support this scenario: frontend + backend + MongoDB (#14)
rujche Nov 11, 2024
209e859
Azd enhancement for cosmosdb (#15)
rujche Nov 11, 2024
eb356d4
Auto-detecting Redis in spring boot applications. (#16)
rujche Nov 11, 2024
0d66981
Merge branch 'main' into feature/sjad
saragluna Nov 11, 2024
9bdd8d6
fix ut
saragluna Nov 11, 2024
9ba423a
Delete service names because they are not used. (#17)
rujche Nov 12, 2024
e161608
Add support for Service Bus JMS (#19)
saragluna Nov 12, 2024
efd325d
Only provide "SPRING_DATASOURCE_URL" environment variable when using …
rujche Nov 12, 2024
5ee0aa0
Support detecting Kafka by analyzing pom.xml and application.yml (#18)
haoozhang Nov 12, 2024
18a7cbc
Change all spring related environment variable to lower-case-with-das…
rujche Nov 12, 2024
f70b046
Output the resources to azure.yaml when enable compose mode (#22)
saragluna Nov 13, 2024
d6b8040
convert resources to infraspec (#23)
saragluna Nov 13, 2024
6ed094e
Fix error when run azd init (#24)
rujche Nov 14, 2024
f05aa04
Merge branch 'main' into feature/sjad
saragluna Nov 14, 2024
2e14836
Fix error that ".DbMySql" not take effect in resources.bicept. (#25)
rujche Nov 14, 2024
3b33dc6
Fix error about marshal yaml (#26)
rujche Nov 15, 2024
a0b3d6b
Prompt when Kafka detected but no spring-cloud-azure dependency found…
haoozhang Nov 15, 2024
c04905c
fix code to support servicebus in azd composability (#29)
saragluna Nov 19, 2024
9f9c553
Handle environment variable placeholder in property file. (#31)
rujche Nov 19, 2024
521d706
Inject AzureEventHubsKafkaAutoConfiguration package path based on spr…
haoozhang Nov 19, 2024
3727ead
Fix some bindings specified by uses keywork not work (#30)
rujche Nov 19, 2024
feb1cf5
support eventhubs when using azd composability (#33)
saragluna Nov 20, 2024
c3e9caf
Add the missed codes for "storage" (#36)
rujche Nov 20, 2024
bf02b93
Add values for all environment variables (#35)
rujche Nov 20, 2024
8ca2115
Improve the prompt message for database (#37)
rujche Nov 20, 2024
27f2cc5
1. Add log about detecting rule. 2. Avoid duplicated queue name for s…
rujche Nov 21, 2024
1dc2e3e
Users can continue to use azd when java analyzer fails (#39)
rujche Nov 21, 2024
4c89041
fix code to support servicebus jms with managed identity in azd compo…
saragluna Nov 21, 2024
06ca3c5
Update azure yaml schema (#32)
haoozhang Nov 22, 2024
c8351bf
Fix code to support kafka when azd compose enabled (#42)
haoozhang Nov 22, 2024
419b699
Refactor code (#41)
rujche Nov 22, 2024
9b5d218
support cosmos when azd compose enabled (#43)
haoozhang Nov 22, 2024
ace3a60
Update yaml language server (#44)
rujche Nov 22, 2024
d8f8499
Merge branch 'main' into feature/sjad
saragluna Nov 22, 2024
7d5bdd6
Add "storageAccountResource" in azure.yaml.json (#45)
rujche Nov 22, 2024
8c72593
fix test
saragluna Nov 22, 2024
a7ef892
Fix bug: Deploy failed for the second time when resource name too lon…
rujche Nov 25, 2024
817ce35
replace placeholders when reading pom.xml (#50)
haoozhang Nov 28, 2024
40c305d
Avoid maintain env list in multiple place (#46)
rujche Nov 28, 2024
f74aa50
Update the wording or azd init in VS Code extension (#51)
saragluna Nov 28, 2024
f4eddd0
Fix pipeline failures. (#52)
rujche Nov 28, 2024
dad722f
Fix pipeline failure. (#53)
rujche Nov 28, 2024
5081210
Fix lint realted problems and enable related GitHub actions (#54)
rujche Nov 28, 2024
85c5ce1
1. fix test. 2. pack build multi-module (#55)
haoozhang Nov 29, 2024
b5aceaa
Deploy PetClinic microservices using azd (#49)
haoozhang Dec 2, 2024
45057e6
Delete SpringCloudAzureDep, use Metadata instead. (#57)
rujche Dec 2, 2024
dcb4da6
Change auth type string to camel case (#59)
rujche Dec 3, 2024
05a38d8
A few enhancements for deploy spring petclinic microservices (#60)
haoozhang Dec 3, 2024
1064e5b
detect spring.application.name (#62)
haoozhang Dec 3, 2024
62d2958
User can get prompt when there is error about passwordless dependency…
rujche Dec 3, 2024
3947823
Fix SJAD sample (#56)
saragluna Dec 3, 2024
d3a84ff
Merge branch 'main' into feature/sjad
saragluna Dec 3, 2024
0d729ce
Change auth type string from Pascalto camel case. (#64)
rujche Dec 4, 2024
529e450
Refactor to include application name, spring cloud azure, eureka, con…
haoozhang Dec 4, 2024
6d96a35
Delete password check when using managed identity as auth type. Becau…
rujche Dec 4, 2024
d12864e
fix: not all service use db, so only prompt those services that use d…
haoozhang Dec 4, 2024
86e8151
dleete DB only if no other service used (#67)
haoozhang Dec 4, 2024
5413462
Fix service connector name conflict (#69)
haoozhang Dec 5, 2024
7881d29
Detect database name from property file (#68)
rujche Dec 6, 2024
4c5e08d
Merge branch 'main' into feature/sjad
saragluna Dec 9, 2024
86aa88f
Fix bug: environment variables not added when not enable compose mode…
rujche Dec 9, 2024
240f369
when MI auth enabled (passwordless-enabled = true), we still need to …
haoozhang Dec 10, 2024
5586d2c
Detect database name from property file (#70)
rujche Dec 10, 2024
2a16a3a
skip some tests (#75)
saragluna Dec 10, 2024
d81ecc7
Merge branch 'main' into feature/sjad
saragluna Dec 10, 2024
d1c179a
In a multi-module project, when the relative path of a sub-module con…
haoozhang Dec 11, 2024
97b96e3
Update todo description. (#76)
rujche Dec 11, 2024
3ac54fa
Enrich rules of detecting PostgreSQL. (#78)
rujche Dec 12, 2024
9f748b1
When placeholder not detected in application.yml, prompt user to inpu…
haoozhang Dec 17, 2024
eb91231
Enhancement: support to resolve placeholder for Kafka and detect even…
haoozhang Dec 17, 2024
f38b63f
Add missed environment variables when use PostgreSql (or MySql) + use…
rujche Dec 17, 2024
d037aef
Use effective pom to analyze pom file if possible (#80)
rujche Dec 17, 2024
ac0bc2f
Improve code of pom analyze (#83)
rujche Dec 18, 2024
0311aa3
Improve the code of maven command (#84)
rujche Dec 18, 2024
400bf73
Fix: connection name too long. (#86)
rujche Dec 18, 2024
0b4143c
Detect spring boot app by "spring-boot-maven-plugin". (#87)
rujche Dec 18, 2024
1c6b531
Make message more clear when lack dependency. (#88)
rujche Dec 18, 2024
5055870
when eureka server / config server removed during detect confirm, the…
haoozhang Dec 23, 2024
0ac1394
inject frontend A's url into B's env (#90)
haoozhang Dec 23, 2024
f23efa5
Fix: when pack build multi-module project, use actual parent path, in…
haoozhang Dec 24, 2024
999ad9d
Fix: SpringFrontend not displayed in detect confirm message. (#95)
rujche Dec 26, 2024
7d0b49b
detect `server.port` property and use it when determining port (#94)
haoozhang Dec 26, 2024
2a155a4
Use effective pom or simulated effective pom instead carry parent pom…
rujche Dec 26, 2024
d02c6e5
Support maven profile in simulated effective pom (#97)
rujche Dec 27, 2024
b9830c7
Fix: Application name malformed causes azd up failing (#96)
rujche Dec 27, 2024
22d2457
Add a default Dockerfile if not exists for java project (#93)
haoozhang Dec 31, 2024
60f57d0
Support detect spring-integration-eventhubs, spring-messaging-eventhu…
haoozhang Dec 31, 2024
a3baacd
Merge maven_command.go and maven.go (#100)
rujche Jan 2, 2025
af63e2e
Use local maven repository as cache when create simulated effective p…
rujche Jan 7, 2025
917c310
Enhancement for detecting java parent project and excluding non-runna…
haoozhang Jan 9, 2025
c8dae89
Fix the azd add not working bug in sjad (#104)
saragluna Jan 13, 2025
86e2923
Merge branch 'main' into feature/sjad
saragluna Jan 13, 2025
1de01c7
Delete SJAD created Dockerfile. (#106)
rujche Jan 15, 2025
b31578f
fix the bug that app cannot fetch Envs (#107)
haoozhang Jan 20, 2025
242f9a0
Add UTs for app_init, detect_confirm, infra_confirm, and scaffold (#102)
saragluna Jan 20, 2025
85e3d3d
Support deploying app without web server (#101)
rujche Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cli-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "cli/**"
- ".github/workflows/cli-ci.yml"
- "go.mod"
branches: [main]
branches: [main, feature/sjad]

permissions:
contents: read
Expand All @@ -27,7 +27,7 @@ jobs:
uses: golangci/golangci-lint-action@v3
with:
version: v1.60.1
args: -v --timeout 10m0s
args: --out-format=colored-line-number -v --timeout 10m0s
working-directory: cli/azd

cspell-lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cspell-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: misc

on:
pull_request:
branches: [main]
branches: [main, feature/sjad]
paths-ignore:
# Changes here should be kept in-sync with projects listed in cspell.misc.yaml
- 'eng/**' # Not required
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/event.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# entirely of github actions won't trigger this action.
workflow_run:
types: [completed]
workflows: ["cli-ci", "templates-ci", "vscode-ci"]
workflows: ["cli-ci"]

permissions: {}

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/go-test-for-sjad-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Go Test

on:
pull_request:
branches:
- feature/sjad

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.23.1

- name: Cache Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-

- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-

- name: Run tests
run: |
cd ./cli/azd
go test $(go list ./... | grep -v github.com/azure/azure-dev/cli/azd/test/functional | grep -v github.com/azure/azure-dev/cli/azd/pkg/infra/provisioning/terraform) -cover -v
2 changes: 2 additions & 0 deletions .vscode/cspell.misc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ overrides:
- myimage
- azureai
- entra
- servicebus
- eventhubs
17 changes: 17 additions & 0 deletions cli/azd/.vscode/cspell.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ words:
- runcontext
- unmarshals
- usgovcloudapi
- springframework
- eventhubs
- jdbc
- datasource
- passwordless
- postgre
- mysqladmin
- sjad
- configserver
- chardata
- webflux
languageSettings:
- languageId: go
ignoreRegExpList:
Expand All @@ -38,6 +49,9 @@ overrides:
- cloudapp
- mediaservices
- msecnd
- filename: internal/tracing/fields/fields.go
words:
- azuredeps
- filename: docs/docgen.go
words:
- alexwolf
Expand Down Expand Up @@ -119,6 +133,9 @@ overrides:
- filename: internal/vsrpc/handler.go
words:
- arity
- filename: internal/appdetect/spring_boot.go
words:
- eirslett
- filename: test/internal/tfoidc/main.go
words:
- tfoidc
Expand Down
99 changes: 93 additions & 6 deletions cli/azd/internal/appdetect/appdetect.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (

"github.com/azure/azure-dev/cli/azd/pkg/exec"
"github.com/azure/azure-dev/cli/azd/pkg/tools/dotnet"
"github.com/azure/azure-dev/cli/azd/pkg/tools/maven"
"github.com/bmatcuk/doublestar/v4"
)

Expand Down Expand Up @@ -59,13 +60,16 @@ const (
PyFlask Dependency = "flask"
PyDjango Dependency = "django"
PyFastApi Dependency = "fastapi"

SpringFrontend Dependency = "springFrontend"
)

var WebUIFrameworks = map[Dependency]struct{}{
JsReact: {},
JsAngular: {},
JsJQuery: {},
JsVite: {},
JsReact: {},
JsAngular: {},
JsJQuery: {},
JsVite: {},
SpringFrontend: {},
}

func (f Dependency) Language() Language {
Expand All @@ -89,6 +93,8 @@ func (f Dependency) Display() string {
return "Vite"
case JsNext:
return "Next.js"
case SpringFrontend:
return "Spring Frontend"
}

return ""
Expand All @@ -110,6 +116,7 @@ const (
DbPostgres DatabaseDep = "postgres"
DbMongo DatabaseDep = "mongo"
DbMySql DatabaseDep = "mysql"
DbCosmos DatabaseDep = "cosmos"
DbSqlServer DatabaseDep = "sqlserver"
DbRedis DatabaseDep = "redis"
)
Expand All @@ -122,6 +129,8 @@ func (db DatabaseDep) Display() string {
return "MongoDB"
case DbMySql:
return "MySQL"
case DbCosmos:
return "Cosmos DB"
case DbSqlServer:
return "SQL Server"
case DbRedis:
Expand All @@ -131,6 +140,73 @@ func (db DatabaseDep) Display() string {
return ""
}

//type AzureDep string

type AzureDep interface {
ResourceDisplay() string
}

type AzureDepServiceBus struct {
Queues []string
IsJms bool
}

func (a AzureDepServiceBus) ResourceDisplay() string {
return "Azure Service Bus"
}

type AzureDepEventHubs struct {
EventHubsNamePropertyMap map[string]string
DependencyTypes []DependencyType
SpringBootVersion string
}

type DependencyType string

const (
SpringCloudStreamEventHubs DependencyType = "spring-cloud-azure-stream-binder-eventhubs"
SpringCloudEventHubsStarter DependencyType = "spring-cloud-azure-starter-eventhubs"
SpringIntegrationEventHubs DependencyType = "spring-cloud-azure-starter-integration-eventhubs"
SpringMessagingEventHubs DependencyType = "spring-messaging-azure-eventhubs"
SpringCloudStreamKafka DependencyType = "spring-cloud-starter-stream-kafka"
SpringKafka DependencyType = "spring-kafka"
)

func (a AzureDepEventHubs) UseKafka() bool {
for _, dependencyType := range a.DependencyTypes {
if dependencyType == SpringCloudStreamKafka || dependencyType == SpringKafka {
return true
}
}
return false
}

func (a AzureDepEventHubs) ResourceDisplay() string {
return "Azure Event Hubs"
}

type AzureDepStorageAccount struct {
ContainerNamePropertyMap map[string]string
}

func (a AzureDepStorageAccount) ResourceDisplay() string {
return "Azure Storage Account"
}

type Metadata struct {
ApplicationName string
ServerPort int
DatabaseNameInPropertySpringDatasourceUrl map[DatabaseDep]string
ContainsDependencySpringCloudAzureStarter bool
ContainsDependencySpringCloudAzureStarterJdbcPostgresql bool
ContainsDependencySpringCloudAzureStarterJdbcMysql bool
ContainsDependencySpringCloudEurekaServer bool
ContainsDependencySpringCloudEurekaClient bool
ContainsDependencySpringCloudConfigServer bool
ContainsDependencySpringCloudConfigClient bool
ContainsDependencyAboutEmbeddedWebServer bool
}

type Project struct {
// The language associated with the project.
Language Language
Expand All @@ -141,9 +217,17 @@ type Project struct {
// Experimental: Database dependencies inferred through heuristics while scanning dependencies in the project.
DatabaseDeps []DatabaseDep

// Experimental: Azure dependencies inferred through heuristics while scanning dependencies in the project.
AzureDeps []AzureDep

// Experimental: Metadata inferred through heuristics while scanning the project.
Metadata Metadata

// The path to the project directory.
Path string

Options map[string]interface{}

// A short description of the detection rule applied.
DetectionRule string

Expand Down Expand Up @@ -179,7 +263,10 @@ type projectDetector interface {
var allDetectors = []projectDetector{
// Order here determines precedence when two projects are in the same directory.
// This is unlikely to occur in practice, but reordering could help to break the tie in these cases.
&javaDetector{},
&javaDetector{
mvnCli: maven.NewCli(exec.NewCommandRunner(nil)),
modulePoms: make(map[string]pom),
},
&dotNetAppHostDetector{
// TODO(ellismg): Remove ambient authority.
dotnetCli: dotnet.NewCli(exec.NewCommandRunner(nil)),
Expand Down Expand Up @@ -264,7 +351,7 @@ func detectAny(ctx context.Context, detectors []projectDetector, path string, en
if project != nil {
log.Printf("Found project %s at %s", project.Language, path)

// docker is an optional property of a project, and thus is different than other detectors
// docker is an optional property of a project, and thus is different from other detectors
docker, err := detectDockerInDirectory(path, entries)
if err != nil {
return nil, fmt.Errorf("detecting docker project: %w", err)
Expand Down
Loading