You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2020/02/14 15:54:14 UTC

[GitHub] [camel-quarkus] johnpoth opened a new pull request #722: Resolves #162 adds camel-box support

johnpoth opened a new pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722
 
 
   Thanks !

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722#discussion_r379526021
 
 

 ##########
 File path: integration-tests/box/src/test/java/org/apache/camel/quarkus/component/box/it/BoxIT.java
 ##########
 @@ -0,0 +1,29 @@
+/*
+ * 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.component.box.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+import org.junit.jupiter.api.condition.EnabledIfEnvironmentVariable;
+
+@EnabledIfEnvironmentVariable(named = "BOX_USER_NAME", matches = ".*")
 
 Review comment:
   Hm... this seems to match an empty `BOX_USER_NAME`. I am not sure defining an empty env var is possible though. Anyway, something like `.+` would perhaps be better, WDYT?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722#discussion_r379524048
 
 

 ##########
 File path: integration-tests/box/pom.xml
 ##########
 @@ -0,0 +1,149 @@
+<?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-integration-tests</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>camel-quarkus-integration-test-box</artifactId>
+    <name>Camel Quarkus :: Integration Tests :: Box</name>
+    <description>Integration tests for Camel Quarkus Box extension</description>
+
+    <properties>
+        <!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
+        <!-- The following rule tells mvnd to build the listed deployment modules before this module. -->
+        <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not -->
+        <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
+        <!-- Please update rule whenever you change the dependencies of this module by running -->
+        <!--     mvn process-resources -Pformat    from the root directory -->
+        <mvnd.builder.rule>camel-quarkus-direct-deployment,camel-quarkus-box-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-box</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-resteasy</artifactId>
+        </dependency>
+
+        <!-- test dependencies -->
+        <dependency>
+            <groupId>io.quarkus</groupId>
+            <artifactId>quarkus-junit5</artifactId>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.jsoup</groupId>
+                    <artifactId>jsoup</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+        <dependency>
+            <groupId>io.rest-assured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.camel.quarkus</groupId>
+            <artifactId>camel-quarkus-direct</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>io.quarkus</groupId>
+                <artifactId>quarkus-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+    <profiles>
+        <profile>
+            <id>native</id>
+            <activation>
+                <property>
+                    <name>native</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>integration-test</goal>
+                                    <goal>verify</goal>
+                                </goals>
+                                <configuration>
+                                    <systemProperties>
+                                        <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
+                                    </systemProperties>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>io.quarkus</groupId>
+                        <artifactId>quarkus-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>native-image</id>
+                                <goals>
+                                    <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>
+                                    <additionalBuildArgs>-H:+TraceClassInitialization</additionalBuildArgs>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
 
 Review comment:
   Could you please change this to the new style introduced in https://github.com/apache/camel-quarkus/pull/720/files#diff-13fed0010c65738aa32aa3e15e89171dR92-R114 ?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722#discussion_r379522223
 
 

 ##########
 File path: integration-tests/box/README.adoc
 ##########
 @@ -0,0 +1,17 @@
+== Camel Quarkus Box Integration Tests
+
+To run the `camel-quarkus-box` integration tests, you must first create a Box developer account https://account.box.com/login.
+
+Then set the following environment variables:
+
+[source,shell]
+----
+export BOX_USER_NAME=my-user-name
+export BOX_USER_PASSWORD=my-user-password
+export BOX_CLIENT_ID=my-client-id
+export BOX_CLIENT_SECRET=my-client_secret
+----
 
 Review comment:
   I appreciate the readme!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] oscerd commented on a change in pull request #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
oscerd commented on a change in pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722#discussion_r379510723
 
 

 ##########
 File path: extensions/box/deployment/src/main/java/org/apache/camel/quarkus/component/box/deployment/BoxProcessor.java
 ##########
 @@ -0,0 +1,101 @@
+/*
+ * 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.component.box.deployment;
+
+import com.box.sdk.BoxAPIRequest;
+import com.box.sdk.BoxDeveloperEditionAPIConnection;
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.AdditionalApplicationArchiveMarkerBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
+import org.apache.camel.component.box.BoxCollaborationsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxCommentsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxConfiguration;
+import org.apache.camel.component.box.BoxEventLogsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxEventsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxFilesManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxFoldersManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxGroupsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxSearchManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxTasksManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxUsersManagerEndpointConfiguration;
+import org.apache.camel.quarkus.core.deployment.UnbannedReflectiveBuildItem;
+
+class BoxProcessor {
+
+    private static final String FEATURE = "camel-box";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    AdditionalApplicationArchiveMarkerBuildItem boxArchiveMarker() {
+        return new AdditionalApplicationArchiveMarkerBuildItem("com/box/sdk");
+    }
+
+    @BuildStep
+    void configure(BuildProducer<SystemPropertyBuildItem> systemProperties,
+            BuildProducer<RuntimeInitializedClassBuildItem> runtimeClasses) {
+        systemProperties.produce(new SystemPropertyBuildItem("io.netty.noUnsafe", "true"));
 
 Review comment:
   Can 'io.netty.noUnsafe' be a variable?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] johnpoth commented on issue #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
johnpoth commented on issue #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722#issuecomment-586988669
 
 
   @oscerd @ppalaga addressed comments, thanks for reviewing !

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722#discussion_r379527345
 
 

 ##########
 File path: integration-tests/pom.xml
 ##########
 @@ -217,6 +217,7 @@
         <module>validator</module>
         <module>xslt</module>
         <module>zipfile</module>
+        <module>box</module>
 
 Review comment:
   Could you please sort the modules by running `mvn process-resources -Pformat` from the top level folder?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] oscerd merged pull request #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
oscerd merged pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #722: Resolves #162 adds camel-box support
URL: https://github.com/apache/camel-quarkus/pull/722#discussion_r379521457
 
 

 ##########
 File path: extensions/box/deployment/src/main/java/org/apache/camel/quarkus/component/box/deployment/BoxProcessor.java
 ##########
 @@ -0,0 +1,101 @@
+/*
+ * 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.component.box.deployment;
+
+import com.box.sdk.BoxAPIRequest;
+import com.box.sdk.BoxDeveloperEditionAPIConnection;
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.AdditionalApplicationArchiveMarkerBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.SystemPropertyBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem;
+import org.apache.camel.component.box.BoxCollaborationsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxCommentsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxConfiguration;
+import org.apache.camel.component.box.BoxEventLogsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxEventsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxFilesManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxFoldersManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxGroupsManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxSearchManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxTasksManagerEndpointConfiguration;
+import org.apache.camel.component.box.BoxUsersManagerEndpointConfiguration;
+import org.apache.camel.quarkus.core.deployment.UnbannedReflectiveBuildItem;
+
+class BoxProcessor {
+
+    private static final String FEATURE = "camel-box";
+
+    @BuildStep
+    FeatureBuildItem feature() {
+        return new FeatureBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+        return new ExtensionSslNativeSupportBuildItem(FEATURE);
+    }
+
+    @BuildStep
+    AdditionalApplicationArchiveMarkerBuildItem boxArchiveMarker() {
+        return new AdditionalApplicationArchiveMarkerBuildItem("com/box/sdk");
+    }
+
+    @BuildStep
+    void configure(BuildProducer<SystemPropertyBuildItem> systemProperties,
+            BuildProducer<RuntimeInitializedClassBuildItem> runtimeClasses) {
+        systemProperties.produce(new SystemPropertyBuildItem("io.netty.noUnsafe", "true"));
 
 Review comment:
   I do not see that box would depend on netty. Is the property really necessary?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services