Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Siddhi Parser to distribution #273

Merged
merged 16 commits into from
Aug 7, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@
<artifactId>io.siddhi.distribution.store.api.rest</artifactId>
<version>${io.siddhi.distribution.version}</version>
</dependency>
<dependency>
<groupId>io.siddhi.distribution</groupId>
<artifactId>io.siddhi.parser</artifactId>
<version>${io.siddhi.distribution.version}</version>
</dependency>
<dependency>
<groupId>io.siddhi.distribution</groupId>
<artifactId>io.siddhi.distribution.msf4j.interceptor.common.feature</artifactId>
Expand All @@ -317,6 +322,12 @@
<version>${io.siddhi.distribution.version}</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>io.siddhi.distribution</groupId>
<artifactId>io.siddhi.parser.service.feature</artifactId>
<version>${io.siddhi.distribution.version}</version>
<type>zip</type>
</dependency>
<dependency>
<groupId>io.siddhi.distribution</groupId>
<artifactId>io.siddhi.distribution.store.api.rest.feature</artifactId>
Expand Down Expand Up @@ -1103,8 +1114,8 @@

<properties>
<io.siddhi.distribution.version>5.1.0-SNAPSHOT</io.siddhi.distribution.version>
<siddhi.version>5.1.0</siddhi.version>
<siddhi.bundle.version>5.1.0</siddhi.bundle.version>
<siddhi.version>5.1.2</siddhi.version>
<siddhi.bundle.version>5.1.2</siddhi.bundle.version>
<siddhi.version.range>[5.0.0, 6.0.0)</siddhi.version.range>
<carbon.analytics-common.version>6.1.30</carbon.analytics-common.version>
<carbon.analytics-common.version.range>[6.1.0, 6.2.0)</carbon.analytics-common.version.range>
Expand All @@ -1123,8 +1134,8 @@

<!-- WSO2 Dependencies -->
<wso2.slf4j.version>1.5.10.wso2v1</wso2.slf4j.version>
<carbon.kernel.version>5.2.8</carbon.kernel.version>
<carbon.kernel.pax.version>5.2.8</carbon.kernel.pax.version>
<carbon.kernel.version>5.2.10</carbon.kernel.version>
<carbon.kernel.pax.version>5.2.10</carbon.kernel.pax.version>
<org.wso2.transport.http.netty.version>6.0.295</org.wso2.transport.http.netty.version>
<carbon.messaging.version>3.0.3</carbon.messaging.version>
<carbon.deployment.version>5.2.2</carbon.deployment.version>
Expand Down
3 changes: 3 additions & 0 deletions resources/carbon-home/bin/runner.bat
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ rem find CARBON_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome

REM Installing jars
java -cp ".\*;..\bin\tools\*" -Dwso2.carbon.tool="install-jars" org.wso2.carbon.tools.CarbonToolExecutor "%CURRENT_DIR%"

goto startServer

:noServerHome
Expand Down
3 changes: 3 additions & 0 deletions resources/carbon-home/bin/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ PRGDIR=`dirname "$PRG"`

[ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$PRGDIR/../wso2/runner" ; pwd`

# Installing jars
java -cp "../bin/tools/*" -Dwso2.carbon.tool="install-jars" org.wso2.carbon.tools.CarbonToolExecutor "$CARBON_HOME"

###########################################################################
NAME=start-runner
# Daemon name, where is the actual executable
Expand Down
3 changes: 3 additions & 0 deletions resources/carbon-home/bin/tooling.bat
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ rem find CARBON_HOME if it does not exist due to either an invalid value passed
rem by the user or the %0 problem on Windows 9x
if not exist "%CARBON_HOME%\bin\version.txt" goto noServerHome

REM Installing jars
java -cp ".\*;..\bin\tools\*" -Dwso2.carbon.tool="install-jars" org.wso2.carbon.tools.CarbonToolExecutor "%CURRENT_DIR%"

goto startServer

:noServerHome
Expand Down
3 changes: 3 additions & 0 deletions resources/carbon-home/bin/tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ PRGDIR=`dirname "$PRG"`

[ -z "$RUNTIME_HOME" ] && RUNTIME_HOME=`cd "$PRGDIR/../wso2/tooling" ; pwd`

# Installing jars
java -cp "../bin/tools/*" -Dwso2.carbon.tool="install-jars" org.wso2.carbon.tools.CarbonToolExecutor "$CARBON_HOME"

###########################################################################
NAME=start-tooling
# Daemon name, where is the actual executable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,22 @@ public class FileConfigManager implements ConfigManager {
private static final Logger LOGGER = LoggerFactory.getLogger(FileConfigManager.class);

private ConfigProvider configProvider;
private List<Extension> extensions;
private List<Reference> references;
private Map<String, String> properties;

public FileConfigManager(ConfigProvider configProvider) {
this.configProvider = configProvider;
}
private List<Extension> extensions = new ArrayList<>();
niveathika marked this conversation as resolved.
Show resolved Hide resolved
private List<Reference> references = new ArrayList<>();
private Map<String, String> properties = new HashMap<>();

public void init() {
if (configProvider != null) {
initialiseExtensions();
initialiseReferences();
initaliseProperties();
} else {
extensions = new ArrayList<>();
references = new ArrayList<>();
properties = new HashMap<>();
}
}

public FileConfigManager(ConfigProvider configProvider) {
this.configProvider = configProvider;
}

private void initaliseProperties() {
// load siddhi properties
try {
Expand Down Expand Up @@ -90,7 +86,6 @@ private void initaliseProperties() {
}
} catch (ConfigurationException e) {
LOGGER.error("Could not initiate the siddhi configuration object, " + e.getMessage(), e);
this.properties = new HashMap<>();
}
}

Expand All @@ -111,7 +106,6 @@ private void initialiseReferences() {
}
} catch (Exception e) {
LOGGER.error("Could not initiate the refs configuration object, " + e.getMessage(), e);
this.references = new ArrayList<>();
}
}

Expand All @@ -133,7 +127,6 @@ private void initialiseExtensions() {
}
} catch (Exception e) {
LOGGER.error("Could not initiate the extensions configuration object, " + e.getMessage(), e);
this.extensions = new ArrayList<>();
}
}

Expand Down
20 changes: 20 additions & 0 deletions runner/components/io.siddhi.parser/findbugs-exclude.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
# Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org)
#
# Licensed 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.
-->

<FindBugsFilter>

</FindBugsFilter>
203 changes: 203 additions & 0 deletions runner/components/io.siddhi.parser/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,203 @@
<!--
~ Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. 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">

<parent>
<groupId>io.siddhi.distribution</groupId>
<artifactId>io.siddhi.distribution.parent</artifactId>
<version>5.1.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>

<modelVersion>4.0.0</modelVersion>
<artifactId>io.siddhi.parser</artifactId>
<packaging>bundle</packaging>

<name>Siddhi Parser</name>
<url>http://wso2.org</url>
<dependencies>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-json-provider</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId>
</dependency>

<!--siddhi dependencies start-->
<dependency>
<groupId>io.siddhi</groupId>
<artifactId>siddhi-query-api</artifactId>
<version>${siddhi.version}</version>
</dependency>
<dependency>
<groupId>io.siddhi</groupId>
<artifactId>siddhi-core</artifactId>
<version>${siddhi.version}</version>
</dependency>
<dependency>
<groupId>io.siddhi</groupId>
<artifactId>siddhi-query-compiler</artifactId>
<version>${siddhi.version}</version>
</dependency>
<dependency>
<groupId>io.siddhi</groupId>
<artifactId>siddhi-annotations</artifactId>
<version>${siddhi.version}</version>
</dependency>

<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3.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>org.wso2.msf4j</groupId>
<artifactId>msf4j-core</artifactId>
</dependency>
<dependency>
<groupId>io.siddhi.distribution</groupId>
<artifactId>io.siddhi.distribution.common</artifactId>
</dependency>
<dependency>
<groupId>io.siddhi.distribution</groupId>
<artifactId>io.siddhi.distribution.msf4j.interceptor.common</artifactId>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>${org.testcontainers.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.nats</groupId>
<artifactId>java-nats-streaming</artifactId>
<version>${io.nats.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.siddhi.extension.io.http</groupId>
<artifactId>siddhi-io-http</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.siddhi.extension.io.nats</groupId>
<artifactId>siddhi-io-nats</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.siddhi.extension.map.json</groupId>
<artifactId>siddhi-map-json</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/gen/java</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<basedir>${project.build.outputDirectory}/io/siddhi/parser/core</basedir>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>default-instrument</id>
<goals>
<goal>instrument</goal>
</goals>
</execution>
<execution>
<id>default-restore-instrumented-classes</id>
<goals>
<goal>restore-instrumented-classes</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>*</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<maven.findbugsplugin.version.exclude>findbugs-exclude.xml</maven.findbugsplugin.version.exclude>
<export.package>
io.siddhi.parser.*
</export.package>
<import.package>
org.osgi.framework.*;version="${osgi.framework.import.version.range}",
org.wso2.msf4j.*;version="${msf4j.import.version.range}",
org.slf4j.*;version="${slf4j.logging.package.import.version.range}",
javax.ws.rs.*;version="${javax.ws.rs.version.range}",
*;resolution:=optional
</import.package>
</properties>
</project>
Loading