Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20911

Maven build failure for Camel JBang exported Quarkus app

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.7.0
    • 4.7.0
    • camel-jbang
    • None
    • Unknown

    Description

      When Camel JBang exports code to a Quarkus Maven application the resulting build fails with: 

      SRCFG00014: The config property quarkus.camel.openapi.codegen.model-package is required but it could not be found in any config source

      The code exported is Sample.java:

      import org.apache.camel.builder.RouteBuilder;
      
      
      public class Sample extends RouteBuilder {
        @Override
        public void configure() throws Exception {
                from("timer:tick")
              .log("Hello Camel!");
        }
      }

      The Camel JBang command used to export:

      camel export Sample.java --runtime=quarkus --gav=org.apache.camel:sample:1.0-SNAPSHOT --dir sample

      Camel version: 4.7.0-SNAPSHOT

      The Maven output when calling mvn package on the generated export project:

      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time:  2.909 s
      [INFO] Finished at: 2024-06-25T09:03:20+02:00
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:3.11.3:build (default) on project sample: Failed to build quarkus application: SRCFG00014: The config property quarkus.camel.openapi.codegen.model-package is required but it could not be found in any config source -> [Help 1]

      Maven StackTrace:

      Caused by: io.quarkus.runtime.configuration.ConfigurationException: SRCFG00014: The config property quarkus.camel.openapi.codegen.model-package is required but it could not be found in any config source
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.readConfigValue (BuildTimeConfigurationReader.java:944)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.readConfigGroup (BuildTimeConfigurationReader.java:882)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.readConfigGroup (BuildTimeConfigurationReader.java:923)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.run (BuildTimeConfigurationReader.java:516)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.lambda$readConfiguration$0 (BuildTimeConfigurationReader.java:424)
          at io.smallrye.config.SecretKeys.doUnlocked (SecretKeys.java:28)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.readConfiguration (BuildTimeConfigurationReader.java:424)
          at io.quarkus.deployment.ExtensionLoader.loadStepsFrom (ExtensionLoader.java:140)
          at io.quarkus.deployment.QuarkusAugmentor.run (QuarkusAugmentor.java:107)
          at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment (AugmentActionImpl.java:327)
          at io.quarkus.runner.bootstrap.AugmentActionImpl.createProductionApplication (AugmentActionImpl.java:173)
          at io.quarkus.maven.BuildMojo.doExecute (BuildMojo.java:133)
          at io.quarkus.maven.QuarkusBootstrapMojo.execute (QuarkusBootstrapMojo.java:171)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
      Caused by: java.util.NoSuchElementException: SRCFG00014: The config property quarkus.camel.openapi.codegen.model-package is required but it could not be found in any config source
          at io.smallrye.config.SmallRyeConfig.convertValue (SmallRyeConfig.java:435)
          at io.smallrye.config.SmallRyeConfig.getValue (SmallRyeConfig.java:380)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.readConfigValue (BuildTimeConfigurationReader.java:939)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.readConfigGroup (BuildTimeConfigurationReader.java:882)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.readConfigGroup (BuildTimeConfigurationReader.java:923)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader$ReadOperation.run (BuildTimeConfigurationReader.java:516)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.lambda$readConfiguration$0 (BuildTimeConfigurationReader.java:424)
          at io.smallrye.config.SecretKeys.doUnlocked (SecretKeys.java:28)
          at io.quarkus.deployment.configuration.BuildTimeConfigurationReader.readConfiguration (BuildTimeConfigurationReader.java:424)
          at io.quarkus.deployment.ExtensionLoader.loadStepsFrom (ExtensionLoader.java:140)
          at io.quarkus.deployment.QuarkusAugmentor.run (QuarkusAugmentor.java:107)
          at io.quarkus.runner.bootstrap.AugmentActionImpl.runAugment (AugmentActionImpl.java:327)
          at io.quarkus.runner.bootstrap.AugmentActionImpl.createProductionApplication (AugmentActionImpl.java:173)
          at io.quarkus.maven.BuildMojo.doExecute (BuildMojo.java:133)
          at io.quarkus.maven.QuarkusBootstrapMojo.execute (QuarkusBootstrapMojo.java:171)
          at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
          at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
          at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
          at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
          at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
          at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
          at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
          at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
          at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
          at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
          at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
          at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
          at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
          at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
          at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:77)
          at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke (Method.java:568)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
          at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
          at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
          at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            christophd Christoph Deppisch
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: