This is an automated email from the ASF dual-hosted git repository.

astefanutti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 7840bf6f56a281b43850eea4d0cb67484fde44fa
Author: Antonin Stefanutti <[email protected]>
AuthorDate: Thu Aug 26 16:04:46 2021 +0200

    fix(native): Only evaluate Quarkus packaging for JVM trait active phases
---
 pkg/trait/jvm.go | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/pkg/trait/jvm.go b/pkg/trait/jvm.go
index 81700dc..4633494 100644
--- a/pkg/trait/jvm.go
+++ b/pkg/trait/jvm.go
@@ -71,14 +71,18 @@ func (t *jvmTrait) Configure(e *Environment) (bool, error) {
                return false, nil
        }
 
+       if !e.InPhase(v1.IntegrationKitPhaseReady, 
v1.IntegrationPhaseDeploying) &&
+               !e.InPhase(v1.IntegrationKitPhaseReady, 
v1.IntegrationPhaseRunning) {
+               return false, nil
+       }
+
        if trait := e.Catalog.GetTrait(quarkusTraitId); trait != nil {
-               if quarkus := trait.(*quarkusTrait); 
IsNilOrTrue(quarkus.Enabled) && quarkus.isNativePackageType() {
+               if quarkus := trait.(*quarkusTrait); 
IsNilOrTrue(quarkus.Enabled) && quarkus.hasNativePackageType(e) {
                        return false, nil
                }
        }
 
-       return e.InPhase(v1.IntegrationKitPhaseReady, 
v1.IntegrationPhaseDeploying) ||
-               e.InPhase(v1.IntegrationKitPhaseReady, 
v1.IntegrationPhaseRunning), nil
+       return true, nil
 }
 
 func (t *jvmTrait) Apply(e *Environment) error {

Reply via email to