Skip to content

Commit

Permalink
Merge pull request #211 from lburgazzoli/quarkus-0.23.1
Browse files Browse the repository at this point in the history
Upgarde to quarkus v0.23.1
  • Loading branch information
oscerd committed Sep 30, 2019
2 parents 5d81db0 + 9fe12f9 commit 7719640
Show file tree
Hide file tree
Showing 26 changed files with 49 additions and 76 deletions.
10 changes: 10 additions & 0 deletions extensions/infinispan/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,16 @@
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-infinispan</artifactId>
<exclusions>
<exclusion>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.jgroups</groupId>
<artifactId>jgroups</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
Expand Down
4 changes: 4 additions & 0 deletions extensions/servlet/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx-http-deployment</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-undertow-deployment</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,11 @@
*/
package org.apache.camel.quarkus.component.servlet.deployment;

import java.io.IOException;
import java.util.Map.Entry;

import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
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.FeatureBuildItem;
import io.quarkus.undertow.deployment.ServletBuildItem;
import io.quarkus.undertow.deployment.ServletBuildItem.Builder;
Expand All @@ -41,21 +38,17 @@ FeatureBuildItem feature() {
}

@BuildStep
@Record(ExecutionTime.STATIC_INIT)
void build(BuildProducer<ServletBuildItem> servlet, BuildProducer<AdditionalBeanBuildItem> additionalBean)
throws IOException {

void build(BuildProducer<ServletBuildItem> servlet, BuildProducer<AdditionalBeanBuildItem> additionalBean) {
boolean servletCreated = false;
if (camelServletConfig.servlet.defaultServlet.isValid()) {
servlet.produce(
newServlet(ServletConfig.DEFAULT_SERVLET_NAME, camelServletConfig.servlet.defaultServlet, additionalBean));
servlet.produce(newServlet(ServletConfig.DEFAULT_SERVLET_NAME, camelServletConfig.servlet.defaultServlet, additionalBean));
servletCreated = true;
}

for (Entry<String, ServletConfig> e : camelServletConfig.servlet.namedServlets.entrySet()) {
if (ServletConfig.DEFAULT_SERVLET_NAME.equals(e.getKey())) {
throw new IllegalStateException(
String.format("Use quarkus.camel.servlet.urlPatterns instead of quarkus.camel.servlet.%s.urlPatterns",
String.format("Use quarkus.camel.servlet.url-patterns instead of quarkus.camel.servlet.%s.url-patterns",
ServletConfig.DEFAULT_SERVLET_NAME));
}
servlet.produce(newServlet(e.getKey(), e.getValue(), additionalBean));
Expand All @@ -64,26 +57,26 @@ void build(BuildProducer<ServletBuildItem> servlet, BuildProducer<AdditionalBean

if (!servletCreated) {
throw new IllegalStateException(
String.format(
"Map at least one servlet to a path using quarkus.camel.servlet.urlPatterns or quarkus.camel.servlet.[your-servlet-name].urlPatterns",
ServletConfig.DEFAULT_SERVLET_NAME));
"Map at least one servlet to a path using quarkus.camel.servlet.url-patterns or quarkus.camel.servlet.[your-servlet-name].url-patterns"
);
}

}

static ServletBuildItem newServlet(final String key, final ServletConfig servletConfig,
final BuildProducer<AdditionalBeanBuildItem> additionalBean) {
static ServletBuildItem newServlet(String key, ServletConfig servletConfig, BuildProducer<AdditionalBeanBuildItem> additionalBean) {
final String servletName = servletConfig.getEffectiveServletName(key);
if (servletConfig.urlPatterns.isEmpty()) {
throw new IllegalStateException(String.format("Missing quarkus.camel.servlet%s.url-patterns",
ServletConfig.DEFAULT_SERVLET_NAME.equals(servletName) ? "" : "." + servletName));
throw new IllegalStateException(
String.format("Missing quarkus.camel.servlet%s.url-patterns",
ServletConfig.DEFAULT_SERVLET_NAME.equals(servletName) ? "" : "." + servletName));
}

final Builder builder = ServletBuildItem.builder(servletName, servletConfig.servletClass);
additionalBean.produce(new AdditionalBeanBuildItem(servletConfig.servletClass));
for (String pattern : servletConfig.urlPatterns) {
builder.addMapping(pattern);
}

return builder.build();
}

}
2 changes: 0 additions & 2 deletions integration-tests/aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/bean/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/core-cdi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/core-impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/core/test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/csv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpsUrlHandler>true</enableHttpsUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/infinispan/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/jdbc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,8 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>true</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<debugBuildProcess>false</debugBuildProcess>
<disableReports>true</disableReports>
Expand Down
8 changes: 1 addition & 7 deletions integration-tests/mail/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<modelVersion>4.0.0</modelVersion>

<artifactId>camel-quarkus-integration-test-mail</artifactId>
<name>Camel Quarkus :: Integration Tests Mail :: Test</name>
<name>Camel Quarkus :: Integration Tests :: Mail</name>
<description>Integration tests for Camel Mail extension</description>

<dependencies>
Expand All @@ -46,10 +46,6 @@
<!-- <groupId>org.apache.camel.quarkus</groupId>-->
<!-- <artifactId>camel-quarkus-integration-test-mail-mailbox</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.jvnet.mock-javamail</groupId>
<artifactId>mock-javamail</artifactId>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -141,12 +137,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
package org.apache.camel.quarkus.component.mail;

import java.util.Properties;

import javax.enterprise.inject.Produces;
import javax.mail.Provider;
import javax.mail.Session;

import org.apache.camel.builder.RouteBuilder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,12 @@
package org.apache.camel.quarkus.component.mail;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;

import org.apache.camel.ProducerTemplate;
import org.jvnet.mock_javamail.Mailbox;

@Path("/mock/{username}")
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/microprofile-metrics/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpsUrlHandler>true</enableHttpsUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/netty-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -112,12 +112,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/paho/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpsUrlHandler>true</enableHttpsUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import io.quarkus.test.junit.QuarkusTest;
import io.restassured.RestAssured;
import io.restassured.http.ContentType;

import io.restassured.internal.assertion.Assertion;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

Expand Down
12 changes: 0 additions & 12 deletions integration-tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
-->
<native-image.docker-build>true</native-image.docker-build>
<native-image.container-runtime>docker</native-image.container-runtime>
<mock-javamail-version>1.9</mock-javamail-version>
<activemq-version>5.15.9</activemq-version>
</properties>

Expand All @@ -54,17 +53,6 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.jvnet.mock-javamail</groupId>
<artifactId>mock-javamail</artifactId>
<version>${mock-javamail-version}</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-core-deployment</artifactId>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/salesforce/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<disableReports>true</disableReports>
</configuration>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,8 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>true</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpUrlHandler>true</enableHttpUrlHandler>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>false</enableJni>
<debugBuildProcess>false</debugBuildProcess>
<disableReports>true</disableReports>
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/twitter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@
<goal>native-image</goal>
</goals>
<configuration>
<reportErrorsAtRuntime>false</reportErrorsAtRuntime>
<cleanupServer>true</cleanupServer>
<enableHttpsUrlHandler>true</enableHttpsUrlHandler>
<enableServer>false</enableServer>
<dumpProxies>false</dumpProxies>
<graalvmHome>${graalvmHome}</graalvmHome>
<enableJni>true</enableJni>
<enableAllSecurityServices>true</enableAllSecurityServices>
<disableReports>true</disableReports>
Expand Down

0 comments on commit 7719640

Please sign in to comment.