-->

WSO2 BAM 2.0 libraries in Maven

2019-08-22 05:25发布

问题:

I'm trying to replicate the KPIAgent example in the WSO2 BAM ALPHA2 release but using maven to get the libraries required for the project to run.

So I've defined the following dependencies:

<dependency>
    <groupId>org.wso2.carbon</groupId>
    <artifactId>org.wso2.carbon.bam.agent</artifactId>
    <version>3.2.4</version>
</dependency>
<dependency>
    <groupId>org.wso2.carbon</groupId>
    <artifactId>org.wso2.carbon.bam.data.publisher.util</artifactId>
    <version>3.2.0-SNAPSHOT</version>
</dependency>
<dependency>
    <groupId>org.wso2.carbon</groupId>
    <artifactId>org.wso2.carbon.bam.service</artifactId>
    <version>3.2.1</version>
</dependency>
<dependency>
    <groupId>com.google.common.wso2</groupId>
    <artifactId>google-collect</artifactId>
    <version>1.0.0.wso2v2</version>
</dependency>
<dependency>
    <groupId>libthrift.wso2</groupId>
    <artifactId>libthrift</artifactId>
    <version>0.5.wso2v1</version>
</dependency>
<dependency>
    <groupId>commons-pool.wso2</groupId>
    <artifactId>commons-pool</artifactId>
    <version>1.5.0.wso2v1</version>
</dependency>

Along with them I've defined the WSO2 repository this way:

<repository>
    <id>wso2-maven2-repository</id>
    <name>WSO2 Maven2 Repository</name>
    <url>http://dist.wso2.org/maven2</url>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
    <releases>
    <enabled>true</enabled>
    <updatePolicy>never</updatePolicy>
    <checksumPolicy>fail</checksumPolicy>
    </releases>
</repository>

The problem I have is that the remote pom file for http://dist.wso2.org/maven2/org/wso2/carbon/org.wso2.carbon.bam.agent/3.2.4/org.wso2.carbon.bam.agent-3.2.4.pom refers to

<parent>
    <groupId>org.wso2.carbon</groupId>
    <artifactId>data-agents</artifactId>
    <version>3.2.4</version>
</parent>

Which doesn't exist.

I assume this happens due to a rearrangement of the component's sources which is not fully reflected in the repository just yet; thus causing this inconsistency.

Question is then, which set of dependencies should I use to use EventReceiver in order to publish my own Events?

Thanks in advance for your support.

回答1:

Seems it is not in the repo as you have mentioned for some reason. Can you try installing the pom given below to your local repository and see whether it works.

http://pastebin.com/AcmR1xmW