GithubHelp home page GithubHelp logo

siddhi-io / siddhi-maven-archetype Goto Github PK

View Code? Open in Web Editor NEW
2.0 29.0 11.0 452 KB

The project contains components which implement the functionality of siddhi-extensions Maven archetypes

License: Apache License 2.0

Java 58.66% JavaScript 21.45% CSS 19.89%
siddhi maven archetype java extension maven-archetype best-practices

siddhi-maven-archetype's Introduction

siddhi-maven-archetype


Branch Build Status
master Build Status

This project contains components which implements functionality of siddhi-extensions Maven archetypes.

How to generate extension projects

To generate specific type of extensions archetype, issue the command from your CLI.

  1. Siddhi Execution

     mvn archetype:generate \
         -DarchetypeGroupId=io.siddhi.extension.archetype \
         -DarchetypeArtifactId=siddhi-archetype-execution \
         -DgroupId=io.siddhi.extension.execution \
         -Dversion=1.0.0-SNAPSHOT
    
    Properties Description Mandatory Default Value
    _nameOfFunction Name of the custom function to be created Y -
    _nameSpaceOfFunction Namespace of the function, used to grouped similar custom functions Y -
    groupIdPostfix Namespace of the function is added as postfix to the groupId as a convention N {_nameSpaceOfFunction}
    artifactId Artifact Id of the project N siddhi-execution-{_nameSpaceOfFunction}
    classNameOfAggregateFunction Class name of the Aggregate Function N ${_nameOfFunction}AggregateFunction
    classNameOfFunction Class name of the Function N ${_nameOfFunction}Function
    classNameOfStreamFunction Class name of the Stream Function N ${_nameOfFunction}StreamFunction
    classNameOfStreamProcessor Class name of the Stream Processor N ${_nameOfFunction}StreamProcessor
    classNameOfWindow Class name of the Window N ${_nameOfFunction}Window
  2. Siddhi IO

    mvn archetype:generate \
        -DarchetypeGroupId=io.siddhi.extension.archetype \
        -DarchetypeArtifactId=siddhi-archetype-io \
        -DgroupId=io.siddhi.extension.io \
        -Dversion=1.0.0-SNAPSHOT 
    
    Properties Description Mandatory Default Value
    _IOType Type of IO for which Siddhi-io extension is written Y -
    groupIdPostfix Type of the IO is added as postfix to the groupId as a convention N {_IOType}
    artifactId Artifact Id of the project N siddhi-io-{_IOType}
    classNameOfSink Class name of the Sink N {_IOType}Sink
    classNameOfSource Class name of the Source N {_IOType}Source
  3. Siddhi Map

     mvn archetype:generate \
         -DarchetypeGroupId=io.siddhi.extension.archetype \
         -DarchetypeArtifactId=siddhi-archetype-map \
         -DgroupId=io.siddhi.extension.map \
         -Dversion=1.0.0-SNAPSHOT 
    
    Properties Description Mandatory Default Value
    _mapType Type of Mapper for which Siddhi-map extension is written Y -
    groupIdPostfix Type of the Map is added as postfix to the groupId as a convention N {_mapType}
    artifactId Artifact Id of the project N siddhi-map-{_mapType}
    classNameOfSinkMapper Class name of the Sink Mapper N {_mapType}SinkMapper
    classNameOfSourceMapper Class name of the Source Mapper N {_mapType}SourceMapper
  4. Siddhi Store

    mvn archetype:generate \
       -DarchetypeGroupId=io.siddhi.extension.archetype \
       -DarchetypeArtifactId=siddhi-archetype-store \
       -DgroupId=io.siddhi.extension.store \
       -Dversion=1.0.0-SNAPSHOT
    
    Properties Description Mandatory Default Value
    _storeType Type of Store for which Siddhi-store extension is written Y -
    groupIdPostfix Type of the Store is added as postfix to the groupId as a convention N {_storeType}
    artifactId Artifact Id of the project N siddhi-store-{_storeType}
    className Class name of the Store N {_storeType}EventTable
  5. Siddhi Script

    mvn archetype:generate \
        -DarchetypeGroupId=io.siddhi.extension.archetype \
        -DarchetypeArtifactId=siddhi-archetype-script \
        -DgroupId=io.siddhi.extension.script \
        -Dversion=1.0.0-SNAPSHOT
    
    Properties Description Mandatory Default Value
    _nameOfScript Name of Custom Script for which Siddhi-script extension is written Y -
    groupIdPostfix Name of the Script is added as postfix to the groupId as a convention N {_nameOfScript}
    artifactId Artifact Id of the project N siddhi-script-{_nameOfScript}
    classNameOfScript Class name of the Script N Eval{_nameOfScript}
  6. Siddhi TestSuite

     mvn archetype:generate \
         -DarchetypeGroupId=io.siddhi.extension.archetype \
         -DarchetypeArtifactId=siddhi-archetype-testsuite \
         -DgroupId=io.siddhi.testsuite \
         -Dversion=1.0.0-SNAPSHOT
    
    Properties Description Mandatory Default Value
    _nameOfTestsuite Name of TestSuite Y -
    groupIdPostfix Name of TestSuite is added as postfix to the groupId as a convention N {_nameOfTestsuite}
    package Package name for tests N io.siddhi.testsuite.{_nameOfTestsuite}
    artifactId Artifact Id of the project N siddhi-testsuite-{_nameOfTestsuite}
    classNameOfAbstractTest Class name of the AbstractTest logic common for both Integration and BlackBox tests N {_nameOfTestsuite}AbstractTestCase
    classNameOfUnitTest Class name of the UnitTest N {_nameOfTestsuite}UnitTestCase
    classNameOfIntegrationTest Class name of the IntegrationTest N {_nameOfTestsuite}IntegrationTest
    classNameOfBlackBoxTest Class name of the BlackBoxTest N {_nameOfTestsuite}BlackBoxTest

How to build from the source

Prerequisites

Steps

  1. Install above prerequisites if they have not been already installed
  2. Get a clone or download source from Github
    git clone https://github.com/wso2-extensions/siddhi-maven-archetype.git
  3. Run the following maven commands from siddhi-maven-archetype directory
    mvn clean install
  4. Run the archetype creation with -DarchetypeVersion={SNAPSHOT version of the project}

siddhi-maven-archetype's People

Contributors

dilini-muthumala avatar kalaiyarasiganeshalingam avatar maheshika avatar mohanvive avatar nisalaniroshana avatar niveathika avatar pcnfernando avatar praboddunuwila avatar suhothayan avatar tishan89 avatar wso2-jenkins-bot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

siddhi-maven-archetype's Issues

Maven generated resources are not included in the bundle of the generated extensions

Description:
$subject. This leads to the extension generated from the archetype not being recognized in Stream Processor.

Suggested Labels:
Bug

Suggested Assignees:

Affected Product Version:
1.0.0, 1.0.1

Steps to reproduce:

  1. Generate an execution extension
  2. Add the extension annotation
  3. Build the extension
  4. Place it in the <SP_HOME>/lib directory
  5. Start stream processor studio
  6. Add a siddhi app including the custom function
  7. No extension found error will be displayed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.