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 2022/10/28 11:32:37 UTC

[GitHub] [camel] oscerd commented on a diff in pull request #8617: add camel-casper component

oscerd commented on code in PR #8617:
URL: https://github.com/apache/camel/pull/8617#discussion_r1007960212


##########
components/camel-casper/pom.xml:
##########
@@ -0,0 +1,290 @@
+<?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/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.camel</groupId>
+		<artifactId>components</artifactId>
+		<version>3.20.0-SNAPSHOT</version>
+	</parent>
+
+
+	<artifactId>camel-casper</artifactId>
+	<packaging>jar</packaging>
+
+	<name>Camel :: Casper</name>
+	<description>Camel Casper blockchain component</description>
+	<url>https://casperlabs.io/</url>
+
+
+	<properties>
+		<compiler.source>1.8</compiler.source>
+		<compiler.target>1.8</compiler.target>
+		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+		<maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+		<log4j2.version>2.13.3</log4j2.version>
+		<camel.version>3.14.2</camel.version>
+		<casper-java-sdk.version>0.3.0</casper-java-sdk.version>
+		<junit.version>4.13.2</junit.version>
+		<launchdarkly.version>2.3.2</launchdarkly.version>
+		<commons-lang3.version>3.11</commons-lang3.version>
+		<casper-sdk.version>0.1.0</casper-sdk.version>
+		<commons-cli.version>1.4</commons-cli.version>
+		<commons-validator.version>1.7</commons-validator.version>
+		<junit-jupiter.version>5.8.0</junit-jupiter.version>
+		<mockito-core.version>3.12.2</mockito-core.version>
+		<mockito-junit-jupiter.version>3.12.2</mockito-junit-jupiter.version>
+		<springframework.version>2.1.2.RELEASE</springframework.version>
+		<fasterxml.jackson.version>2.14.0-rc1</fasterxml.jackson.version>
+		<byte-buddy.version>1.9.3</byte-buddy.version>
+		<objenesis.version>2.6</objenesis.version>
+		<tomcat.version>9.0.54</tomcat.version>
+	</properties>
+
+
+	<dependencies>
+
+
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<version>${commons-lang3.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-cli</groupId>
+			<artifactId>commons-cli</artifactId>
+			<version>${commons-cli.version}</version>
+		</dependency>
+
+	
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-jackson</artifactId>
+		
+
+		</dependency>
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-main</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-jsonpath</artifactId>
+		</dependency>
+
+
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20211205</version>

Review Comment:
   This kind of lib is using the json license, which is not compatible with Apache license. It should be removed and something else used.



##########
components/camel-casper/src/main/docs/doc.md:
##########
@@ -0,0 +1,259 @@
+# Camel casper producer component
+Camel Casper component for interacting with Casper network using RPC calls (Java SDK)
+

Review Comment:
   The documentation file needs to be named like the component and need to be an .adoc, take a look at other components to copy the base skeleton



##########
components/camel-casper/src/main/java/org/apache/camel/component/casper/CasperConfiguration.java:
##########
@@ -0,0 +1,171 @@
+package org.apache.camel.component.casper;

Review Comment:
   License missing.



##########
components/camel-casper/pom.xml:
##########
@@ -0,0 +1,395 @@
+<?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/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.camel</groupId>
+		<artifactId>components</artifactId>
+		<version>3.20.0-SNAPSHOT</version>
+	</parent>
+
+
+	<artifactId>camel-casper</artifactId>
+	<packaging>jar</packaging>
+
+	<name>Camel :: Casper</name>
+	<description>Camel Casper blockchaine component</description>
+	<url>https://casperlabs.io/</url>
+
+
+	<properties>
+		<compiler.source>1.8</compiler.source>
+		<compiler.target>1.8</compiler.target>
+		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+		<maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>

Review Comment:
   The properties needs to be taken from parent, all of this section should go away



##########
components/camel-casper/pom.xml:
##########
@@ -0,0 +1,395 @@
+<?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/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+
+	<parent>
+		<groupId>org.apache.camel</groupId>
+		<artifactId>components</artifactId>
+		<version>3.20.0-SNAPSHOT</version>
+	</parent>
+
+
+	<artifactId>camel-casper</artifactId>
+	<packaging>jar</packaging>
+
+	<name>Camel :: Casper</name>
+	<description>Camel Casper blockchaine component</description>
+	<url>https://casperlabs.io/</url>
+
+
+	<properties>
+		<compiler.source>1.8</compiler.source>
+		<compiler.target>1.8</compiler.target>
+		<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
+		<maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
+		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+		<log4j2.version>2.13.3</log4j2.version>
+		<camel.version>3.14.2</camel.version>
+		<casper-java-sdk.version>0.3.0</casper-java-sdk.version>
+		<junit.version>4.13.2</junit.version>
+		<launchdarkly.version>2.3.2</launchdarkly.version>
+		<commons-lang3.version>3.11</commons-lang3.version>
+		<casper-sdk.version>0.1.0</casper-sdk.version>
+		<commons-cli.version>1.4</commons-cli.version>
+		<commons-validator.version>1.7</commons-validator.version>
+		<junit-jupiter.version>5.8.0</junit-jupiter.version>
+		<mockito-core.version>3.12.2</mockito-core.version>
+		<mockito-junit-jupiter.version>3.12.2</mockito-junit-jupiter.version>
+		<springframework.version>2.1.2.RELEASE</springframework.version>
+		<fasterxml.jackson.version>2.13.0</fasterxml.jackson.version>
+		<byte-buddy.version>1.9.3</byte-buddy.version>
+		<objenesis.version>2.6</objenesis.version>
+
+		<tomcat.version>9.0.54</tomcat.version>
+	</properties>
+
+	<licenses>
+		<license>
+			<name>MIT License</name>
+			<url>http://www.opensource.org/licenses/mit-license.php</url>
+		</license>
+	</licenses>
+
+
+	<dependencyManagement>
+		<dependencies>
+			<dependency>
+				<groupId>org.apache.camel</groupId>
+				<artifactId>camel-bom</artifactId>
+				<version>${camel.version}</version>
+				<scope>import</scope>
+				<type>pom</type>
+			</dependency>
+		</dependencies>
+	</dependencyManagement>
+
+	<dependencies>
+
+
+		<dependency>
+			<groupId>org.apache.commons</groupId>
+			<artifactId>commons-lang3</artifactId>
+			<version>${commons-lang3.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>commons-cli</groupId>
+			<artifactId>commons-cli</artifactId>
+			<version>${commons-cli.version}</version>
+		</dependency>
+
+		<!--//////////////////////////////////// Camel dependencies //////////////////////////////////// -->
+
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-jackson</artifactId>
+		
+
+		</dependency>
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-core</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-main</artifactId>
+		</dependency>
+
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-jsonpath</artifactId>
+		</dependency>
+
+
+		<dependency>
+			<groupId>org.json</groupId>
+			<artifactId>json</artifactId>
+			<version>20211205</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-validator</groupId>
+			<artifactId>commons-validator</artifactId>
+			<version>${commons-validator.version}</version>
+		</dependency>
+
+
+		<dependency>
+			<groupId>com.launchdarkly</groupId>
+			<artifactId>okhttp-eventsource</artifactId>
+			<version>${launchdarkly.version}</version>
+		</dependency>
+
+		<!--//////////////////////////////////// Casper DSKs //////////////////////////////////// -->
+
+		<dependency>
+			<groupId>com.syntifi.casper</groupId>
+			<artifactId>casper-sdk</artifactId>
+			<version>${casper-sdk.version}</version>
+		</dependency>
+
+
+		<!--//////////////////////////////////// logging //////////////////////////////////// -->
+
+		<dependency>
+			<groupId>org.apache.logging.log4j</groupId>
+			<artifactId>log4j-slf4j-impl</artifactId>
+			<scope>runtime</scope>
+			<version>${log4j2.version}</version>
+		</dependency>
+
+		<!--//////////////////////////////////// testing //////////////////////////////////// -->
+
+
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-test</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>${junit.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.apache.camel</groupId>
+			<artifactId>camel-test-junit5</artifactId>
+			<version>${camel.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-core</artifactId>
+			<version>${mockito-core.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+
+		<dependency>
+			<groupId>org.mockito</groupId>
+			<artifactId>mockito-junit-jupiter</artifactId>
+			<version>${mockito-junit-jupiter.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+
+		<dependency>
+			<groupId>org.junit.jupiter</groupId>
+			<artifactId>junit-jupiter</artifactId>
+			<version>${junit-jupiter.version}</version>
+			<scope>test</scope>
+		</dependency>
+
+		<!--//////////////////////////////////// SSE tests  //////////////////////////////////// -->
+
+
+		<dependency>
+			<groupId>org.springframework.boot</groupId>
+			<artifactId>spring-boot-starter-web</artifactId>
+			<exclusions>
+				<exclusion>
+					<groupId>org.springframework.boot</groupId>
+					<artifactId>spring-boot-starter-logging</artifactId>
+				</exclusion>
+			</exclusions>
+			<version>${springframework.version}</version>
+		</dependency>

Review Comment:
   Spring-boot dependency should not appear here. Eventually there will a Spring Boot starter for this component in camel-spring-boot project



##########
components/camel-casper/src/main/java/org/apache/camel/component/casper/CasperComponent.java:
##########
@@ -0,0 +1,44 @@
+package org.apache.camel.component.casper;

Review Comment:
   It doesn't seem to be fixed.



##########
components/camel-casper/src/main/java/org/apache/camel/component/casper/CasperConstants.java:
##########
@@ -0,0 +1,72 @@
+package org.apache.camel.component.casper;
+
+/**
+ * Constants
+ * @author mabahma

Review Comment:
   Remove author



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org