You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2019/02/27 04:57:41 UTC
[incubator-iotdb] branch add_examples updated: add examples as a
module
This is an automated email from the ASF dual-hosted git repository.
hxd pushed a commit to branch add_examples
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/add_examples by this push:
new e75f1b0 add examples as a module
e75f1b0 is described below
commit e75f1b0a2250c0e8da55b1e74ef47c2a0a332e33
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Wed Feb 27 12:57:29 2019 +0800
add examples as a module
---
example/kafka/.gitignore | 73 ------------------------------------
example/kafka/pom.xml | 84 +++++++++++++++++++++++-------------------
example/pom.xml | 59 +++++++++++++++++++++++++++++
example/rocketmq/.gitignore | 73 ------------------------------------
example/rocketmq/pom.xml | 90 ++++++++++++++++++++++++---------------------
pom.xml | 1 +
6 files changed, 154 insertions(+), 226 deletions(-)
diff --git a/example/kafka/.gitignore b/example/kafka/.gitignore
deleted file mode 100644
index 0704784..0000000
--- a/example/kafka/.gitignore
+++ /dev/null
@@ -1,73 +0,0 @@
-# Eclipse IDE files
-**/.classpath
-**/.project
-**/.settings/
-# src/main/resources/
-# intellij IDE files
-**/*.iml
-**/.idea/
-**/*.log
-**/*.ipr
-**/*.iws
-# Apple OS X related
-**/.DS_Store
-derby-tsfile-db
-# intellj IDE files
-**/*.iml
-**/.idea/
-
-# Apple OS X related
-**/.DS_Store
-
-# build generated
-**/target/
-**/build/
-
-# intermediately generated locally
-**/logs/
-
-*.jar
-*.gz
-*.tar.gz
-*.tar
-/data/
-#src/test/resources/logback.xml
-
-
-### Maven ###
-grafana/target/
-!grafana/.mvn/wrapper/maven-wrapper.jar
-grafana/.mvn/
-
-grafana/logs/
-*.log
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-
-
-### NetBeans ###
-**/nbproject/private/
-**/build/
-**/nbbuild/
-**/dist/
-**/nbdist/
-**/.nb-gradle/
-grafana/data/
-
-
-**/.DS_Store
-
-**/lib/
-*.jar
-/target/
-*.tsfile
-tsfile/src/test/resources/*.ts
-
-### Apache release ###
-local-snapshots-dir/
diff --git a/example/kafka/pom.xml b/example/kafka/pom.xml
index 9501487..f503c6a 100644
--- a/example/kafka/pom.xml
+++ b/example/kafka/pom.xml
@@ -19,48 +19,56 @@
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>
-
+<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>
+ <!-- you need to add the following content if you remove the parent pom.
<groupId>org.apache.iotdb.example</groupId>
- <artifactId>kafka</artifactId>
+ <artifactId>kafka-example</artifactId>
<version>0.8.0-SNAPSHOT</version>
-
- <dependencies>
+ -->
+ <parent>
+ <groupId>org.apache.iotdb</groupId>
+ <artifactId>iotdb-examples</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>kafka-example</artifactId>
+ <name>IoTDB-Kafka Examples</name>
+ <packaging>jar</packaging>
+ <dependencies>
+ <!-- you need to add the following dependency if you remove the parent pom.
<dependency>
<groupId>org.apache.iotdb</groupId>
<artifactId>iotdb-jdbc</artifactId>
<version>0.8.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.apache.kafka</groupId>
- <artifactId>kafka_2.10</artifactId>
- <version>0.8.2.0</version>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>8</source>
- <target>8</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
+ -->
+ <dependency>
+ <groupId>org.apache.kafka</groupId>
+ <artifactId>kafka_2.10</artifactId>
+ <version>0.8.2.0</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>8</source>
+ <target>8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/example/pom.xml b/example/pom.xml
new file mode 100644
index 0000000..bcb094b
--- /dev/null
+++ b/example/pom.xml
@@ -0,0 +1,59 @@
+<?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.iotdb</groupId>
+ <artifactId>root</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <packaging>pom</packaging>
+ <artifactId>iotdb-examples</artifactId>
+ <name>IoTDB Examples</name>
+ <!-- Properties Management -->
+ <!--
+ if we claim dependencies in dependencyManagement, then we do not claim
+ their version in sub-project's pom, but we have to claim themselves again
+ in sub-projects
+ -->
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.iotdb</groupId>
+ <artifactId>iotdb-jdbc</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.iotdb</groupId>
+ <artifactId>iotdb-jdbc</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ <modules>
+ <module>kafka</module>
+ <module>rocketmq</module>
+ </modules>
+</project>
diff --git a/example/rocketmq/.gitignore b/example/rocketmq/.gitignore
deleted file mode 100644
index 0704784..0000000
--- a/example/rocketmq/.gitignore
+++ /dev/null
@@ -1,73 +0,0 @@
-# Eclipse IDE files
-**/.classpath
-**/.project
-**/.settings/
-# src/main/resources/
-# intellij IDE files
-**/*.iml
-**/.idea/
-**/*.log
-**/*.ipr
-**/*.iws
-# Apple OS X related
-**/.DS_Store
-derby-tsfile-db
-# intellj IDE files
-**/*.iml
-**/.idea/
-
-# Apple OS X related
-**/.DS_Store
-
-# build generated
-**/target/
-**/build/
-
-# intermediately generated locally
-**/logs/
-
-*.jar
-*.gz
-*.tar.gz
-*.tar
-/data/
-#src/test/resources/logback.xml
-
-
-### Maven ###
-grafana/target/
-!grafana/.mvn/wrapper/maven-wrapper.jar
-grafana/.mvn/
-
-grafana/logs/
-*.log
-
-### STS ###
-.apt_generated
-.classpath
-.factorypath
-.project
-.settings
-.springBeans
-
-
-### NetBeans ###
-**/nbproject/private/
-**/build/
-**/nbbuild/
-**/dist/
-**/nbdist/
-**/.nb-gradle/
-grafana/data/
-
-
-**/.DS_Store
-
-**/lib/
-*.jar
-/target/
-*.tsfile
-tsfile/src/test/resources/*.ts
-
-### Apache release ###
-local-snapshots-dir/
diff --git a/example/rocketmq/pom.xml b/example/rocketmq/pom.xml
index f700ce4..75f4dc2 100644
--- a/example/rocketmq/pom.xml
+++ b/example/rocketmq/pom.xml
@@ -19,48 +19,54 @@
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>
-
+<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>
+ <!-- you need to add the following content if you remove the parent pom.
<groupId>org.apache.iotdb</groupId>
<artifactId>rocketmq</artifactId>
<version>0.8.0-SNAPSHOT</version>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.iotdb</groupId>
- <artifactId>iotdb-jdbc</artifactId>
- <version>0.8.0-SNAPSHOT</version>
- <exclusions>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>netty-common</artifactId>
- </exclusion>
- <exclusion>
- <groupId>io.netty</groupId>
- <artifactId>netty-buffer</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.apache.rocketmq</groupId>
- <artifactId>rocketmq-client</artifactId>
- <version>4.4.0</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>8</source>
- <target>8</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-</project>
\ No newline at end of file
+ -->
+ <parent>
+ <groupId>org.apache.iotdb</groupId>
+ <artifactId>iotdb-examples</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <artifactId>rocketmq-example</artifactId>
+ <name>IoTDB-RocketMQ Examples</name>
+ <packaging>jar</packaging>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.iotdb</groupId>
+ <artifactId>iotdb-jdbc</artifactId>
+ <version>0.8.0-SNAPSHOT</version>
+ <exclusions>
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-common</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>io.netty</groupId>
+ <artifactId>netty-buffer</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.rocketmq</groupId>
+ <artifactId>rocketmq-client</artifactId>
+ <version>4.4.0</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>8</source>
+ <target>8</target>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/pom.xml b/pom.xml
index 5aa9503..2a2e9ab 100644
--- a/pom.xml
+++ b/pom.xml
@@ -134,6 +134,7 @@
<module>grafana</module>
<module>service-rpc</module>
<module>iotdb-cli</module>
+ <module>example</module>
<!-- <module>hadoop</module> -->
<!-- <module>spark</module> -->
</modules>