diff --git a/checkstyle-suppressions.xml b/checkstyle-suppressions.xml
deleted file mode 100644
index 151c4837c5..0000000000
--- a/checkstyle-suppressions.xml
+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/coverage-reports/pom.xml b/coverage-reports/pom.xml
deleted file mode 100644
index 762d74e960..0000000000
--- a/coverage-reports/pom.xml
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
- org.graylog.repackaged.siddhi
- siddhi
- 4.5.11
- ../pom.xml
-
-
- 4.0.0
- coverage-reports
- Siddhi Tests Coverage Report Aggregation
- pom
-
-
-
- org.graylog.repackaged.siddhi
- siddhi-core
-
-
- org.graylog.repackaged.siddhi
- siddhi-query-api
-
-
- org.graylog.repackaged.siddhi
- siddhi-query-compiler
-
-
-
-
- src
-
-
- org.jacoco
- jacoco-maven-plugin
- ${org.jacoco.version}
-
-
- report-aggregate
- prepare-package
-
- report-aggregate
-
-
- Siddhi Test Coverage
-
-
- **/*.class
-
-
- **/*Constants.class
- **/*Exception.class
- **/SiddhiQLBaseVisitor.class
- **/SiddhiQLParser*
- **/SiddhiQLLexer*
-
-
-
-
-
-
-
-
-
diff --git a/findbugs-exclude.xml b/findbugs-exclude.xml
deleted file mode 100644
index a234ff78eb..0000000000
--- a/findbugs-exclude.xml
+++ /dev/null
@@ -1,211 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/issue_template.md b/issue_template.md
deleted file mode 100644
index 757e13efe6..0000000000
--- a/issue_template.md
+++ /dev/null
@@ -1,18 +0,0 @@
-**Description:**
-
-
-**Suggested Labels:**
-
-
-**Suggested Assignees:**
-
-
-**Affected Product Version:**
-
-**OS, DB, other environment details and versions:**
-
-**Steps to reproduce:**
-
-
-**Related Issues:**
-
\ No newline at end of file
diff --git a/modules/siddhi-annotations/pom.xml b/modules/siddhi-annotations/pom.xml
index d266f438bf..130851c8a7 100644
--- a/modules/siddhi-annotations/pom.xml
+++ b/modules/siddhi-annotations/pom.xml
@@ -69,9 +69,4 @@
-
-
- ../../findbugs-exclude.xml
-
-
\ No newline at end of file
diff --git a/modules/siddhi-core/pom.xml b/modules/siddhi-core/pom.xml
index fc75070b24..b467fdf915 100644
--- a/modules/siddhi-core/pom.xml
+++ b/modules/siddhi-core/pom.xml
@@ -126,15 +126,6 @@
-
- org.jacoco
- jacoco-maven-plugin
-
-
-
- ../../findbugs-exclude.xml
-
-
diff --git a/modules/siddhi-core/siddhi-core-doc-gen/pom.xml b/modules/siddhi-core/siddhi-core-doc-gen/pom.xml
deleted file mode 100644
index f1f7a907c0..0000000000
--- a/modules/siddhi-core/siddhi-core-doc-gen/pom.xml
+++ /dev/null
@@ -1,134 +0,0 @@
-
-
-
-
- siddhi
- org.graylog.repackaged.siddhi
- 4.5.11
- ../../../pom.xml
-
- 4.0.0
- siddhi-core-doc-gen
- Siddhi Core Documentation Generation
-
-
-
-
- org.graylog.repackaged.siddhi
- siddhi-doc-gen
-
-
- compile
-
- generate-md-docs
- generate-extensions-index
-
-
-
-
- ../target/
-
-
- siddhi-execution-string
- siddhi-execution-math
- siddhi-execution-time
- siddhi-execution-streamingml
- siddhi-execution-regex
- siddhi-execution-markov
- siddhi-execution-unique
- siddhi-execution-map
- siddhi-execution-unitconversion
- siddhi-execution-extrema
- siddhi-execution-timeseries
- siddhi-execution-var
- siddhi-execution-priority
- siddhi-execution-reorder
- siddhi-execution-sentiment
- siddhi-execution-stats
- siddhi-execution-geo
- siddhi-execution-kalmanfilter
- siddhi-execution-approximate
- siddhi-execution-graph
- siddhi-execution-tensorflow
- siddhi-execution-env
- siddhi-io-http
- siddhi-io-kafka
- siddhi-io-tcp
- siddhi-io-wso2event
- siddhi-io-email
- siddhi-io-jms
- siddhi-io-file
- siddhi-io-rabbitmq
- siddhi-io-mqtt
- siddhi-io-websocket
- siddhi-io-sqs
- siddhi-io-twitter
- siddhi-io-cdc
- siddhi-io-prometheus
- siddhi-map-json
- siddhi-map-xml
- siddhi-map-binary
- siddhi-map-text
- siddhi-map-wso2event
- siddhi-map-keyvalue
- siddhi-map-csv
- siddhi-store-rdbms
- siddhi-store-solr
- siddhi-store-mongodb
- siddhi-store-hbase
- siddhi-store-redis
- siddhi-store-cassandra
- siddhi-script-js
- siddhi-script-scala
-
-
- siddhi-gpl-execution-pmml
- siddhi-gpl-execution-geo
- siddhi-gpl-execution-nlp
- siddhi-gpl-execution-r
- siddhi-gpl-execution-streamingml
- siddhi-gpl-script-r
-
-
-
-
-
-
-
-
- documentation-deploy
-
-
-
- org.graylog.repackaged.siddhi
- siddhi-doc-gen
-
-
- compile
-
- deploy-mkdocs-github-pages
-
-
-
-
-
-
-
-
-
diff --git a/modules/siddhi-doc-gen/pom.xml b/modules/siddhi-doc-gen/pom.xml
deleted file mode 100644
index a09dcf5b47..0000000000
--- a/modules/siddhi-doc-gen/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
- siddhi
- org.graylog.repackaged.siddhi
- 4.5.11
- ../../pom.xml
-
- 4.0.0
- siddhi-doc-gen
- Siddhi Documentation Generator
- maven-plugin
-
-
-
- org.graylog.repackaged.siddhi
- siddhi-core
-
-
- org.graylog.repackaged.siddhi
- siddhi-annotations
-
-
- org.apache.maven
- maven-plugin-api
-
-
- org.apache.maven.plugin-tools
- maven-plugin-annotations
-
-
- org.freemarker
- freemarker-gae
-
-
- org.yaml
- snakeyaml
-
-
- org.apache.maven
- maven-core
-
-
- org.apache.commons
- commons-io
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-plugin-plugin
- 3.6.0
-
-
- true
-
-
-
-
- mojo-descriptor
-
- descriptor
-
-
-
-
-
-
-
- ../../findbugs-exclude.xml
-
-
-
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExampleMetaData.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExampleMetaData.java
deleted file mode 100644
index effe249be5..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExampleMetaData.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.commons.metadata;
-
-/**
- * POJO for holding example meta data
- */
-public class ExampleMetaData {
- private String syntax;
- private String description;
-
- public String getSyntax() {
- return syntax;
- }
-
- public void setSyntax(String syntax) {
- this.syntax = syntax;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExtensionMetaData.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExtensionMetaData.java
deleted file mode 100644
index 206d4a1fae..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExtensionMetaData.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.commons.metadata;
-
-import java.util.List;
-
-/**
- * POJO for holding extension meta data
- */
-public class ExtensionMetaData implements Comparable {
- private String name;
- private String namespace;
- private String description;
- private List parameters;
- private List systemParameters;
- private List returnAttributes;
- private List examples;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getNamespace() {
- return namespace;
- }
-
- public void setNamespace(String namespace) {
- this.namespace = namespace;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public List getParameters() {
- return parameters;
- }
-
- public void setParameters(List parameters) {
- this.parameters = parameters;
- }
-
- public List getSystemParameters() {
- return systemParameters;
- }
-
- public void setSystemParameters(List systemParameters) {
- this.systemParameters = systemParameters;
- }
-
- public List getReturnAttributes() {
- return returnAttributes;
- }
-
- public void setReturnAttributes(List returnAttributes) {
- this.returnAttributes = returnAttributes;
- }
-
- public List getExamples() {
- return examples;
- }
-
- public void setExamples(List examples) {
- this.examples = examples;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- ExtensionMetaData that = (ExtensionMetaData) o;
-
- if (name != null ? !name.equals(that.name) : that.name != null) {
- return false;
- }
- if (namespace != null ? !namespace.equals(that.namespace) : that.namespace != null) {
- return false;
- }
- if (description != null ? !description.equals(that.description) : that.description != null) {
- return false;
- }
- if (parameters != null ? !parameters.equals(that.parameters) : that.parameters != null) {
- return false;
- }
- if (systemParameters != null ? !systemParameters.equals(that.systemParameters) :
- that.systemParameters != null) {
- return false;
- }
- if (returnAttributes != null ? !returnAttributes.equals(that.returnAttributes) :
- that.returnAttributes != null) {
- return false;
- }
- return examples != null ? examples.equals(that.examples) : that.examples == null;
- }
-
- @Override
- public int hashCode() {
- int result = name != null ? name.hashCode() : 0;
- result = 31 * result + (namespace != null ? namespace.hashCode() : 0);
- result = 31 * result + (description != null ? description.hashCode() : 0);
- result = 31 * result + (parameters != null ? parameters.hashCode() : 0);
- result = 31 * result + (systemParameters != null ? systemParameters.hashCode() : 0);
- result = 31 * result + (returnAttributes != null ? returnAttributes.hashCode() : 0);
- result = 31 * result + (examples != null ? examples.hashCode() : 0);
- return result;
- }
-
- @Override
- public int compareTo(ExtensionMetaData o) {
- if (o == null) {
- return -1;
- }
- if (this.equals(o)) {
- return 0;
- }
- int result;
- if (namespace != null && o.namespace != null) {
- result = namespace.compareTo(o.namespace);
- } else if (namespace == null && o.namespace == null) {
- result = 0;
- } else if (namespace == null) {
- return -1;
- } else {
- return 1;
- }
- if (result == 0) {
- if (name != null && o.name != null) {
- result = name.compareTo(o.name);
- } else if (name == null && o.name == null) {
- result = 0;
- } else if (name == null) {
- return -1;
- } else {
- return 1;
- }
- if (result == 0) {
- result = description.compareTo(o.description);
- }
- }
- return result;
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExtensionType.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExtensionType.java
deleted file mode 100644
index 397dd8e85e..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ExtensionType.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.commons.metadata;
-
-import org.wso2.siddhi.core.executor.function.FunctionExecutor;
-import org.wso2.siddhi.core.function.Script;
-import org.wso2.siddhi.core.query.processor.stream.StreamProcessor;
-import org.wso2.siddhi.core.query.processor.stream.function.StreamFunctionProcessor;
-import org.wso2.siddhi.core.query.processor.stream.window.WindowProcessor;
-import org.wso2.siddhi.core.query.selector.attribute.aggregator.AttributeAggregator;
-import org.wso2.siddhi.core.stream.input.source.Source;
-import org.wso2.siddhi.core.stream.input.source.SourceMapper;
-import org.wso2.siddhi.core.stream.output.sink.Sink;
-import org.wso2.siddhi.core.stream.output.sink.SinkMapper;
-import org.wso2.siddhi.core.table.Table;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Enum for holding extension types supported by the doc generator and the free marker templates
- *
- * The enum values should be changed to match the names used in the documentation
- * The enum values will affect the names used in the documentation as well as the hyperlinks
- *
- * These enum values will be passed onto the freemarker templates as a map
- * The other members of the enum class will not be accessible from the freemarker templates
- * These can be accesses using the EXTENSION_TYPE variable
- * eg:- EXTENSION_TYPE.FUNCTION
- */
-public enum ExtensionType {
- FUNCTION("Function"),
- ATTRIBUTE_AGGREGATOR("Aggregate Function"),
- WINDOW("Window"),
- STREAM_FUNCTION("Stream Function"),
- STREAM_PROCESSOR("Stream Processor"),
- SOURCE("Source"),
- SINK("Sink"),
- SOURCE_MAPPER("Source Mapper"),
- SINK_MAPPER("Sink Mapper"),
- STORE("Store"),
- SCRIPT("Script");
-
- /**
- * Contains the name to be displayed as the extension type
- */
- private final String value;
-
- /**
- * The map from extension class type to super class
- */
- private static final Map> superClassMap;
-
- static {
- // Populating the processor super class map
- superClassMap = new HashMap<>();
- superClassMap.put(ExtensionType.FUNCTION, FunctionExecutor.class);
- superClassMap.put(ExtensionType.ATTRIBUTE_AGGREGATOR, AttributeAggregator.class);
- superClassMap.put(ExtensionType.WINDOW, WindowProcessor.class);
- superClassMap.put(ExtensionType.STREAM_FUNCTION, StreamFunctionProcessor.class);
- superClassMap.put(ExtensionType.STREAM_PROCESSOR, StreamProcessor.class);
- superClassMap.put(ExtensionType.SOURCE, Source.class);
- superClassMap.put(ExtensionType.SINK, Sink.class);
- superClassMap.put(ExtensionType.SOURCE_MAPPER, SourceMapper.class);
- superClassMap.put(ExtensionType.SINK_MAPPER, SinkMapper.class);
- superClassMap.put(ExtensionType.STORE, Table.class);
- superClassMap.put(ExtensionType.SCRIPT, Script.class);
- }
-
- ExtensionType(String value) {
- this.value = value;
- }
-
- public String getValue() {
- return value;
- }
-
- public static Map> getSuperClassMap() {
- return superClassMap;
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/NamespaceMetaData.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/NamespaceMetaData.java
deleted file mode 100644
index 007b9ff006..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/NamespaceMetaData.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.commons.metadata;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.TreeMap;
-
-/**
- * POJO for holding extension meta data
- */
-public class NamespaceMetaData implements Comparable {
- private String name;
- private TreeMap> extensionMap;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public TreeMap> getExtensionMap() {
- return extensionMap;
- }
-
- public void setExtensionMap(TreeMap> extensionMap) {
- this.extensionMap = extensionMap;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) {
- return true;
- }
- if (o == null || getClass() != o.getClass()) {
- return false;
- }
-
- NamespaceMetaData that = (NamespaceMetaData) o;
-
- if (name != null ? !name.equals(that.name) : that.name != null) {
- return false;
- }
- return extensionMap != null ? extensionMap.equals(that.extensionMap) : that.extensionMap == null;
- }
-
- @Override
- public int hashCode() {
- int result = name != null ? name.hashCode() : 0;
- result = 31 * result + (extensionMap != null ? extensionMap.hashCode() : 0);
- return result;
- }
-
- @Override
- public int compareTo(NamespaceMetaData o) {
- if (o == null) {
- return -1;
- }
- if (this.equals(o)) {
- return 0;
- }
- int result = 0;
- if (name != null && o.name != null) {
- result = name.compareTo(o.name);
- } else if (name == null && o.name == null) {
- result = 0;
- } else if (name == null) {
- return -1;
- } else {
- return 1;
- }
- Iterator thisIterable = extensionMap.keySet().iterator();
- Iterator oIterable = o.extensionMap.keySet().iterator();
- while (result == 0) {
- if (thisIterable.hasNext() && oIterable.hasNext()) {
- result = thisIterable.next().compareTo(oIterable.next());
- } else if (!thisIterable.hasNext() && !oIterable.hasNext()) {
- result = 0;
- } else if (!thisIterable.hasNext()) {
- return -1;
- } else {
- return 1;
- }
- }
- return result;
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ParameterMetaData.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ParameterMetaData.java
deleted file mode 100644
index 10cd9f5945..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ParameterMetaData.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.commons.metadata;
-
-import org.wso2.siddhi.annotation.util.DataType;
-
-import java.util.List;
-
-/**
- * POJO for holding extension parameter meta data
- */
-public class ParameterMetaData {
- private String name;
- private List type;
- private String description;
- private boolean optional;
- private boolean dynamic;
- private String defaultValue;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public List getType() {
- return type;
- }
-
- public void setType(List type) {
- this.type = type;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public boolean isOptional() {
- return optional;
- }
-
- public void setOptional(boolean optional) {
- this.optional = optional;
- }
-
- public boolean isDynamic() {
- return dynamic;
- }
-
- public void setDynamic(boolean dynamic) {
- this.dynamic = dynamic;
- }
-
- public String getDefaultValue() {
- return defaultValue;
- }
-
- public void setDefaultValue(String defaultValue) {
- this.defaultValue = defaultValue;
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ReturnAttributeMetaData.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ReturnAttributeMetaData.java
deleted file mode 100644
index c3753601b2..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/ReturnAttributeMetaData.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.commons.metadata;
-
-import org.wso2.siddhi.annotation.util.DataType;
-
-import java.util.List;
-
-/**
- * POJO for holding extension return attribute meta data
- */
-public class ReturnAttributeMetaData {
- private String name;
- private List type;
- private String description;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public List getType() {
- return type;
- }
-
- public void setType(List type) {
- this.type = type;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/SystemParameterMetaData.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/SystemParameterMetaData.java
deleted file mode 100644
index 9875afd39e..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/commons/metadata/SystemParameterMetaData.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.commons.metadata;
-
-import java.util.List;
-
-/**
- * POJO for holding extension system parameters meta data
- */
-public class SystemParameterMetaData {
- private String name;
- private String description;
- private String defaultValue;
- private List possibleParameters;
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getDefaultValue() {
- return defaultValue;
- }
-
- public void setDefaultValue(String defaultValue) {
- this.defaultValue = defaultValue;
- }
-
- public List getPossibleParameters() {
- return possibleParameters;
- }
-
- public void setPossibleParameters(List possibleParameters) {
- this.possibleParameters = possibleParameters;
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/ExtensionsIndexGenerationMojo.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/ExtensionsIndexGenerationMojo.java
deleted file mode 100644
index 4d5f2f8aeb..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/ExtensionsIndexGenerationMojo.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.core;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
-import org.wso2.siddhi.doc.gen.core.utils.Constants;
-import org.wso2.siddhi.doc.gen.core.utils.DocumentationUtils;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * Mojo for creating an index Siddhi documentation
- */
-@Mojo(
- name = "generate-extensions-index",
- aggregator = true,
- defaultPhase = LifecyclePhase.INSTALL
-)
-public class ExtensionsIndexGenerationMojo extends AbstractMojo {
- /**
- * The maven project object
- */
- @Parameter(defaultValue = "${project}", readonly = true, required = true)
- private MavenProject mavenProject;
-
- /**
- * The extension repository owner
- */
- @Parameter(property = "extension.repository.owner")
- private String extensionRepositoryOwner;
-
- /**
- * The extension repository names
- */
- @Parameter(property = "extension.repositories", required = true)
- private List extensionRepositories;
-
- /**
- * The directory in which the index will be generated
- * Optional
- */
- @Parameter(property = "doc.gen.base.directory")
- private File docGenBaseDirectory;
-
- /**
- * The final output file name of the index
- */
- @Parameter(property = "index.gen.file.name")
- private String indexGenFileName;
-
- @Override
- public void execute() throws MojoExecutionException, MojoFailureException {
- // Finding the root maven project
- MavenProject rootMavenProject = mavenProject;
- while (rootMavenProject.getParent().getBasedir() != null) {
- rootMavenProject = rootMavenProject.getParent();
- }
-
- // Checking if extension repositories and repository owner had been added in the configuration
- if (extensionRepositories == null || extensionRepositories.size() == 0) {
- throw new MojoExecutionException("extensionRepositories configuration is required to use goal " +
- "generate-extensions-index");
- }
-
- // Setting the extension repository owner if not set by the user
- if (extensionRepositoryOwner == null) {
- extensionRepositoryOwner = Constants.GITHUB_OWNER_WSO2_EXTENSIONS;
- }
-
- // Setting the documentation output directory if not set by user
- String docGenBasePath;
- if (docGenBaseDirectory != null) {
- docGenBasePath = docGenBaseDirectory.getAbsolutePath();
- } else {
- docGenBasePath = rootMavenProject.getBasedir() + File.separator + Constants.DOCS_DIRECTORY;
- }
-
- // Setting the extension index output file name if not set by user
- if (indexGenFileName == null) {
- indexGenFileName = Constants.MARKDOWN_EXTENSIONS_INDEX_TEMPLATE;
- }
-
- // Creating a extensions index
- DocumentationUtils.createExtensionsIndex(
- extensionRepositories, extensionRepositoryOwner, docGenBasePath, indexGenFileName
- );
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/MarkdownDocumentationGenerationMojo.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/MarkdownDocumentationGenerationMojo.java
deleted file mode 100644
index 381bb3d946..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/MarkdownDocumentationGenerationMojo.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.core;
-
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.plugins.annotations.ResolutionScope;
-import org.apache.maven.project.MavenProject;
-import org.wso2.siddhi.doc.gen.commons.metadata.NamespaceMetaData;
-import org.wso2.siddhi.doc.gen.core.utils.Constants;
-import org.wso2.siddhi.doc.gen.core.utils.DocumentationUtils;
-
-import java.io.File;
-import java.util.List;
-
-/**
- * Mojo for generating Siddhi Documentation
- */
-@Mojo(
- name = "generate-md-docs",
- aggregator = true,
- defaultPhase = LifecyclePhase.INSTALL,
- requiresDependencyResolution = ResolutionScope.TEST
-)
-public class MarkdownDocumentationGenerationMojo extends AbstractMojo {
- /**
- * The maven project object
- */
- @Parameter(defaultValue = "${project}", readonly = true, required = true)
- private MavenProject mavenProject;
-
- /**
- * The target module for which the files will be generated
- * Optional
- */
- @Parameter(property = "module.target.directory")
- private File moduleTargetDirectory;
-
-// /**
-// * The path of the readme file in the base directory
-// * Optional
-// */
-// @Parameter(property = "home.page.template.file")
-// private File homePageTemplateFile;
-//
-// /**
-// * The name of the index file
-// * Optional
-// */
-// @Parameter(property = "home.page.file.name")
-// private String homePageFileName;
-
- /**
- * The path of the mkdocs.yml file in the base directory
- * Optional
- */
- @Parameter(property = "mkdocs.config.file")
- private File mkdocsConfigFile;
-
- /**
- * The directory in which the docs will be generated
- * Optional
- */
- @Parameter(property = "doc.gen.base.directory")
- private File docGenBaseDirectory;
-
- /**
- * The readme file
- * Optional
- */
- @Parameter(property = "readme.file")
- private File readmeFile;
-
- @Override
- public void execute() throws MojoExecutionException, MojoFailureException {
- // Finding the root maven project
- MavenProject rootMavenProject = mavenProject;
- while (rootMavenProject.getParent().getBasedir() != null) {
- rootMavenProject = rootMavenProject.getParent();
- }
-
- // Setting the relevant modules target directory if not set by user
- String moduleTargetPath;
- if (moduleTargetDirectory != null) {
- moduleTargetPath = moduleTargetDirectory.getAbsolutePath();
- } else {
- moduleTargetPath = mavenProject.getBuild().getDirectory();
- }
-
- // Setting the documentation output directory if not set by user
- String docGenBasePath;
- if (docGenBaseDirectory != null) {
- docGenBasePath = docGenBaseDirectory.getAbsolutePath();
- } else {
- docGenBasePath = rootMavenProject.getBasedir() + File.separator + Constants.DOCS_DIRECTORY;
- }
-
-// // Setting the home page template file path if not set by user
-// if (homePageTemplateFile == null) {
-// homePageTemplateFile = new File(rootMavenProject.getBasedir() + File.separator
-// + Constants.README_FILE_NAME + Constants.MARKDOWN_FILE_EXTENSION);
-// }
-
- // Setting the mkdocs config file path if not set by user
- if (mkdocsConfigFile == null) {
- mkdocsConfigFile = new File(rootMavenProject.getBasedir() + File.separator
- + Constants.MKDOCS_CONFIG_FILE_NAME + Constants.YAML_FILE_EXTENSION);
- }
-//
-// // Setting the home page file name if not set by user
-// File homePageFile;
-// if (homePageFileName == null) {
-// homePageFile = new File(docGenBasePath + File.separator
-// + Constants.HOMEPAGE_FILE_NAME + Constants.MARKDOWN_FILE_EXTENSION);
-// } else {
-// homePageFile = new File(docGenBasePath + File.separator + homePageFileName);
-// }
-
- // Setting the readme file name if not set by user
- if (readmeFile == null) {
- readmeFile = new File(rootMavenProject.getBasedir() + File.separator
- + Constants.README_FILE_NAME + Constants.MARKDOWN_FILE_EXTENSION);
- }
-
- // Retrieving metadata
- List namespaceMetaDataList;
- try {
- namespaceMetaDataList = DocumentationUtils.getExtensionMetaData(
- moduleTargetPath,
- mavenProject.getRuntimeClasspathElements(),
- getLog()
- );
- } catch (DependencyResolutionRequiredException e) {
- throw new MojoFailureException("Unable to resolve dependencies of the project", e);
- }
-
- // Generating the documentation
- if (namespaceMetaDataList.size() > 0) {
- DocumentationUtils.generateDocumentation(namespaceMetaDataList, docGenBasePath, mavenProject.getVersion(),
- getLog());
-// DocumentationUtils.updateHeadingsInMarkdownFile(homePageTemplateFile, homePageFile,
-// rootMavenProject.getArtifactId(), mavenProject.getVersion(), namespaceMetaDataList);
-// DocumentationUtils.updateHeadingsInMarkdownFile(readmeFile, readmeFile, rootMavenProject.getArtifactId(),
-// mavenProject.getVersion(), namespaceMetaDataList);
- }
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/MkdocsGitHubPagesDeployMojo.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/MkdocsGitHubPagesDeployMojo.java
deleted file mode 100644
index b6cd157d68..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/MkdocsGitHubPagesDeployMojo.java
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.core;
-
-import org.apache.maven.artifact.DependencyResolutionRequiredException;
-import org.apache.maven.model.Scm;
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugins.annotations.LifecyclePhase;
-import org.apache.maven.plugins.annotations.Mojo;
-import org.apache.maven.plugins.annotations.Parameter;
-import org.apache.maven.project.MavenProject;
-import org.wso2.siddhi.doc.gen.commons.metadata.NamespaceMetaData;
-import org.wso2.siddhi.doc.gen.core.utils.Constants;
-import org.wso2.siddhi.doc.gen.core.utils.DocumentationUtils;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.util.List;
-
-import static org.wso2.siddhi.doc.gen.core.utils.DocumentationUtils.updateAPIPagesInMkdocsConfig;
-
-/**
- * Mojo for deploying mkdocs website on GitHub pages
- */
-@Mojo(
- name = "deploy-mkdocs-github-pages",
- aggregator = true,
- defaultPhase = LifecyclePhase.INSTALL
-)
-public class MkdocsGitHubPagesDeployMojo extends AbstractMojo {
- /**
- * The maven project object
- */
- @Parameter(defaultValue = "${project}", readonly = true, required = true)
- private MavenProject mavenProject;
-
- /**
- * The target module for which the files will be generated
- * Optional
- */
- @Parameter(property = "module.target.directory")
- private File moduleTargetDirectory;
-
- /**
- * The path of the mkdocs.yml file in the base directory
- * Optional
- */
- @Parameter(property = "mkdocs.config.file")
- private File mkdocsConfigFile;
-
- /**
- * The directory in which the index will be generated
- * Optional
- */
- @Parameter(property = "doc.gen.base.directory")
- private File docGenBaseDirectory;
-
- /**
- * The name of the index file
- * Optional
- */
- @Parameter(property = "home.page.file.name")
- private String homePageFileName;
-
- /**
- * The path of the readme file in the base directory
- * Optional
- */
- @Parameter(property = "home.page.template.file")
- private File homePageTemplateFile;
-
- /**
- * The readme file
- * Optional
- */
- @Parameter(property = "readme.file")
- private File readmeFile;
-
- @Override
- public void execute() throws MojoExecutionException, MojoFailureException {
- // Finding the root maven project
- MavenProject rootMavenProject = mavenProject;
- while (rootMavenProject.getParent().getBasedir() != null) {
- rootMavenProject = rootMavenProject.getParent();
- }
-
- // Setting the relevant modules target directory if not set by user
- String moduleTargetPath;
- if (moduleTargetDirectory != null) {
- moduleTargetPath = moduleTargetDirectory.getAbsolutePath();
- } else {
- moduleTargetPath = mavenProject.getBuild().getDirectory();
- }
-
- // Setting the mkdocs config file path if not set by user
- if (mkdocsConfigFile == null) {
- mkdocsConfigFile = new File(rootMavenProject.getBasedir() + File.separator
- + Constants.MKDOCS_CONFIG_FILE_NAME + Constants.YAML_FILE_EXTENSION);
- }
-
- // Setting the documentation output directory if not set by user
- String docGenBasePath;
- if (docGenBaseDirectory != null) {
- docGenBasePath = docGenBaseDirectory.getAbsolutePath();
- } else {
- docGenBasePath = rootMavenProject.getBasedir() + File.separator + Constants.DOCS_DIRECTORY;
- }
-
- // Setting the home page file name if not set by user
- File homePageFile;
- if (homePageFileName == null) {
- homePageFile = new File(docGenBasePath + File.separator
- + Constants.HOMEPAGE_FILE_NAME + Constants.MARKDOWN_FILE_EXTENSION);
- } else {
- homePageFile = new File(docGenBasePath + File.separator + homePageFileName);
- }
-
- // Setting the readme file name if not set by user
- if (readmeFile == null) {
- readmeFile = new File(rootMavenProject.getBasedir() + File.separator
- + Constants.README_FILE_NAME + Constants.MARKDOWN_FILE_EXTENSION);
- }
-
- // Setting the home page template file path if not set by user
- if (homePageTemplateFile == null) {
- homePageTemplateFile = new File(rootMavenProject.getBasedir() + File.separator
- + Constants.README_FILE_NAME + Constants.MARKDOWN_FILE_EXTENSION);
- }
-
- // Retrieving metadata
- List namespaceMetaDataList;
- try {
- namespaceMetaDataList = DocumentationUtils.getExtensionMetaData(
- moduleTargetPath,
- mavenProject.getRuntimeClasspathElements(),
- getLog()
- );
- } catch (DependencyResolutionRequiredException e) {
- throw new MojoFailureException("Unable to resolve dependencies of the project", e);
- }
-
- // Generating the documentation
- if (namespaceMetaDataList.size() > 0) {
- DocumentationUtils.generateDocumentation(namespaceMetaDataList, docGenBasePath, mavenProject.getVersion(),
- getLog());
- DocumentationUtils.updateHeadingsInMarkdownFile(homePageTemplateFile, homePageFile,
- rootMavenProject.getArtifactId(), mavenProject.getVersion(), namespaceMetaDataList);
- DocumentationUtils.updateHeadingsInMarkdownFile(readmeFile, readmeFile, rootMavenProject.getArtifactId(),
- mavenProject.getVersion(), namespaceMetaDataList);
- }
-
- // Delete snapshot files
- DocumentationUtils.removeSnapshotAPIDocs(mkdocsConfigFile, docGenBasePath, getLog());
-
- // Updating the links in the home page to the mkdocs config
- try {
- updateAPIPagesInMkdocsConfig(mkdocsConfigFile, docGenBasePath);
- } catch (FileNotFoundException e) {
- getLog().warn("Unable to find mkdocs configuration file: "
- + mkdocsConfigFile.getAbsolutePath() + ". Mkdocs configuration file not updated.");
- }
- // Deploying the documentation
- if (DocumentationUtils.generateMkdocsSite(mkdocsConfigFile, getLog())) {
- // Creating the credential provider fot Git
- String scmUsername = System.getenv(Constants.SYSTEM_PROPERTY_SCM_USERNAME_KEY);
- String scmPassword = System.getenv(Constants.SYSTEM_PROPERTY_SCM_PASSWORD_KEY);
-
- if (scmUsername == null && scmPassword == null) {
- getLog().info("SCM_USERNAME and SCM_PASSWORD not defined!");
- }
- String url = null;
- Scm scm = rootMavenProject.getScm();
- if (scm != null) {
- url = scm.getUrl();
- }
- // Deploying documentation
- DocumentationUtils.updateDocumentationOnGitHub(docGenBasePath, mkdocsConfigFile, readmeFile,
- mavenProject.getVersion(), getLog());
- DocumentationUtils.deployMkdocsOnGitHubPages(mavenProject.getVersion(),
- rootMavenProject.getBasedir(), url, scmUsername, scmPassword, getLog());
- } else {
- getLog().warn("Unable to generate documentation. Skipping documentation deployment.");
- }
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/freemarker/FormatDescriptionMethod.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/freemarker/FormatDescriptionMethod.java
deleted file mode 100644
index 718b3a2d3c..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/freemarker/FormatDescriptionMethod.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.core.freemarker;
-
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateMethodModelEx;
-import freemarker.template.TemplateModelException;
-
-import java.util.List;
-import java.util.Objects;
-
-/**
- * Apache Freemarker method for formatting text
- * This is invoked by the freemarker templates
- *
- * This method escapes relevant html characters, wraps text
- */
-public class FormatDescriptionMethod implements TemplateMethodModelEx {
- @Override
- public Object exec(List args) throws TemplateModelException {
- if (args.size() != 1) {
- throw new TemplateModelException("There should be a single argument of type string " +
- "passed to format description method");
- }
-
- SimpleScalar arg1 = (SimpleScalar) args.get(0);
- String inputString = arg1.getAsString();
-
- // Replacing spaces that should not be considered in text wrapping with non breaking spaces
- inputString = replaceLeadingSpaces(inputString);
-
- inputString = inputString.replaceAll("<", "<");
- inputString = inputString.replaceAll(">", ">");
-
- // Replacing new line characters
- inputString = replaceNewLines(inputString);
-
- inputString = inputString.replaceAll("\t", " ");
- inputString = inputString.replaceAll("```([^```]*)```", "
$1
");
- inputString = inputString.replaceAll("`([^`]*)`", "$1");
-
- return inputString;
- }
-
- /**
- * Replaces any spaces at the start of a new line with " "
- * This will preserve the tabs entered at the start of a line
- *
- * @param inputString The string which needs to changed
- * @return The string with spaces replaced
- */
- private String replaceLeadingSpaces(String inputString) {
- StringBuilder stringBuilder = new StringBuilder(inputString);
- int i = 0;
- boolean isInsideCode = false;
- while (i < stringBuilder.length()) {
- if (i + 3 < stringBuilder.length() &&
- Objects.equals(stringBuilder.substring(i, i + 3), "```")) {
- isInsideCode = !isInsideCode; // Is inside a
code section
- i += 3;
- } else if (stringBuilder.charAt(i) == '`') {
- isInsideCode = !isInsideCode; // Is inside a code section
- i++;
- } else if (!isInsideCode && stringBuilder.charAt(i) == '\n') {
- i++;
- // Replacing leading spaces
- while (i < stringBuilder.length() && stringBuilder.charAt(i) == ' ') {
- stringBuilder.replace(i, i + 1, " ");
- i += 6;
- }
- } else {
- i++;
- }
- }
- return stringBuilder.toString();
- }
-
- /**
- * Replaces new line characters outside code segments with " " tags
- *
- * @param inputString The string which needs to changed
- * @return The string with the new lines replaced
- */
- private String replaceNewLines(String inputString) {
- StringBuilder stringBuilder = new StringBuilder(inputString);
- int i = 0;
- boolean isInsideCode = false;
- while (i < stringBuilder.length()) {
- if (i + 3 < stringBuilder.length() &&
- Objects.equals(stringBuilder.substring(i, i + 3), "```")) {
- isInsideCode = !isInsideCode; // Is inside a
code section
- i += 3;
- } else if (stringBuilder.charAt(i) == '`') {
- isInsideCode = !isInsideCode; // Is inside a code section
- i++;
- } else if (!isInsideCode && stringBuilder.charAt(i) == '\n') {
- // Replacing new lines
- stringBuilder.replace(i, i + 1, " ");
- i += 4;
- } else {
- i++;
- }
- }
- return stringBuilder.toString();
- }
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/utils/Constants.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/utils/Constants.java
deleted file mode 100644
index 0fd3e0a459..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/utils/Constants.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.core.utils;
-
-import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
-
-/**
- * Constants used by the doc generator and the free marker templates
- *
- * These constants will be passed onto the freemarker templates as a map
- * These can be accesses using the CONSTANTS variable
- * eg:- CONSTANTS.DOCS_DIRECTORY
- */
-public class Constants {
- public static final String DOCS_DIRECTORY = "docs";
- public static final String CLASSES_DIRECTORY = "classes";
- public static final String TEMPLATES_DIRECTORY = "templates";
- public static final String API_SUB_DIRECTORY = "api";
-
- public static final String README_FILE_NAME = "README";
- public static final String LATEST_FILE_NAME = "latest";
- public static final String MKDOCS_CONFIG_FILE_NAME = "mkdocs";
- public static final String HOMEPAGE_FILE_NAME = "index";
-
- public static final String FREEMARKER_TEMPLATE_FILE_EXTENSION = ".ftl";
- public static final String CLASS_FILE_EXTENSION = ".class";
- public static final String MARKDOWN_FILE_EXTENSION = ".md";
- public static final String YAML_FILE_EXTENSION = ".yml";
-
- public static final String MARKDOWN_DOCUMENTATION_TEMPLATE = "documentation";
- public static final String MARKDOWN_EXTENSIONS_INDEX_TEMPLATE = "extensions";
- public static final String MARKDOWN_HEADINGS_UPDATE_TEMPLATE = "headings-update";
-
- public static final String GITHUB_GPL_EXTENSION_REPOSITORY_PREFIX = "siddhi-gpl-";
- public static final String GITHUB_APACHE_EXTENSION_REPOSITORY_PREFIX = "siddhi-";
- public static final String GITHUB_OWNER_WSO2_EXTENSIONS = "wso2-extensions";
-
- public static final String SYSTEM_PROPERTY_SCM_USERNAME_KEY = "SCM_USERNAME";
- public static final String SYSTEM_PROPERTY_SCM_PASSWORD_KEY = "SCM_PASSWORD";
-
- public static final String MKDOCS_CONFIG_PAGES_KEY = "pages";
- public static final String MKDOCS_CONFIG_PAGES_API_KEY = "API Docs";
- public static final String MKDOCS_FILE_SEPARATOR = "/";
- public static final String MKDOCS_SITE_DIRECTORY = "site";
-
- public static final String MKDOCS_COMMAND = "mkdocs";
- public static final String MKDOCS_BUILD_COMMAND = "build";
- public static final String MKDOCS_BUILD_COMMAND_CLEAN_ARGUEMENT = "-c";
- public static final String MKDOCS_BUILD_COMMAND_CONFIG_FILE_ARGUMENT = "-f";
- public static final String MKDOCS_BUILD_COMMAND_SITE_DIRECTORY_ARGUMENT = "-d";
-
- public static final String GIT_REMOTE = "origin";
- public static final String GITHUB_URL = "https:\\/\\/github\\.com";
- public static final String GITHUB_URL_WITH_USERNAME_PASSWORD = "https://%s:%s@github.com";
- public static final String GIT_MASTER_BRANCH = "master";
- public static final String GIT_GH_PAGES_BRANCH = "gh-pages";
-
- public static final String GIT_COMMAND = "git";
- public static final String GIT_BRANCH_COMMAND = "branch";
- public static final String GIT_BRANCH_COMMAND_OUTPUT_CURRENT_BRANCH_PREFIX = "* ";
- public static final String GIT_STASH_COMMAND = "stash";
- public static final String GIT_STASH_POP_COMMAND = "pop";
- public static final String GIT_ADD_COMMAND = "add";
- public static final String GIT_PULL_COMMAND = "pull";
- public static final String GIT_PUSH_COMMAND = "push";
- public static final String GIT_CHECKOUT_COMMAND = "checkout";
- public static final String GIT_CHECKOUT_COMMAND_ORPHAN_ARGUMENT = "--orphan";
- public static final String GIT_COMMIT_COMMAND = "commit";
- public static final String GIT_COMMIT_COMMAND_FILES_ARGUMENT = "--";
- public static final String GIT_COMMIT_COMMAND_MESSAGE_ARGUMENT = "-m";
- public static final String GIT_COMMIT_COMMAND_MESSAGE_FORMAT = "[WSO2-Release] [Release %s] " +
- "update documentation for release %s";
-
- public static final Charset DEFAULT_CHARSET = StandardCharsets.UTF_8;
- public static final String CORE_NAMESPACE = "core";
- public static final String SNAPSHOT_VERSION_POSTFIX = "-SNAPSHOT";
-
- /*
- * Constants used by freemarker templates
- */
- public static final String FREEMARKER_FEATURES_HEADING = "## Features";
- public static final String FREEMARKER_LATEST_API_DOCS_HEADING = "## Latest API Docs";
- public static final String FREEMARKER_SIDDHI_HOME_PAGE = "https://wso2.github.io/siddhi";
- public static final String FREEMARKER_SIDDHI_REPOSITORY_ARTIFACT_ID = "siddhi";
- public static final String FREEMARKER_EXTENSION_REPOSITORY_PARENT_POSTFIX = "-parent";
-}
diff --git a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/utils/DocumentationUtils.java b/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/utils/DocumentationUtils.java
deleted file mode 100644
index c9be5ca55c..0000000000
--- a/modules/siddhi-doc-gen/src/main/java/org/wso2/siddhi/doc/gen/core/utils/DocumentationUtils.java
+++ /dev/null
@@ -1,842 +0,0 @@
-/*
- * Copyright (c) 2017, 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.
- */
-package org.wso2.siddhi.doc.gen.core.utils;
-
-import com.google.common.io.Files;
-import freemarker.template.Configuration;
-import freemarker.template.Template;
-import freemarker.template.TemplateException;
-import freemarker.template.TemplateExceptionHandler;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.io.IOUtils;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.plugin.logging.Log;
-import org.wso2.siddhi.annotation.Example;
-import org.wso2.siddhi.annotation.Extension;
-import org.wso2.siddhi.annotation.Parameter;
-import org.wso2.siddhi.annotation.ReturnAttribute;
-import org.wso2.siddhi.annotation.SystemParameter;
-import org.wso2.siddhi.doc.gen.commons.metadata.ExampleMetaData;
-import org.wso2.siddhi.doc.gen.commons.metadata.ExtensionMetaData;
-import org.wso2.siddhi.doc.gen.commons.metadata.ExtensionType;
-import org.wso2.siddhi.doc.gen.commons.metadata.NamespaceMetaData;
-import org.wso2.siddhi.doc.gen.commons.metadata.ParameterMetaData;
-import org.wso2.siddhi.doc.gen.commons.metadata.ReturnAttributeMetaData;
-import org.wso2.siddhi.doc.gen.commons.metadata.SystemParameterMetaData;
-import org.wso2.siddhi.doc.gen.core.freemarker.FormatDescriptionMethod;
-import org.yaml.snakeyaml.DumperOptions;
-import org.yaml.snakeyaml.Yaml;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.Writer;
-import java.lang.reflect.Field;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.nio.charset.Charset;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Objects;
-import java.util.TreeMap;
-
-/**
- * Utility class for getting the meta data for the extension processors in Siddhi
- */
-public class DocumentationUtils {
- private DocumentationUtils() { // To prevent instantiating utils class
- }
-
- /**
- * Returns the extension extension meta data
- * Gets the meta data from the siddhi manager
- *
- * @param targetDirectoryPath The path of the target directory of the maven module containing extensions
- * @param logger The maven plugin logger
- * @return NamespaceMetaData namespace meta data list
- * @throws MojoFailureException If this fails to access project dependencies
- * @throws MojoExecutionException If the classes directory from which classes are loaded is invalid
- */
- public static List getExtensionMetaData(String targetDirectoryPath,
- List runtimeClasspathElements,
- Log logger)
- throws MojoFailureException, MojoExecutionException {
- List namespaceMetaDataList = new ArrayList();
- int urlCount = runtimeClasspathElements.size() + 1; // +1 to include the module's target/classes folder
-
- // Creating a list of URLs with all project dependencies
- URL[] urls = new URL[urlCount];
- for (int i = 0; i < runtimeClasspathElements.size(); i++) {
- try {
- urls[i] = new File(runtimeClasspathElements.get(i)).toURI().toURL();
- } catch (MalformedURLException e) {
- throw new MojoFailureException("Unable to access project dependency: "
- + runtimeClasspathElements.get(i), e);
- }
- }
-
- File classesDirectory = new File(targetDirectoryPath + File.separator + Constants.CLASSES_DIRECTORY);
- try {
- // Adding the generated classes to the class loader
- urls[urlCount - 1] = classesDirectory.toURI().toURL();
- ClassLoader urlClassLoader = AccessController.doPrivileged(
- (PrivilegedAction) () -> new URLClassLoader(
- urls, Thread.currentThread().getContextClassLoader()
- )
- );
- // Getting extensions from all the class files in the classes directory
- addExtensionInDirectory(classesDirectory, classesDirectory.getAbsolutePath(), urlClassLoader,
- namespaceMetaDataList, logger);
- } catch (MalformedURLException e) {
- throw new MojoExecutionException("Invalid classes directory: " + classesDirectory.getAbsolutePath(), e);
- }
- for (NamespaceMetaData aNamespaceMetaData : namespaceMetaDataList) {
- for (List extensionMetaData : aNamespaceMetaData.getExtensionMap().values()) {
- Collections.sort(extensionMetaData);
- }
- }
- Collections.sort(namespaceMetaDataList);
- return namespaceMetaDataList;
- }
-
-
- /**
- * Generate documentation related files using metadata
- *
- * @param namespaceMetaDataList Metadata in this repository
- * @param documentationBaseDirectory The path of the directory in which the documentation will be generated
- * @param documentationVersion The version of the documentation being generated
- * @param logger The logger to log errors
- * @throws MojoFailureException if the Mojo fails to find template file or create new documentation file
- */
- public static void generateDocumentation(List namespaceMetaDataList,
- String documentationBaseDirectory, String documentationVersion, Log logger)
- throws MojoFailureException {
- // Generating data model
- Map rootDataModel = new HashMap<>();
- rootDataModel.put("metaData", namespaceMetaDataList);
- rootDataModel.put("formatDescription", new FormatDescriptionMethod());
- rootDataModel.put("latestDocumentationVersion", documentationVersion);
-
- String outputFileRelativePath = Constants.API_SUB_DIRECTORY + File.separator + documentationVersion
- + Constants.MARKDOWN_FILE_EXTENSION;
-
- generateFileFromTemplate(
- Constants.MARKDOWN_DOCUMENTATION_TEMPLATE + Constants.MARKDOWN_FILE_EXTENSION
- + Constants.FREEMARKER_TEMPLATE_FILE_EXTENSION,
- rootDataModel, documentationBaseDirectory, outputFileRelativePath
- );
- File newVersionFile = new File(documentationBaseDirectory + File.separator + outputFileRelativePath);
- File latestLabelFile = new File(documentationBaseDirectory + File.separator +
- Constants.API_SUB_DIRECTORY + File.separator + Constants.LATEST_FILE_NAME +
- Constants.MARKDOWN_FILE_EXTENSION);
- try {
- Files.copy(newVersionFile, latestLabelFile);
- } catch (IOException e) {
- logger.warn("Failed to generate latest.md file", e);
- }
- }
-
- /**
- * Update the documentation home page
- *
- * @param inputFile The path to the input file
- * @param outputFile The path to the output file
- * @param extensionRepositoryName The name of the extension repository
- * @param latestDocumentationVersion The version of the latest documentation generated
- * @param namespaceMetaDataList Metadata in this repository
- * @throws MojoFailureException if the Mojo fails to find template file or create new documentation file
- */
- public static void updateHeadingsInMarkdownFile(File inputFile, File outputFile,
- String extensionRepositoryName,
- String latestDocumentationVersion,
- List namespaceMetaDataList)
- throws MojoFailureException {
- // Retrieving the content of the README.md file
- List inputFileLines = new ArrayList<>();
- try {
- inputFileLines = Files.readLines(inputFile, Constants.DEFAULT_CHARSET);
- } catch (IOException ignored) {
- }
-
- // Generating data model
- Map rootDataModel = new HashMap<>();
- rootDataModel.put("inputFileLines", inputFileLines);
- rootDataModel.put("extensionRepositoryName", extensionRepositoryName);
- rootDataModel.put("latestDocumentationVersion", latestDocumentationVersion);
- rootDataModel.put("metaData", namespaceMetaDataList);
- rootDataModel.put("formatDescription", new FormatDescriptionMethod());
-
- generateFileFromTemplate(
- Constants.MARKDOWN_HEADINGS_UPDATE_TEMPLATE + Constants.MARKDOWN_FILE_EXTENSION
- + Constants.FREEMARKER_TEMPLATE_FILE_EXTENSION,
- rootDataModel, outputFile.getParent(), outputFile.getName()
- );
- }
-
- /**
- * Remove the snapshot version documentation files from docs/api directory
- *
- * @param mkdocsConfigFile The mkdocs configuration file
- * @param documentationBaseDirectory The path of the base directory in which the documentation will be generated
- * @param logger The maven plugin logger
- */
- public static void removeSnapshotAPIDocs(File mkdocsConfigFile, String documentationBaseDirectory, Log logger) {
- // Retrieving the documentation file names
- File apiDocsDirectory = new File(documentationBaseDirectory
- + File.separator + Constants.API_SUB_DIRECTORY);
- String[] documentationFileNames = apiDocsDirectory.list(
- (directory, fileName) -> fileName.endsWith(Constants.MARKDOWN_FILE_EXTENSION)
- );
-
- if (documentationFileNames != null) {
- // Removing snapshot files and creating a list of the files that are left out
- for (String documentationFileName : documentationFileNames) {
- if (documentationFileName.endsWith(Constants.SNAPSHOT_VERSION_POSTFIX
- + Constants.MARKDOWN_FILE_EXTENSION)) {
- // Removing the snapshot documentation file
- File documentationFile = new File(apiDocsDirectory.getAbsolutePath()
- + File.separator + documentationFileName);
- if (!documentationFile.delete()) {
- logger.warn("Failed to delete SNAPSHOT documentation file "
- + documentationFile.getAbsolutePath());
- }
- }
- }
-
- }
- }
-
- /**
- * This add a new page to the list of pages in the mkdocs configuration
- *
- * @param mkdocsConfigFile The mkdocs configuration file
- * @param documentationBaseDirectory The base directory of the documentation
- * @throws FileNotFoundException If mkdocs configuration file is not found
- */
- public static void updateAPIPagesInMkdocsConfig(File mkdocsConfigFile, String documentationBaseDirectory)
- throws FileNotFoundException {
- // Retrieving the documentation file names
- File documentationDirectory = new File(documentationBaseDirectory
- + File.separator + Constants.API_SUB_DIRECTORY);
- String[] documentationFiles = documentationDirectory.list(
- (directory, fileName) -> fileName.endsWith(Constants.MARKDOWN_FILE_EXTENSION)
- );
-
- List apiDirectoryContent;
- if (documentationFiles == null) {
- apiDirectoryContent = new ArrayList<>();
- } else {
- apiDirectoryContent = Arrays.asList(documentationFiles);
- apiDirectoryContent.sort(new Comparator() {
- @Override
- public int compare(String s1, String s2) {
- String[] s1s = s1.split("\\D+");
- String[] s2s = s2.split("\\D+");
- int i = 0;
- while (s1s.length > i || s2s.length > i) {
- String s1a = "0";
- String s2a = "0";
- if (s1s.length > i) {
- s1a = s1s[i];
- }
- if (s2s.length > i) {
- s2a = s2s[i];
- }
- int s1aInt = Integer.parseInt(s1a);
- int s2aInt = Integer.parseInt(s2a);
- if (s2aInt > s1aInt) {
- return 1;
- } else if (s2aInt < s1aInt) {
- return -1;
- }
- i++;
- }
- return 0;
- }
- });
- }
-
- String latestVersionFile = null;
- if (apiDirectoryContent.size() > 1) {
- String first = apiDirectoryContent.get(0);
- String second = apiDirectoryContent.get(1);
- if (first.equals(Constants.LATEST_FILE_NAME + Constants.MARKDOWN_FILE_EXTENSION)) {
- latestVersionFile = second;
- }
- }
-
- // Creating yaml parser
- DumperOptions dumperOptions = new DumperOptions();
- dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
- Yaml yaml = new Yaml(dumperOptions);
-
- // Reading the mkdocs configuration
- Map yamlConfig = (Map) yaml.load(new InputStreamReader(
- new FileInputStream(mkdocsConfigFile), Constants.DEFAULT_CHARSET)
- );
-
- // Getting the pages list
- List