This is an automated email from the ASF dual-hosted git repository. lburgazzoli pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 23359bde170cab70af02b1933d14aebfe73bc08b Author: lburgazzoli <[email protected]> AuthorDate: Fri Oct 4 21:43:12 2019 +0200 integrate main support in camel-quarkus-core --- .../ROOT/pages/_partials/component-extensions.adoc | 1 - .../quarkus/core/deployment/BuildProcessor.java | 144 +++++++++++++------ .../core}/deployment/CamelMainBuildItem.java | 7 +- .../deployment/CamelMainListenerBuildItem.java | 4 +- .../deployment/CamelRoutesBuilderBuildItem.java} | 21 +-- .../core/deployment/HotDeploymentProcessor.java | 2 +- .../core/deployment/SubstrateProcessor.java | 160 ++++++++++++--------- .../quarkus/core/deployment/XmlProcessor.java | 2 +- .../devmode/CamelHotReplacementSetup.java | 1 - extensions/core/runtime/pom.xml | 4 + .../{runtime/support => }/BeanManagerHelper.java | 2 +- .../quarkus/core/{runtime => }/CamelConfig.java | 25 ++-- .../org/apache/camel/quarkus/core}/CamelMain.java | 4 +- .../quarkus/core}/CamelMainEventDispatcher.java | 2 +- .../camel/quarkus/core}/CamelMainEvents.java | 2 +- .../camel/quarkus/core}/CamelMainProducers.java | 2 +- .../camel/quarkus/core}/CamelMainRecorder.java | 43 +++++- .../quarkus/core/{runtime => }/CamelProducers.java | 2 +- .../quarkus/core/{runtime => }/CamelRecorder.java | 5 +- .../{runtime/support => }/FastCamelContext.java | 4 +- .../core/{runtime/support => }/FastModel.java | 2 +- .../{runtime/support => }/FastUuidGenerator.java | 2 +- .../quarkus/core/{runtime/support => }/Flags.java | 8 +- .../{runtime/support => }/NoShutdownStrategy.java | 2 +- .../support => }/RuntimeBeanRepository.java | 2 +- .../{runtime/support => }/RuntimeRegistry.java | 2 +- .../{runtime => }/graal/SubstituteHostUtils.java | 2 +- .../graal/SubstituteIntrospectionSupport.java | 2 +- extensions/main/deployment/pom.xml | 73 ---------- .../quarkus/main/deployment/BuildProcessor.java | 77 ---------- .../camel/quarkus/main/deployment/Feature.java | 29 ---- .../main/deployment/SubstrateProcessor.java | 51 ------- extensions/main/pom.xml | 39 ----- extensions/main/runtime/pom.xml | 78 ---------- extensions/pom.xml | 1 - .../test/CustomDefaultServletClassTest.java | 16 +-- .../component/servlet/test/MinimalConfigTest.java | 13 +- .../servlet/test/NoDefaultServletTest.java | 16 +-- integration-tests/aws/pom.xml | 2 +- integration-tests/bean/pom.xml | 2 +- integration-tests/core-impl/pom.xml | 2 +- .../src/main/resources/application.properties | 1 + .../{main => core-main}/deployment/pom.xml | 12 +- .../core/runtime}/support/deployment/Feature.java | 2 +- .../support/deployment/SupportBuildStep.java | 6 +- integration-tests/{main => core-main}/pom.xml | 6 +- .../{main => core-main}/runtime/pom.xml | 10 +- .../core/runtime}/support/SupportListener.java | 2 +- integration-tests/{main => core-main}/test/pom.xml | 10 +- .../org/apache/camel/quarkus/core}/CamelRoute.java | 2 +- .../apache/camel/quarkus/core}/CamelServlet.java | 3 +- .../test/src/main/resources/application.properties | 0 .../apache/camel/quarkus/core}/CamelITCase.java | 2 +- .../org/apache/camel/quarkus/core}/CamelTest.java | 4 +- .../apache/camel/quarkus/core/CamelServlet.java | 7 + .../test/src/main/resources/application.properties | 1 + .../org/apache/camel/quarkus/core/CamelTest.java | 1 + integration-tests/csv/pom.xml | 2 +- integration-tests/infinispan/pom.xml | 2 +- .../quarkus/component/infinispan/CamelTest.java | 2 +- integration-tests/jdbc/pom.xml | 2 +- integration-tests/mail/pom.xml | 2 +- integration-tests/microprofile-metrics/pom.xml | 2 +- integration-tests/netty-http/pom.xml | 2 +- integration-tests/paho/pom.xml | 2 +- integration-tests/platform-http/pom.xml | 2 +- integration-tests/pom.xml | 2 +- integration-tests/salesforce/pom.xml | 2 +- integration-tests/servlet/pom.xml | 2 +- integration-tests/twitter/pom.xml | 2 +- integration-tests/zipfile/pom.xml | 2 +- poms/bom-deployment/pom.xml | 5 - poms/bom/pom.xml | 5 - 73 files changed, 362 insertions(+), 603 deletions(-) diff --git a/docs/modules/ROOT/pages/_partials/component-extensions.adoc b/docs/modules/ROOT/pages/_partials/component-extensions.adoc index b4462be..0481b4d 100644 --- a/docs/modules/ROOT/pages/_partials/component-extensions.adoc +++ b/docs/modules/ROOT/pages/_partials/component-extensions.adoc @@ -10,7 +10,6 @@ * `camel-quarkus-jdbc` * `camel-quarkus-log` * `camel-quarkus-mail` -* `camel-quarkus-main` * `camel-quarkus-microprofile-metrics` * `camel-quarkus-netty-http` * `camel-quarkus-paho` diff --git a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java index 0b8b903..1145f63 100644 --- a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/BuildProcessor.java @@ -18,7 +18,6 @@ package org.apache.camel.quarkus.core.deployment; import java.util.List; import java.util.Objects; -import javax.inject.Inject; import io.quarkus.arc.deployment.AdditionalBeanBuildItem; import io.quarkus.arc.deployment.BeanContainerBuildItem; @@ -28,11 +27,17 @@ import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.ApplicationArchivesBuildItem; import io.quarkus.deployment.builditem.CombinedIndexBuildItem; +import io.quarkus.deployment.builditem.ServiceStartBuildItem; +import io.quarkus.deployment.builditem.ShutdownContextBuildItem; import io.quarkus.runtime.RuntimeValue; import org.apache.camel.CamelContext; -import org.apache.camel.quarkus.core.runtime.CamelConfig; -import org.apache.camel.quarkus.core.runtime.CamelProducers; -import org.apache.camel.quarkus.core.runtime.CamelRecorder; +import org.apache.camel.quarkus.core.CamelConfig; +import org.apache.camel.quarkus.core.CamelMain; +import org.apache.camel.quarkus.core.CamelMainProducers; +import org.apache.camel.quarkus.core.CamelMainRecorder; +import org.apache.camel.quarkus.core.CamelProducers; +import org.apache.camel.quarkus.core.CamelRecorder; +import org.apache.camel.quarkus.core.Flags; import org.apache.camel.spi.Registry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -40,63 +45,118 @@ import org.slf4j.LoggerFactory; class BuildProcessor { private static final Logger LOGGER = LoggerFactory.getLogger(BuildProcessor.class); - @Inject - ApplicationArchivesBuildItem applicationArchivesBuildItem; - @Inject - CombinedIndexBuildItem combinedIndexBuildItem; + /* + * Build steps related to camel core. + */ + public static class Core { + @BuildStep + void beans(BuildProducer<AdditionalBeanBuildItem> beanProducer) { + beanProducer.produce(AdditionalBeanBuildItem.unremovableOf(CamelProducers.class)); + } - @Record(ExecutionTime.STATIC_INIT) - @BuildStep - CamelRegistryBuildItem registry( + @Record(ExecutionTime.STATIC_INIT) + @BuildStep + CamelRegistryBuildItem registry( CamelRecorder recorder, + ApplicationArchivesBuildItem applicationArchives, List<CamelBeanBuildItem> registryItems) { - RuntimeValue<Registry> registry = recorder.createRegistry(); + RuntimeValue<Registry> registry = recorder.createRegistry(); + + CamelSupport.services(applicationArchives).filter( + si -> registryItems.stream().noneMatch( + c -> Objects.equals(si.name, c.getName()) && c.getType().isAssignableFrom(si.type) + ) + ).forEach( + si -> { + LOGGER.debug("Binding camel service {} with type {}", si.name, si.type); + + recorder.bind( + registry, + si.name, + si.type + ); + } + ); - CamelSupport.services(applicationArchivesBuildItem).filter( - si -> registryItems.stream().noneMatch( - c -> Objects.equals(si.name, c.getName()) && c.getType().isAssignableFrom(si.type) - ) - ).forEach( - si -> { - LOGGER.debug("Binding camel service {} with type {}", si.name, si.type); + for (CamelBeanBuildItem item : registryItems) { + LOGGER.debug("Binding item with name: {}, type {}", item.getName(), item.getType()); recorder.bind( registry, - si.name, - si.type + item.getName(), + item.getType(), + item.getValue() ); } - ); - - for (CamelBeanBuildItem item: registryItems) { - LOGGER.debug("Binding item with name: {}, type {}", item.getName(), item.getType()); - recorder.bind( - registry, - item.getName(), - item.getType(), - item.getValue() - ); + return new CamelRegistryBuildItem(registry); } - return new CamelRegistryBuildItem(registry); - } - - @Record(ExecutionTime.STATIC_INIT) - @BuildStep - CamelContextBuildItem context( + @Record(ExecutionTime.STATIC_INIT) + @BuildStep + CamelContextBuildItem context( CamelRecorder recorder, CamelRegistryBuildItem registry, BeanContainerBuildItem beanContainer, CamelConfig.BuildTime buildTimeConfig) { - RuntimeValue<CamelContext> context = recorder.createContext(registry.getRegistry(), beanContainer.getValue(), buildTimeConfig); - return new CamelContextBuildItem(context); + RuntimeValue<CamelContext> context = recorder.createContext(registry.getRegistry(), beanContainer.getValue(), buildTimeConfig); + return new CamelContextBuildItem(context); + } } - @BuildStep - void beans(BuildProducer<AdditionalBeanBuildItem> beanProducer) { - beanProducer.produce(AdditionalBeanBuildItem.unremovableOf(CamelProducers.class)); + /* + * Build steps related to camel main that are activated by default but can be + * disabled by setting quarkus.camel.disable-main = true + */ + public static class Main { + + @BuildStep(onlyIfNot = Flags.MainDisabled.class) + void beans(BuildProducer<AdditionalBeanBuildItem> beanProducer) { + beanProducer.produce(AdditionalBeanBuildItem.unremovableOf(CamelMainProducers.class)); + } + + @Record(ExecutionTime.STATIC_INIT) + @BuildStep(onlyIfNot = Flags.MainDisabled.class) + CamelMainBuildItem main( + CombinedIndexBuildItem combinedIndex, + CamelMainRecorder recorder, + CamelContextBuildItem context, + List<CamelMainListenerBuildItem> listeners, + List<CamelRoutesBuilderBuildItem> routesBuilders, + BeanContainerBuildItem beanContainer, + CamelConfig.BuildTime buildTimeConfig) { + + RuntimeValue<CamelMain> main = recorder.createCamelMain(context.getCamelContext(), beanContainer.getValue()); + for (CamelMainListenerBuildItem listener : listeners) { + recorder.addListener(main, listener.getListener()); + } + + CamelSupport.getRouteBuilderClasses(combinedIndex.getIndex()).forEach(name -> { + recorder.addRouteBuilder(main, name); + }); + routesBuilders.forEach(routesBuilder -> { + recorder.addRouteBuilder(main, routesBuilder.getInstance()); + }); + buildTimeConfig.routesUris.forEach(location -> { + recorder.addRoutesFromLocation(main, location); + }); + + return new CamelMainBuildItem(main); + } + + @Record(ExecutionTime.RUNTIME_INIT) + @BuildStep(onlyIfNot = Flags.MainDisabled.class) + void start( + CamelMainRecorder recorder, + CamelMainBuildItem main, + ShutdownContextBuildItem shutdown, + // TODO: keep this list as placeholder to ensure the ArC container is fully + // started before starting main + List<ServiceStartBuildItem> startList) { + + recorder.start(shutdown, main.getInstance()); + } } } diff --git a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainBuildItem.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelMainBuildItem.java similarity index 88% rename from extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainBuildItem.java rename to extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelMainBuildItem.java index 103c298..ccaae59 100644 --- a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainBuildItem.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelMainBuildItem.java @@ -14,12 +14,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main.deployment; +package org.apache.camel.quarkus.core.deployment; import io.quarkus.builder.item.SimpleBuildItem; import io.quarkus.runtime.RuntimeValue; -import org.apache.camel.quarkus.main.CamelMain; +import org.apache.camel.quarkus.core.CamelMain; +/** + * Holds the {@link CamelMain} {@link RuntimeValue}. + */ public final class CamelMainBuildItem extends SimpleBuildItem { private final RuntimeValue<CamelMain> main; diff --git a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainListenerBuildItem.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelMainListenerBuildItem.java similarity index 92% copy from extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainListenerBuildItem.java copy to extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelMainListenerBuildItem.java index f7769a3..188177e 100644 --- a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainListenerBuildItem.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelMainListenerBuildItem.java @@ -14,11 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main.deployment; +package org.apache.camel.quarkus.core.deployment; import io.quarkus.builder.item.MultiBuildItem; import org.apache.camel.main.MainListener; -import org.apache.camel.quarkus.main.CamelMain; +import org.apache.camel.quarkus.core.CamelMain; /** * A {@link MultiBuildItem} holding {@link MainListener}s to add to {@link CamelMain}. diff --git a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainListenerBuildItem.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelRoutesBuilderBuildItem.java similarity index 62% rename from extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainListenerBuildItem.java rename to extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelRoutesBuilderBuildItem.java index f7769a3..485f20b 100644 --- a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/CamelMainListenerBuildItem.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelRoutesBuilderBuildItem.java @@ -14,23 +14,24 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main.deployment; +package org.apache.camel.quarkus.core.deployment; import io.quarkus.builder.item.MultiBuildItem; -import org.apache.camel.main.MainListener; -import org.apache.camel.quarkus.main.CamelMain; +import io.quarkus.runtime.RuntimeValue; +import org.apache.camel.RoutesBuilder; + /** - * A {@link MultiBuildItem} holding {@link MainListener}s to add to {@link CamelMain}. + * Holds the {@link RoutesBuilder} {@link RuntimeValue}. */ -public final class CamelMainListenerBuildItem extends MultiBuildItem { - private final MainListener listener; +public final class CamelRoutesBuilderBuildItem extends MultiBuildItem { + private final RuntimeValue<RoutesBuilder> routesBuilder; - public CamelMainListenerBuildItem(MainListener listener) { - this.listener = listener; + public CamelRoutesBuilderBuildItem(RuntimeValue<RoutesBuilder> routesBuilder) { + this.routesBuilder = routesBuilder; } - public MainListener getListener() { - return listener; + public RuntimeValue<RoutesBuilder> getInstance() { + return routesBuilder; } } diff --git a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/HotDeploymentProcessor.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/HotDeploymentProcessor.java index 5dfd176..a3e7ccf 100644 --- a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/HotDeploymentProcessor.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/HotDeploymentProcessor.java @@ -21,7 +21,7 @@ import java.util.stream.Collectors; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.HotDeploymentWatchedFileBuildItem; -import org.apache.camel.quarkus.core.runtime.CamelConfig.BuildTime; +import org.apache.camel.quarkus.core.CamelConfig.BuildTime; class HotDeploymentProcessor { @BuildStep diff --git a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/SubstrateProcessor.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/SubstrateProcessor.java index 8d3e809..6b0c0f6 100644 --- a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/SubstrateProcessor.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/SubstrateProcessor.java @@ -35,7 +35,6 @@ import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; import io.quarkus.deployment.builditem.substrate.ReflectiveMethodBuildItem; import io.quarkus.deployment.builditem.substrate.SubstrateConfigBuildItem; import io.quarkus.deployment.builditem.substrate.SubstrateResourceBuildItem; -import io.quarkus.deployment.builditem.substrate.SubstrateResourceBundleBuildItem; import org.apache.camel.CamelContext; import org.apache.camel.Component; import org.apache.camel.Consumer; @@ -43,6 +42,7 @@ import org.apache.camel.Converter; import org.apache.camel.Endpoint; import org.apache.camel.Producer; import org.apache.camel.TypeConverter; +import org.apache.camel.quarkus.core.Flags; import org.apache.camel.spi.ExchangeFormatter; import org.apache.camel.spi.PropertiesComponent; import org.apache.camel.spi.ScheduledPollConsumerScheduler; @@ -57,7 +57,11 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; class SubstrateProcessor { - private static final List<Class<?>> CAMEL_REFLECTIVE_CLASSES = Arrays.asList( + /* + * SubstrateVM configuration steps related to camel core. + */ + public static class Core { + private static final List<Class<?>> CAMEL_REFLECTIVE_CLASSES = Arrays.asList( Endpoint.class, Consumer.class, Producer.class, @@ -70,33 +74,29 @@ class SubstrateProcessor { StreamCachingStrategy.SpoolUsedHeapMemoryLimit.class, PropertiesComponent.class); - @Inject - BuildProducer<ReflectiveClassBuildItem> reflectiveClass; - @Inject - BuildProducer<ReflectiveMethodBuildItem> reflectiveMethod; - @Inject - BuildProducer<SubstrateResourceBuildItem> resource; - @Inject - BuildProducer<SubstrateResourceBundleBuildItem> resourceBundle; - @Inject - ApplicationArchivesBuildItem applicationArchivesBuildItem; - @Inject - CombinedIndexBuildItem combinedIndexBuildItem; - - @BuildStep - SubstrateConfigBuildItem substrate() { - return SubstrateConfigBuildItem.builder() - // TODO: switch back to caffeine once https://github.com/apache/camel-quarkus/issues/80 gets fixed - .addNativeImageSystemProperty("CamelWarmUpLRUCacheFactory", "true") - .addNativeImageSystemProperty("CamelSimpleLRUCacheFactory", "true") - .build(); - } + @Inject + BuildProducer<ReflectiveClassBuildItem> reflectiveClass; + @Inject + BuildProducer<ReflectiveMethodBuildItem> reflectiveMethod; + @Inject + BuildProducer<SubstrateResourceBuildItem> resource; + @Inject + ApplicationArchivesBuildItem applicationArchivesBuildItem; + + @BuildStep + SubstrateConfigBuildItem cache() { + return SubstrateConfigBuildItem.builder() + // TODO: switch back to caffeine once https://github.com/apache/camel-quarkus/issues/80 gets fixed + .addNativeImageSystemProperty("CamelWarmUpLRUCacheFactory", "true") + .addNativeImageSystemProperty("CamelSimpleLRUCacheFactory", "true") + .build(); + } - @BuildStep - void process() { - IndexView view = combinedIndexBuildItem.getIndex(); + @BuildStep + void process(CombinedIndexBuildItem combinedIndex) { + IndexView view = combinedIndex.getIndex(); - CAMEL_REFLECTIVE_CLASSES.stream() + CAMEL_REFLECTIVE_CLASSES.stream() .map(Class::getName) .map(DotName::createSimple) .map(view::getAllKnownImplementors) @@ -104,9 +104,9 @@ class SubstrateProcessor { .filter(CamelSupport::isPublic) .forEach(v -> addReflectiveClass(true, v.name().toString())); - Logger log = LoggerFactory.getLogger(SubstrateProcessor.class); - DotName converter = DotName.createSimple(Converter.class.getName()); - List<ClassInfo> converterClasses = view.getAnnotations(converter) + Logger log = LoggerFactory.getLogger(SubstrateProcessor.class); + DotName converter = DotName.createSimple(Converter.class.getName()); + List<ClassInfo> converterClasses = view.getAnnotations(converter) .stream() .filter(ai -> ai.target().kind() == Kind.CLASS) .filter(ai -> { @@ -128,63 +128,85 @@ class SubstrateProcessor { .map(ai -> ai.target().asClass()) .collect(Collectors.toList()); - log.debug("Converter classes: " + converterClasses); - converterClasses.forEach(ci -> addReflectiveClass(false, ci.name().toString())); + log.debug("Converter classes: " + converterClasses); + converterClasses.forEach(ci -> addReflectiveClass(false, ci.name().toString())); - view.getAnnotations(converter) + view.getAnnotations(converter) .stream() .filter(ai -> ai.target().kind() == Kind.METHOD) .filter(ai -> converterClasses.contains(ai.target().asMethod().declaringClass())) .map(ai -> ai.target().asMethod()) .forEach(this::addReflectiveMethod); - CamelSupport.resources(applicationArchivesBuildItem, "META-INF/maven/org.apache.camel/camel-core") + CamelSupport.resources(applicationArchivesBuildItem, "META-INF/maven/org.apache.camel/camel-core") .forEach(this::addResource); - - addCamelServices(); - } - - // Camel services files - protected void addCamelServices() { - CamelSupport.resources(applicationArchivesBuildItem, CamelSupport.CAMEL_SERVICE_BASE_PATH) + CamelSupport.resources(applicationArchivesBuildItem, CamelSupport.CAMEL_SERVICE_BASE_PATH) .forEach(this::addCamelService); - } + } - protected void addCamelService(Path p) { - try (InputStream is = Files.newInputStream(p)) { - Properties props = new Properties(); - props.load(is); - for (Map.Entry<Object, Object> entry : props.entrySet()) { - String k = entry.getKey().toString(); - if (k.equals("class")) { - addReflectiveClass(true, entry.getValue().toString()); - } else if (k.endsWith(".class")) { - addReflectiveClass(true, entry.getValue().toString()); - addResource(p); + protected void addCamelService(Path p) { + try (InputStream is = Files.newInputStream(p)) { + Properties props = new Properties(); + props.load(is); + for (Map.Entry<Object, Object> entry : props.entrySet()) { + String k = entry.getKey().toString(); + if (k.equals("class")) { + addReflectiveClass(true, entry.getValue().toString()); + } else if (k.endsWith(".class")) { + addReflectiveClass(true, entry.getValue().toString()); + addResource(p); + } } + } catch (Exception e) { + throw new RuntimeException(e); } - } catch (Exception e) { - throw new RuntimeException(e); } - } - protected void addResource(Path p) { - addResource(p.toString().substring(1)); - } + protected void addResource(Path p) { + addResource(p.toString().substring(1)); + } - protected void addResource(String r) { - resource.produce(new SubstrateResourceBuildItem(r)); - } + protected void addResource(String r) { + resource.produce(new SubstrateResourceBuildItem(r)); + } - protected void addReflectiveClass(boolean methods, String... className) { - reflectiveClass.produce(new ReflectiveClassBuildItem(methods, false, className)); - } + protected void addReflectiveClass(boolean methods, String... className) { + reflectiveClass.produce(new ReflectiveClassBuildItem(methods, false, className)); + } - protected void addReflectiveMethod(MethodInfo mi) { - reflectiveMethod.produce(new ReflectiveMethodBuildItem(mi)); + protected void addReflectiveMethod(MethodInfo mi) { + reflectiveMethod.produce(new ReflectiveMethodBuildItem(mi)); + } } - protected void addResourceBundle(String bundle) { - resourceBundle.produce(new SubstrateResourceBundleBuildItem(bundle)); + /* + * SubstrateVM configuration steps related to camel main that are activated by default but can be + * disabled by setting quarkus.camel.disable-main = true + */ + public static class Main { + @BuildStep(onlyIfNot = Flags.MainDisabled.class) + void process( + CombinedIndexBuildItem combinedIndex, + BuildProducer<ReflectiveClassBuildItem> reflectiveClass) { + + IndexView view = combinedIndex.getIndex(); + + // + // Register routes as reflection aware as camel-main main use reflection + // to bind beans to the registry + // + CamelSupport.getRouteBuilderClasses(view).forEach(name -> { + reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, name)); + }); + + reflectiveClass.produce(new ReflectiveClassBuildItem( + true, + false, + org.apache.camel.main.DefaultConfigurationProperties.class, + org.apache.camel.main.MainConfigurationProperties.class, + org.apache.camel.main.HystrixConfigurationProperties.class, + org.apache.camel.main.RestConfigurationProperties.class) + ); + } } } diff --git a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/XmlProcessor.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/XmlProcessor.java index df6dd15..58b0bcf 100644 --- a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/XmlProcessor.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/XmlProcessor.java @@ -21,7 +21,7 @@ import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; import io.quarkus.jaxb.deployment.JaxbEnabledBuildItem; import io.quarkus.jaxb.deployment.JaxbFileRootBuildItem; -import org.apache.camel.quarkus.core.runtime.support.Flags; +import org.apache.camel.quarkus.core.Flags; class XmlProcessor { @BuildStep diff --git a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/devmode/CamelHotReplacementSetup.java b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/devmode/CamelHotReplacementSetup.java index 4121e1f..91ee733 100644 --- a/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/devmode/CamelHotReplacementSetup.java +++ b/extensions/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/devmode/CamelHotReplacementSetup.java @@ -24,7 +24,6 @@ import io.quarkus.deployment.devmode.HotReplacementContext; import io.quarkus.deployment.devmode.HotReplacementSetup; public class CamelHotReplacementSetup implements HotReplacementSetup { - private static final long TWO_SECS = TimeUnit.SECONDS.toMillis(2); @Override diff --git a/extensions/core/runtime/pom.xml b/extensions/core/runtime/pom.xml index caa7e0d..5683b69 100644 --- a/extensions/core/runtime/pom.xml +++ b/extensions/core/runtime/pom.xml @@ -57,6 +57,10 @@ <!-- camel --> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-main</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-core-engine</artifactId> </dependency> <dependency> diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/BeanManagerHelper.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/BeanManagerHelper.java similarity index 98% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/BeanManagerHelper.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/BeanManagerHelper.java index 2051c6c..89d87e8 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/BeanManagerHelper.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/BeanManagerHelper.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import java.lang.annotation.Annotation; import java.util.HashMap; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelConfig.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java similarity index 87% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelConfig.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java index a5bb9b4..ecf9989 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelConfig.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelConfig.java @@ -14,26 +14,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime; +package org.apache.camel.quarkus.core; import java.util.List; import io.quarkus.runtime.annotations.ConfigItem; import io.quarkus.runtime.annotations.ConfigPhase; import io.quarkus.runtime.annotations.ConfigRoot; -import org.apache.camel.quarkus.core.runtime.support.Flags; public class CamelConfig { @ConfigRoot(name = "camel", phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED) public static class BuildTime { - - /** - * Uri to an xml containing camel routes to be loaded and initialized at build time. - */ - @ConfigItem - public List<String> routesUris; - /** * Camel jaxb support is enabled by default, but in order to trim * down the size of applications, it is possible to disable jaxb support @@ -55,6 +47,21 @@ public class CamelConfig { */ @ConfigItem(defaultValue = "false") public boolean disableXml; + + /** + * Disable camel-main. + * When main is disabled, routes won't be automatically be loaded and + * started and the entire lifecycle of the Camel Context is under user + * control. + */ + @ConfigItem(defaultValue = "false") + public boolean disableMain; + + /** + * Uri to an xml containing camel routes to be loaded and initialized at build time. + */ + @ConfigItem + public List<String> routesUris; } @ConfigRoot(name = "camel", phase = ConfigPhase.RUN_TIME) diff --git a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMain.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMain.java similarity index 93% rename from extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMain.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMain.java index e533f35..2c71954 100644 --- a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMain.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMain.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; import java.util.Collection; import java.util.Collections; @@ -53,7 +53,7 @@ public class CamelMain extends MainSupport implements CamelContextAware { camelTemplate = null; } } catch (Exception e) { - LOG.debug("Error stopping camelTemplate due " + e.getMessage() + ". This exception is ignored.", e); + MainSupport.LOG.debug("Error stopping camelTemplate due " + e.getMessage() + ". This exception is ignored.", e); } beforeStop(); diff --git a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEventDispatcher.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEventDispatcher.java similarity index 98% rename from extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEventDispatcher.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEventDispatcher.java index 71de2e9..f6504c5 100644 --- a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEventDispatcher.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEventDispatcher.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; import io.quarkus.arc.Arc; import org.apache.camel.CamelContext; diff --git a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEvents.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEvents.java similarity index 97% rename from extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEvents.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEvents.java index 19693b8..bfddcdc 100644 --- a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainEvents.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainEvents.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; public final class CamelMainEvents { private CamelMainEvents() { diff --git a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainProducers.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainProducers.java similarity index 96% rename from extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainProducers.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainProducers.java index f830cc3..04ab8a8 100644 --- a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainProducers.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainProducers.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; import javax.enterprise.inject.Produces; import javax.inject.Singleton; diff --git a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRecorder.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainRecorder.java similarity index 61% rename from extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRecorder.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainRecorder.java index 914afe9..f9d7236 100644 --- a/extensions/main/runtime/src/main/java/org/apache/camel/quarkus/main/CamelMainRecorder.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelMainRecorder.java @@ -14,14 +14,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; + +import java.io.InputStream; import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; import io.quarkus.runtime.ShutdownContext; import io.quarkus.runtime.annotations.Recorder; import org.apache.camel.CamelContext; +import org.apache.camel.RoutesBuilder; +import org.apache.camel.builder.RouteBuilder; import org.apache.camel.main.MainListener; +import org.apache.camel.model.Model; +import org.apache.camel.support.ResourceHelper; +import org.apache.camel.util.ObjectHelper; @Recorder public class CamelMainRecorder { @@ -51,6 +58,40 @@ public class CamelMainRecorder { } } + + public void addRouteBuilder( + RuntimeValue<CamelMain> main, + RuntimeValue<RoutesBuilder> routesBuilder) { + + RoutesBuilder builder = routesBuilder.getValue(); + + // TODO: camel main may need to support RoutesBuilder instead of RouteBuilder only + if (!(builder instanceof RouteBuilder)) { + throw new IllegalArgumentException("Cannot handle routes builder of type: '" + builder.getClass().getName() + "'"); + } + + try { + main.getValue().addRouteBuilder((RouteBuilder)builder); + } catch (Exception e) { + throw new RuntimeException("Could not add route builder '" + builder.getClass().getName() + "'", e); + } + } + + public void addRoutesFromLocation( + RuntimeValue<CamelMain> main, + String location) { + + if (ObjectHelper.isNotEmpty(location)) { + // TODO: if pointing to a directory, we should load all xmls in it + // (maybe with glob support in it to be complete) + try (InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(main.getValue().getCamelContext(), location)) { + main.getValue().getCamelContext().getExtension(Model.class).addRouteDefinitions(is); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + } + public void addListener(RuntimeValue<CamelMain> main, MainListener listener) { main.getValue().addMainListener(listener); } diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelProducers.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelProducers.java similarity index 97% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelProducers.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelProducers.java index c97e710..3801213 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelProducers.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelProducers.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime; +package org.apache.camel.quarkus.core; import javax.enterprise.inject.Produces; import javax.inject.Singleton; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelRecorder.java similarity index 92% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelRecorder.java index b162104..c18c94a 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/CamelRecorder.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/CamelRecorder.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime; +package org.apache.camel.quarkus.core; import io.quarkus.arc.runtime.BeanContainer; import io.quarkus.runtime.RuntimeValue; @@ -22,9 +22,6 @@ import io.quarkus.runtime.annotations.Recorder; import org.apache.camel.CamelContext; import org.apache.camel.ExtendedCamelContext; import org.apache.camel.RuntimeCamelException; -import org.apache.camel.quarkus.core.runtime.support.FastCamelContext; -import org.apache.camel.quarkus.core.runtime.support.FastModel; -import org.apache.camel.quarkus.core.runtime.support.RuntimeRegistry; import org.apache.camel.spi.Registry; import org.graalvm.nativeimage.ImageInfo; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastCamelContext.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java similarity index 99% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastCamelContext.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java index 1096806..a73b143 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastCamelContext.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastCamelContext.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import java.util.Collection; import java.util.Map; @@ -66,7 +66,7 @@ import org.apache.camel.impl.transformer.TransformerKey; import org.apache.camel.impl.validator.ValidatorKey; import org.apache.camel.model.Model; import org.apache.camel.processor.MulticastProcessor; -import org.apache.camel.quarkus.core.runtime.support.FastModel.FastRouteContext; +import org.apache.camel.quarkus.core.FastModel.FastRouteContext; import org.apache.camel.spi.AsyncProcessorAwaitManager; import org.apache.camel.spi.BeanIntrospection; import org.apache.camel.spi.BeanProcessorFactory; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastModel.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastModel.java similarity index 99% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastModel.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastModel.java index 35788a3..eb4f6d6 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastModel.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastModel.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import java.util.ArrayList; import java.util.List; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastUuidGenerator.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastUuidGenerator.java similarity index 96% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastUuidGenerator.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastUuidGenerator.java index c6447fd..960dfd2 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/FastUuidGenerator.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/FastUuidGenerator.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import java.util.concurrent.ThreadLocalRandom; import java.util.concurrent.atomic.AtomicLong; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/Flags.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/Flags.java similarity index 82% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/Flags.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/Flags.java index 69247e2..0b6d029 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/Flags.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/Flags.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import java.util.function.BooleanSupplier; @@ -38,4 +38,10 @@ public final class Flags { } } + public static final class MainDisabled implements BooleanSupplier { + @Override + public boolean getAsBoolean() { + return ConfigProvider.getConfig().getOptionalValue("quarkus.camel.disable-main", Boolean.class).orElse(Boolean.FALSE); + } + } } diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/NoShutdownStrategy.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/NoShutdownStrategy.java similarity index 98% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/NoShutdownStrategy.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/NoShutdownStrategy.java index dd70b85..4110fba 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/NoShutdownStrategy.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/NoShutdownStrategy.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import java.util.List; import java.util.concurrent.TimeUnit; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/RuntimeBeanRepository.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeBeanRepository.java similarity index 96% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/RuntimeBeanRepository.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeBeanRepository.java index c89aed8..61d5e80 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/RuntimeBeanRepository.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeBeanRepository.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import java.util.Map; import java.util.Set; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/RuntimeRegistry.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeRegistry.java similarity index 95% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/RuntimeRegistry.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeRegistry.java index a640cbf..9324e8e 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/RuntimeRegistry.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/RuntimeRegistry.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.support; +package org.apache.camel.quarkus.core; import io.quarkus.runtime.RuntimeValue; import org.apache.camel.support.DefaultRegistry; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/graal/SubstituteHostUtils.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/graal/SubstituteHostUtils.java similarity index 95% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/graal/SubstituteHostUtils.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/graal/SubstituteHostUtils.java index 114d3a6..191e126 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/graal/SubstituteHostUtils.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/graal/SubstituteHostUtils.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.graal; +package org.apache.camel.quarkus.core.graal; import java.net.InetAddress; import java.net.UnknownHostException; diff --git a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/graal/SubstituteIntrospectionSupport.java b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/graal/SubstituteIntrospectionSupport.java similarity index 96% rename from extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/graal/SubstituteIntrospectionSupport.java rename to extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/graal/SubstituteIntrospectionSupport.java index 8a666ee..d0d0254 100644 --- a/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/graal/SubstituteIntrospectionSupport.java +++ b/extensions/core/runtime/src/main/java/org/apache/camel/quarkus/core/graal/SubstituteIntrospectionSupport.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.core.runtime.graal; +package org.apache.camel.quarkus.core.graal; import java.util.Map; diff --git a/extensions/main/deployment/pom.xml b/extensions/main/deployment/pom.xml deleted file mode 100644 index 5e7657d..0000000 --- a/extensions/main/deployment/pom.xml +++ /dev/null @@ -1,73 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main-parent</artifactId> - <version>0.2.1-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-main-deployment</artifactId> - <name>Camel Quarkus :: Main :: Deployment</name> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-bom-deployment</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core-deployment</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <annotationProcessorPaths> - <path> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-processor</artifactId> - <version>${quarkus.version}</version> - </path> - </annotationProcessorPaths> - </configuration> - </plugin> - </plugins> - </build> - -</project> diff --git a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/BuildProcessor.java b/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/BuildProcessor.java deleted file mode 100644 index 3ea1adf..0000000 --- a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/BuildProcessor.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.main.deployment; - -import java.util.List; - -import io.quarkus.arc.deployment.AdditionalBeanBuildItem; -import io.quarkus.arc.deployment.BeanContainerBuildItem; -import io.quarkus.deployment.annotations.BuildProducer; -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.annotations.ExecutionTime; -import io.quarkus.deployment.annotations.Record; -import io.quarkus.deployment.builditem.CombinedIndexBuildItem; -import io.quarkus.deployment.builditem.ServiceStartBuildItem; -import io.quarkus.deployment.builditem.ShutdownContextBuildItem; -import io.quarkus.runtime.RuntimeValue; -import org.apache.camel.quarkus.core.deployment.CamelContextBuildItem; -import org.apache.camel.quarkus.core.deployment.CamelSupport; -import org.apache.camel.quarkus.main.CamelMain; -import org.apache.camel.quarkus.main.CamelMainProducers; -import org.apache.camel.quarkus.main.CamelMainRecorder; - -public class BuildProcessor { - @BuildStep - void beans(BuildProducer<AdditionalBeanBuildItem> beanProducer) { - beanProducer.produce(AdditionalBeanBuildItem.unremovableOf(CamelMainProducers.class)); - } - - @Record(ExecutionTime.STATIC_INIT) - @BuildStep - CamelMainBuildItem create( - CombinedIndexBuildItem combinedIndexBuildItem, - CamelMainRecorder recorder, - CamelContextBuildItem context, - List<CamelMainListenerBuildItem> listeners, - BeanContainerBuildItem beanContainerBuildItem) { - - RuntimeValue<CamelMain> main = recorder.createCamelMain(context.getCamelContext(), beanContainerBuildItem.getValue()); - for (CamelMainListenerBuildItem listener: listeners) { - recorder.addListener(main, listener.getListener()); - } - - CamelSupport.getRouteBuilderClasses(combinedIndexBuildItem.getIndex()).forEach(name -> { - recorder.addRouteBuilder(main, name); - }); - - return new CamelMainBuildItem(main); - } - - @Record(ExecutionTime.RUNTIME_INIT) - @BuildStep - void start( - CamelMainRecorder recorder, - CamelMainBuildItem main, - ShutdownContextBuildItem shutdown, - CombinedIndexBuildItem combinedIndexBuildItem, - // TODO: keep this list as placeholder to ensure the ArC container is fully - // started before starting main - List<ServiceStartBuildItem> startList) { - - recorder.start(shutdown, main.getInstance()); - } -} diff --git a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/Feature.java b/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/Feature.java deleted file mode 100644 index b731581..0000000 --- a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/Feature.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.main.deployment; - -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.builditem.FeatureBuildItem; - -class Feature { - private static final String FEATURE = "camel-main"; - - @BuildStep - FeatureBuildItem feature() { - return new FeatureBuildItem(FEATURE); - } -} diff --git a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java b/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java deleted file mode 100644 index 8f69637..0000000 --- a/extensions/main/deployment/src/main/java/org/apache/camel/quarkus/main/deployment/SubstrateProcessor.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.camel.quarkus.main.deployment; - -import io.quarkus.deployment.annotations.BuildProducer; -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.builditem.CombinedIndexBuildItem; -import io.quarkus.deployment.builditem.substrate.ReflectiveClassBuildItem; -import org.apache.camel.quarkus.core.deployment.CamelSupport; -import org.jboss.jandex.IndexView; - -public class SubstrateProcessor { - @BuildStep - void process( - CombinedIndexBuildItem combinedIndexBuildItem, - BuildProducer<ReflectiveClassBuildItem> reflectiveClass) { - - IndexView view = combinedIndexBuildItem.getIndex(); - - // - // Register routes as reflection aware as camel-main main use reflection - // to bind beans to the registry - // - CamelSupport.getRouteBuilderClasses(view).forEach(name -> { - reflectiveClass.produce(new ReflectiveClassBuildItem(true, false, name)); - }); - - reflectiveClass.produce(new ReflectiveClassBuildItem( - true, - false, - org.apache.camel.main.DefaultConfigurationProperties.class, - org.apache.camel.main.MainConfigurationProperties.class, - org.apache.camel.main.HystrixConfigurationProperties.class, - org.apache.camel.main.RestConfigurationProperties.class) - ); - } -} diff --git a/extensions/main/pom.xml b/extensions/main/pom.xml deleted file mode 100644 index 1d83e2f..0000000 --- a/extensions/main/pom.xml +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-build-parent</artifactId> - <version>0.2.1-SNAPSHOT</version> - <relativePath>../../poms/build-parent/pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - - <artifactId>camel-quarkus-main-parent</artifactId> - <name>Camel Quarkus :: Main</name> - <packaging>pom</packaging> - <modules> - <module>deployment</module> - <module>runtime</module> - </modules> - -</project> diff --git a/extensions/main/runtime/pom.xml b/extensions/main/runtime/pom.xml deleted file mode 100644 index c9dd7ad..0000000 --- a/extensions/main/runtime/pom.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - ---> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <parent> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main-parent</artifactId> - <version>0.2.1-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <artifactId>camel-quarkus-main</artifactId> - <name>Camel Quarkus :: Main :: Runtime</name> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-bom</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - </dependencies> - </dependencyManagement> - - <dependencies> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-core</artifactId> - </dependency> - - <!-- Camel --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-main</artifactId> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-bootstrap-maven-plugin</artifactId> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <configuration> - <annotationProcessorPaths> - <path> - <groupId>io.quarkus</groupId> - <artifactId>quarkus-extension-processor</artifactId> - <version>${quarkus.version}</version> - </path> - </annotationProcessorPaths> - </configuration> - </plugin> - </plugins> - </build> -</project> diff --git a/extensions/pom.xml b/extensions/pom.xml index d2c369b..1096421 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -42,7 +42,6 @@ <module>http-common</module> <!-- components --> - <module>main</module> <module>netty-http</module> <module>infinispan</module> <module>aws-s3</module> diff --git a/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/CustomDefaultServletClassTest.java b/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/CustomDefaultServletClassTest.java index af5a542..627ac71 100644 --- a/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/CustomDefaultServletClassTest.java +++ b/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/CustomDefaultServletClassTest.java @@ -24,7 +24,6 @@ import java.util.Properties; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.impl.DefaultCamelContext; import org.hamcrest.core.IsEqual; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.Asset; @@ -37,21 +36,14 @@ public class CustomDefaultServletClassTest { @RegisterExtension static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) + .addClass(Routes.class) .addAsResource(applicationProperties(), "application.properties")); @Test public void customDefaultServletClass() throws Exception { - DefaultCamelContext context = new DefaultCamelContext(); - context.addRoutes(new Routes()); - context.start(); - - try { - RestAssured.when().get("/custom").then() - .body(IsEqual.equalTo("GET: /custom")) - .and().header("x-servlet-class-name", CustomServlet.class.getName()); - } finally { - context.stop(); - } + RestAssured.when().get("/custom").then() + .body(IsEqual.equalTo("GET: /custom")) + .and().header("x-servlet-class-name", CustomServlet.class.getName()); } public static final class Routes extends RouteBuilder { diff --git a/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/MinimalConfigTest.java b/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/MinimalConfigTest.java index 544823e..e93a01b 100644 --- a/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/MinimalConfigTest.java +++ b/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/MinimalConfigTest.java @@ -24,7 +24,6 @@ import java.util.Properties; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.impl.DefaultCamelContext; import org.hamcrest.core.IsEqual; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.Asset; @@ -37,19 +36,13 @@ public class MinimalConfigTest { @RegisterExtension static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) + .addClass(CustomDefaultServletClassTest.Routes.class) .addAsResource(applicationProperties(), "application.properties")); @Test public void minimal() throws Exception { - DefaultCamelContext context = new DefaultCamelContext(); - context.addRoutes(new Routes()); - context.start(); - - try { - RestAssured.when().get("/hello").then().body(IsEqual.equalTo("GET: /hello")); - } finally { - context.stop(); - } + RestAssured.when().get("/hello") + .then().body(IsEqual.equalTo("GET: /hello")); } public static final class Routes extends RouteBuilder { diff --git a/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/NoDefaultServletTest.java b/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/NoDefaultServletTest.java index b22bf9d..331f7fa 100644 --- a/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/NoDefaultServletTest.java +++ b/extensions/servlet/deployment/src/test/java/org/apache/camel/quarkus/component/servlet/test/NoDefaultServletTest.java @@ -24,7 +24,6 @@ import java.util.Properties; import io.quarkus.test.QuarkusUnitTest; import io.restassured.RestAssured; import org.apache.camel.builder.RouteBuilder; -import org.apache.camel.impl.DefaultCamelContext; import org.hamcrest.core.IsEqual; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.Asset; @@ -37,21 +36,14 @@ public class NoDefaultServletTest { @RegisterExtension static final QuarkusUnitTest CONFIG = new QuarkusUnitTest() .setArchiveProducer(() -> ShrinkWrap.create(JavaArchive.class) + .addClass(CustomDefaultServletClassTest.Routes.class) .addAsResource(applicationProperties(), "application.properties")); @Test public void noDefaultServlet() throws Exception { - DefaultCamelContext context = new DefaultCamelContext(); - context.addRoutes(new Routes()); - context.start(); - - try { - RestAssured.when().get("/my-path/custom").then() - .body(IsEqual.equalTo("GET: /custom")) - .and().header("x-servlet-class-name", CustomServlet.class.getName()); - } finally { - context.stop(); - } + RestAssured.when().get("/my-path/custom").then() + .body(IsEqual.equalTo("GET: /custom")) + .and().header("x-servlet-class-name", CustomServlet.class.getName()); } public static final class Routes extends RouteBuilder { diff --git a/integration-tests/aws/pom.xml b/integration-tests/aws/pom.xml index 405dccb..a077bf8 100644 --- a/integration-tests/aws/pom.xml +++ b/integration-tests/aws/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/bean/pom.xml b/integration-tests/bean/pom.xml index 7b5ec49..33fbaff 100644 --- a/integration-tests/bean/pom.xml +++ b/integration-tests/bean/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/core-impl/pom.xml b/integration-tests/core-impl/pom.xml index 8e71031..e164bb0 100644 --- a/integration-tests/core-impl/pom.xml +++ b/integration-tests/core-impl/pom.xml @@ -26,7 +26,7 @@ <modelVersion>4.0.0</modelVersion> <artifactId>camel-quarkus-integration-test-core-impl</artifactId> - <name>Camel Quarkus :: Integration Tests :: Core :: Impl</name> + <name>Camel Quarkus :: Integration Tests :: Core Impl</name> <description>The camel integration tests</description> <dependencies> diff --git a/integration-tests/core-impl/src/main/resources/application.properties b/integration-tests/core-impl/src/main/resources/application.properties index 775072e..f87c33f 100644 --- a/integration-tests/core-impl/src/main/resources/application.properties +++ b/integration-tests/core-impl/src/main/resources/application.properties @@ -24,6 +24,7 @@ quarkus.log.file.enable = false # quarkus.camel.disable-xml=true quarkus.camel.disable-jaxb=true +quarkus.camel.disable-main=true quarkus.camel.dump-routes=true # # Camel diff --git a/integration-tests/main/deployment/pom.xml b/integration-tests/core-main/deployment/pom.xml similarity index 79% rename from integration-tests/main/deployment/pom.xml rename to integration-tests/core-main/deployment/pom.xml index e07be04..89f6e17 100644 --- a/integration-tests/main/deployment/pom.xml +++ b/integration-tests/core-main/deployment/pom.xml @@ -2,13 +2,13 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-test-main-parent</artifactId> + <artifactId>camel-quarkus-integration-test-core-main-parent</artifactId> <version>0.2.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> - <artifactId>camel-quarkus-integration-test-main-ext-deployment</artifactId> - <name>Camel Quarkus :: Integration Tests :: Main :: Extension :: Deployment</name> + <artifactId>camel-quarkus-integration-test-core-main-ext-deployment</artifactId> + <name>Camel Quarkus :: Integration Tests :: Core Main :: Extension :: Deployment</name> <description>A test extension</description> <dependencyManagement> @@ -30,11 +30,7 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main-deployment</artifactId> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-test-main-ext</artifactId> + <artifactId>camel-quarkus-integration-test-core-main-ext</artifactId> </dependency> </dependencies> diff --git a/integration-tests/main/deployment/src/main/java/org/apache/camel/quarkus/main/support/deployment/Feature.java b/integration-tests/core-main/deployment/src/main/java/org/apache/camel/quarkus/core/runtime/support/deployment/Feature.java similarity index 94% rename from integration-tests/main/deployment/src/main/java/org/apache/camel/quarkus/main/support/deployment/Feature.java rename to integration-tests/core-main/deployment/src/main/java/org/apache/camel/quarkus/core/runtime/support/deployment/Feature.java index cc68cbd..fcda057 100644 --- a/integration-tests/main/deployment/src/main/java/org/apache/camel/quarkus/main/support/deployment/Feature.java +++ b/integration-tests/core-main/deployment/src/main/java/org/apache/camel/quarkus/core/runtime/support/deployment/Feature.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main.support.deployment; +package org.apache.camel.quarkus.core.runtime.support.deployment; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.FeatureBuildItem; diff --git a/integration-tests/main/deployment/src/main/java/org/apache/camel/quarkus/main/support/deployment/SupportBuildStep.java b/integration-tests/core-main/deployment/src/main/java/org/apache/camel/quarkus/core/runtime/support/deployment/SupportBuildStep.java similarity index 84% rename from integration-tests/main/deployment/src/main/java/org/apache/camel/quarkus/main/support/deployment/SupportBuildStep.java rename to integration-tests/core-main/deployment/src/main/java/org/apache/camel/quarkus/core/runtime/support/deployment/SupportBuildStep.java index eecce74..3cc84f8 100644 --- a/integration-tests/main/deployment/src/main/java/org/apache/camel/quarkus/main/support/deployment/SupportBuildStep.java +++ b/integration-tests/core-main/deployment/src/main/java/org/apache/camel/quarkus/core/runtime/support/deployment/SupportBuildStep.java @@ -14,12 +14,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main.support.deployment; +package org.apache.camel.quarkus.core.runtime.support.deployment; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; -import org.apache.camel.quarkus.main.deployment.CamelMainListenerBuildItem; -import org.apache.camel.quarkus.main.support.SupportListener; +import org.apache.camel.quarkus.core.deployment.CamelMainListenerBuildItem; +import org.apache.camel.quarkus.core.runtime.support.SupportListener; public class SupportBuildStep { @BuildStep diff --git a/integration-tests/main/pom.xml b/integration-tests/core-main/pom.xml similarity index 87% rename from integration-tests/main/pom.xml rename to integration-tests/core-main/pom.xml index 81ae321..d7307aa 100644 --- a/integration-tests/main/pom.xml +++ b/integration-tests/core-main/pom.xml @@ -23,14 +23,14 @@ <modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> - <artifactId>camel-quarkus-integration-test-main-parent</artifactId> - <name>Camel Quarkus :: Integration Tests :: Main :: Parent</name> + <artifactId>camel-quarkus-integration-test-core-main-parent</artifactId> + <name>Camel Quarkus :: Integration Tests :: Core Main :: Parent</name> <dependencyManagement> <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-test-main-ext</artifactId> + <artifactId>camel-quarkus-integration-test-core-main-ext</artifactId> <version>${project.version}</version> </dependency> </dependencies> diff --git a/integration-tests/main/runtime/pom.xml b/integration-tests/core-main/runtime/pom.xml similarity index 87% rename from integration-tests/main/runtime/pom.xml rename to integration-tests/core-main/runtime/pom.xml index 8873355..51005dc 100644 --- a/integration-tests/main/runtime/pom.xml +++ b/integration-tests/core-main/runtime/pom.xml @@ -20,13 +20,13 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-test-main-parent</artifactId> + <artifactId>camel-quarkus-integration-test-core-main-parent</artifactId> <version>0.2.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> - <artifactId>camel-quarkus-integration-test-main-ext</artifactId> - <name>Camel Quarkus :: Integration Tests :: Main :: Extension :: Runtime</name> + <artifactId>camel-quarkus-integration-test-core-main-ext</artifactId> + <name>Camel Quarkus :: Integration Tests :: Core Main :: Extension :: Runtime</name> <description>A test extension</description> <dependencyManagement> @@ -46,10 +46,6 @@ <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-core</artifactId> </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> - </dependency> </dependencies> <build> diff --git a/integration-tests/main/runtime/src/main/java/org/apache/camel/quarkus/main/support/SupportListener.java b/integration-tests/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/SupportListener.java similarity index 96% rename from integration-tests/main/runtime/src/main/java/org/apache/camel/quarkus/main/support/SupportListener.java rename to integration-tests/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/SupportListener.java index 15276ef..2206d7a 100644 --- a/integration-tests/main/runtime/src/main/java/org/apache/camel/quarkus/main/support/SupportListener.java +++ b/integration-tests/core-main/runtime/src/main/java/org/apache/camel/quarkus/core/runtime/support/SupportListener.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main.support; +package org.apache.camel.quarkus.core.runtime.support; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; diff --git a/integration-tests/main/test/pom.xml b/integration-tests/core-main/test/pom.xml similarity index 93% rename from integration-tests/main/test/pom.xml rename to integration-tests/core-main/test/pom.xml index 32df180..561ea05 100644 --- a/integration-tests/main/test/pom.xml +++ b/integration-tests/core-main/test/pom.xml @@ -20,19 +20,19 @@ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-test-main-parent</artifactId> + <artifactId>camel-quarkus-integration-test-core-main-parent</artifactId> <version>0.2.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> - <artifactId>camel-quarkus-integration-test-main</artifactId> - <name>Camel Quarkus :: Integration Tests :: Main</name> + <artifactId>camel-quarkus-integration-test-core-main</artifactId> + <name>Camel Quarkus :: Integration Tests :: Core Main :: Tests</name> <description>The camel integration tests</description> <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> @@ -44,7 +44,7 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-integration-test-main-ext</artifactId> + <artifactId>camel-quarkus-integration-test-core-main-ext</artifactId> </dependency> <dependency> diff --git a/integration-tests/main/test/src/main/java/org/apache/camel/quarkus/main/CamelRoute.java b/integration-tests/core-main/test/src/main/java/org/apache/camel/quarkus/core/CamelRoute.java similarity index 96% rename from integration-tests/main/test/src/main/java/org/apache/camel/quarkus/main/CamelRoute.java rename to integration-tests/core-main/test/src/main/java/org/apache/camel/quarkus/core/CamelRoute.java index e43f8e5..9731e2d 100644 --- a/integration-tests/main/test/src/main/java/org/apache/camel/quarkus/main/CamelRoute.java +++ b/integration-tests/core-main/test/src/main/java/org/apache/camel/quarkus/core/CamelRoute.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; import org.apache.camel.builder.RouteBuilder; diff --git a/integration-tests/main/test/src/main/java/org/apache/camel/quarkus/main/CamelServlet.java b/integration-tests/core-main/test/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java similarity index 97% rename from integration-tests/main/test/src/main/java/org/apache/camel/quarkus/main/CamelServlet.java rename to integration-tests/core-main/test/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java index 4054f2f..4dd8876 100644 --- a/integration-tests/main/test/src/main/java/org/apache/camel/quarkus/main/CamelServlet.java +++ b/integration-tests/core-main/test/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; import java.util.Set; import javax.enterprise.context.ApplicationScoped; @@ -33,7 +33,6 @@ import org.apache.camel.CamelContext; import org.apache.camel.ExtendedCamelContext; import org.apache.camel.component.log.LogComponent; import org.apache.camel.component.timer.TimerComponent; -import org.apache.camel.quarkus.core.runtime.CamelConfig; import org.apache.camel.spi.Registry; import org.apache.camel.support.processor.DefaultExchangeFormatter; diff --git a/integration-tests/main/test/src/main/resources/application.properties b/integration-tests/core-main/test/src/main/resources/application.properties similarity index 100% rename from integration-tests/main/test/src/main/resources/application.properties rename to integration-tests/core-main/test/src/main/resources/application.properties diff --git a/integration-tests/main/test/src/test/java/org/apache/camel/quarkus/main/CamelITCase.java b/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelITCase.java similarity index 95% rename from integration-tests/main/test/src/test/java/org/apache/camel/quarkus/main/CamelITCase.java rename to integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelITCase.java index 7658725..6e466d3 100644 --- a/integration-tests/main/test/src/test/java/org/apache/camel/quarkus/main/CamelITCase.java +++ b/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelITCase.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; import io.quarkus.test.junit.SubstrateTest; diff --git a/integration-tests/main/test/src/test/java/org/apache/camel/quarkus/main/CamelTest.java b/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java similarity index 96% rename from integration-tests/main/test/src/test/java/org/apache/camel/quarkus/main/CamelTest.java rename to integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java index 9d153c2..bb2e1de 100644 --- a/integration-tests/main/test/src/test/java/org/apache/camel/quarkus/main/CamelTest.java +++ b/integration-tests/core-main/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.camel.quarkus.main; +package org.apache.camel.quarkus.core; import java.net.HttpURLConnection; import javax.ws.rs.core.MediaType; @@ -24,7 +24,7 @@ import io.restassured.RestAssured; import io.restassured.http.ContentType; import io.restassured.path.json.JsonPath; import io.restassured.response.Response; -import org.apache.camel.quarkus.main.support.SupportListener; +import org.apache.camel.quarkus.core.runtime.support.SupportListener; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; diff --git a/integration-tests/core/test/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java b/integration-tests/core/test/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java index 98900e8..42f7d80 100644 --- a/integration-tests/core/test/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java +++ b/integration-tests/core/test/src/main/java/org/apache/camel/quarkus/core/CamelServlet.java @@ -64,4 +64,11 @@ public class CamelServlet { public boolean lookupContext() { return registry.findByType(CamelContext.class).size() == 1; } + + @Path("/registry/lookup-main") + @GET + @Produces(MediaType.TEXT_PLAIN) + public boolean lookupMain() { + return registry.findByType(CamelMain.class).size() == 1; + } } diff --git a/integration-tests/core/test/src/main/resources/application.properties b/integration-tests/core/test/src/main/resources/application.properties index 478adbb..baa6a6a 100644 --- a/integration-tests/core/test/src/main/resources/application.properties +++ b/integration-tests/core/test/src/main/resources/application.properties @@ -24,6 +24,7 @@ quarkus.log.file.enable = false # quarkus.camel.disable-xml=true quarkus.camel.disable-jaxb=true +quarkus.camel.disable-main=true quarkus.camel.dump-routes=true # diff --git a/integration-tests/core/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java b/integration-tests/core/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java index d48c256..d60b7c5 100644 --- a/integration-tests/core/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java +++ b/integration-tests/core/test/src/test/java/org/apache/camel/quarkus/core/CamelTest.java @@ -33,6 +33,7 @@ public class CamelTest { public void testContainerLookupFromRegistry() { RestAssured.when().get("/test/registry/lookup-registry").then().body(is("true")); RestAssured.when().get("/test/registry/lookup-context").then().body(is("true")); + RestAssured.when().get("/test/registry/lookup-main").then().body(is("false")); } @Test diff --git a/integration-tests/csv/pom.xml b/integration-tests/csv/pom.xml index 5ea9fa5..6c07899 100644 --- a/integration-tests/csv/pom.xml +++ b/integration-tests/csv/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/infinispan/pom.xml b/integration-tests/infinispan/pom.xml index cd58924..4e18a13 100644 --- a/integration-tests/infinispan/pom.xml +++ b/integration-tests/infinispan/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/infinispan/src/test/java/org/apache/camel/quarkus/component/infinispan/CamelTest.java b/integration-tests/infinispan/src/test/java/org/apache/camel/quarkus/component/infinispan/CamelTest.java index ea66692..4f33ba7 100644 --- a/integration-tests/infinispan/src/test/java/org/apache/camel/quarkus/component/infinispan/CamelTest.java +++ b/integration-tests/infinispan/src/test/java/org/apache/camel/quarkus/component/infinispan/CamelTest.java @@ -21,7 +21,7 @@ import javax.inject.Inject; import io.quarkus.test.common.QuarkusTestResource; import io.quarkus.test.junit.QuarkusTest; import io.restassured.RestAssured; -import org.apache.camel.quarkus.main.CamelMain; +import org.apache.camel.quarkus.core.CamelMain; import org.infinispan.client.hotrod.RemoteCacheManager; import org.junit.jupiter.api.Test; diff --git a/integration-tests/jdbc/pom.xml b/integration-tests/jdbc/pom.xml index 1d512de..5cf78e4 100644 --- a/integration-tests/jdbc/pom.xml +++ b/integration-tests/jdbc/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/mail/pom.xml b/integration-tests/mail/pom.xml index beb0f8d..4038dde 100644 --- a/integration-tests/mail/pom.xml +++ b/integration-tests/mail/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/microprofile-metrics/pom.xml b/integration-tests/microprofile-metrics/pom.xml index 8469d0f..e9f92fc 100644 --- a/integration-tests/microprofile-metrics/pom.xml +++ b/integration-tests/microprofile-metrics/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/netty-http/pom.xml b/integration-tests/netty-http/pom.xml index 71efab8..53fffd3 100644 --- a/integration-tests/netty-http/pom.xml +++ b/integration-tests/netty-http/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/paho/pom.xml b/integration-tests/paho/pom.xml index 0bc2301..5cf7dfa 100644 --- a/integration-tests/paho/pom.xml +++ b/integration-tests/paho/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/platform-http/pom.xml b/integration-tests/platform-http/pom.xml index e4c6903..137c840 100644 --- a/integration-tests/platform-http/pom.xml +++ b/integration-tests/platform-http/pom.xml @@ -34,7 +34,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index 5bd6c06..68a7d69 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -79,8 +79,8 @@ <modules> <!-- build those first --> <module>core</module> + <module>core-main</module> <module>core-impl</module> - <module>main</module> <module>netty-http</module> <module>aws</module> diff --git a/integration-tests/salesforce/pom.xml b/integration-tests/salesforce/pom.xml index 4c65ce0..5ff5a1d 100644 --- a/integration-tests/salesforce/pom.xml +++ b/integration-tests/salesforce/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/servlet/pom.xml b/integration-tests/servlet/pom.xml index e3c1c5f..f17829a 100644 --- a/integration-tests/servlet/pom.xml +++ b/integration-tests/servlet/pom.xml @@ -45,7 +45,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/twitter/pom.xml b/integration-tests/twitter/pom.xml index 74c94dc..410e5b0 100644 --- a/integration-tests/twitter/pom.xml +++ b/integration-tests/twitter/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/integration-tests/zipfile/pom.xml b/integration-tests/zipfile/pom.xml index 900b153..a43f313 100644 --- a/integration-tests/zipfile/pom.xml +++ b/integration-tests/zipfile/pom.xml @@ -32,7 +32,7 @@ <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> + <artifactId>camel-quarkus-core</artifactId> </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml index 1a0cba5..c0c1090 100644 --- a/poms/bom-deployment/pom.xml +++ b/poms/bom-deployment/pom.xml @@ -152,11 +152,6 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main-deployment</artifactId> - <version>${camel-quarkus.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-microprofile-metrics-deployment</artifactId> <version>${project.version}</version> </dependency> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index 17c6434..50cc881 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -329,11 +329,6 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> - <artifactId>camel-quarkus-main</artifactId> - <version>${camel-quarkus.version}</version> - </dependency> - <dependency> - <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-netty-http</artifactId> <version>${camel-quarkus.version}</version> </dependency>
