如何将对 Siddhi CEP 的依赖项添加到我的 pom.xml 文件中?
How can I add a dependency on Siddhi CEP to my pom.xml file?
有谁知道如何添加对最新版本 Siddhi CEP 的依赖(最好不要克隆源代码)?我试过了(来自Github repo):
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
但是我得到一个缺少依赖项的错误。很确定这是因为我对 Maven 了解不够,但到目前为止我还没有弄清楚。
更新 - 根据要求。所有 pom.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>examples</artifactId>
<groupId>eu.ferari</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>examples.distributedcount</artifactId>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>eu.ferari.examples.distributedcount.misc.Coordinator</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.version}</version>
</dependency>
<dependency>
<groupId>com.espertech</groupId>
<artifactId>esper</artifactId>
<version>${esper.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>eu.ferari</groupId>
<artifactId>ferari-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>${storm.version}</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>log4j-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.siddhi</groupId>
<artifactId>siddhi-core</artifactId>
<version>0.4.0</version>
</dependency>
</dependencies>
</project>
我不确定你已经做了什么,但是。
(假设您已经安装了 Git)
打开命令
git clone https://github.com/wso2/siddhi.git
打开Eclipse(假设更多)
还有 m2e(Maven 2 Eclipse 作为插件)
然后导入Maven工程,指向主目录。这也将导入所有子包...
您所指的依赖项是该项目的主要 pom op...
我希望我是清楚的...很难猜出你拥有什么并使用什么
(顺便说一句,我知道开始使用 GIT 和 Maven 可能会很痛苦,但后来......:-))
请包含以下 3 个依赖项并尝试
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-core</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-api</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-compiler</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
终于找到答案了。首先你需要给你添加pom.xml文件:
<repositories>
<repository>
<id>WSO2</id>
<url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
</repository>
</repositories>
然后添加如下依赖:
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-core</artifactId>
<version>3.0.0-M1</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-api</artifactId>
<version>3.0.0-M1</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-compiler</artifactId>
<version>3.0.0-M1</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.5</version>
</dependency>
有谁知道如何添加对最新版本 Siddhi CEP 的依赖(最好不要克隆源代码)?我试过了(来自Github repo):
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
但是我得到一个缺少依赖项的错误。很确定这是因为我对 Maven 了解不够,但到目前为止我还没有弄清楚。
更新 - 根据要求。所有 pom.xml 文件:
<?xml version="1.0" encoding="UTF-8"?>
<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>
<artifactId>examples</artifactId>
<groupId>eu.ferari</groupId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>examples.distributedcount</artifactId>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>eu.ferari.examples.distributedcount.misc.Coordinator</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>${commons.version}</version>
</dependency>
<dependency>
<groupId>com.espertech</groupId>
<artifactId>esper</artifactId>
<version>${esper.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>${gson.version}</version>
</dependency>
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>${jedis.version}</version>
<type>jar</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>eu.ferari</groupId>
<artifactId>ferari-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>${storm.version}</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>log4j-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.siddhi</groupId>
<artifactId>siddhi-core</artifactId>
<version>0.4.0</version>
</dependency>
</dependencies>
</project>
我不确定你已经做了什么,但是。 (假设您已经安装了 Git) 打开命令
git clone https://github.com/wso2/siddhi.git
打开Eclipse(假设更多)
还有 m2e(Maven 2 Eclipse 作为插件)
然后导入Maven工程,指向主目录。这也将导入所有子包...
您所指的依赖项是该项目的主要 pom op...
我希望我是清楚的...很难猜出你拥有什么并使用什么
(顺便说一句,我知道开始使用 GIT 和 Maven 可能会很痛苦,但后来......:-))
请包含以下 3 个依赖项并尝试
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-core</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-api</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-compiler</artifactId>
<version>3.0.0-SNAPSHOT</version>
</dependency>
终于找到答案了。首先你需要给你添加pom.xml文件:
<repositories>
<repository>
<id>WSO2</id>
<url>http://maven.wso2.org/nexus/content/repositories/releases/</url>
</repository>
</repositories>
然后添加如下依赖:
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-core</artifactId>
<version>3.0.0-M1</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-api</artifactId>
<version>3.0.0-M1</version>
</dependency>
<dependency>
<groupId>org.wso2.siddhi</groupId>
<artifactId>siddhi-query-compiler</artifactId>
<version>3.0.0-M1</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.5</version>
</dependency>