Skip to content

Commit

Permalink
fix(trait): mount native plain Quarkus
Browse files Browse the repository at this point in the history
  • Loading branch information
squakez committed Dec 19, 2024
1 parent 023e658 commit 8541979
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions pkg/trait/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -439,15 +439,20 @@ func (t *mountTrait) addSourcesProperties(e *Environment) {
if e.ApplicationProperties == nil {
e.ApplicationProperties = make(map[string]string)
}
isQuarkusNative := false
if qt := e.Catalog.GetTrait(quarkusTraitID); qt != nil {
if quarkus, ok := qt.(*quarkusTrait); ok && quarkus.isNativeIntegration(e) {
isQuarkusNative = true
if e.CamelCatalog.GetRuntimeProvider() == v1.RuntimeProviderPlainQuarkus {
sourceLocationEnabled := false
for _, s := range e.Integration.AllSources() {
// We don't process routes embedded (native) or Kamelets
if e.isEmbedded(s) || s.IsGeneratedFromKamelet() {
continue
}
sourceLocationEnabled = true
break
}
if sourceLocationEnabled {
e.ApplicationProperties["camel.main.source-location-enabled"] = boolean.TrueString
e.ApplicationProperties["camel.main.routes-include-pattern"] = fmt.Sprintf("file:%s/**", camel.SourcesMountPath)
}
}
if e.CamelCatalog.GetRuntimeProvider() == v1.RuntimeProviderPlainQuarkus && !isQuarkusNative {
e.ApplicationProperties["camel.main.source-location-enabled"] = boolean.TrueString
e.ApplicationProperties["camel.main.routes-include-pattern"] = fmt.Sprintf("file:%s/**", camel.SourcesMountPath)
} else {
idx := 0
for _, s := range e.Integration.AllSources() {
Expand Down

0 comments on commit 8541979

Please sign in to comment.