Skip to content

Generates CloudSlang .sl files based on Java Actions.

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
license.template
Notifications You must be signed in to change notification settings

CloudSlang/cs-content-generator

Repository files navigation

CloudSlang logo

CloudSlang Content Generator

Join the chat at https://gitter.im/CloudSlang/cs-content-generator

Build Status

This repository contains a tool that generates / updates CloudSlang .sl files based on Java Actions.

  1. Description
  2. General Usage
  3. Contribution Guideline

This tool will offer the possibility to convert Java Actions from the project Cloudslang/cs-actions and generate/update the .sl files that will be added in Cloudslang/cloud-slang-content

To run the tool:

PREREQUISITES

Java 8 installed in order to run the tool.

Maven 3.3.9 installed in order to build the tool.

  1. Clone this repository and build it, by running (mvn clean install). Copy 'cs-content-generator-<version>.jar' to a folder of your choice.

  2. Download from Maven Central any of the packages available in Cloudslang/cs-actions or clone the repository, build locally using Maven 3.3.9 and copy cs-packageName-0.0.*.jar to a location from which it will be used as the --source argument. The path can be, either relative or absolute.

    Example:
    -s C:\Users\yourUsername\.m2\repository\io\cloudslang\content\cs-ssh-0.0.36\cs-ssh-0.0.36.jar
    -s cs-ssh-0.0.38.jar - If the package is in the same folder as the tool.
    
    -d C:\Users\yourUsername\cloudslang\cloud-slang-content\content
    -d content - If you want to save the generated content in the same folder as the tool.
    
  3. Open command prompt in Windows or a terminal in Linux, go to the location where cs-content-generator-.jar is located and run the following command:

    java -jar cs-content-generator-<version>.jar -s javaPackage -d folderName 
    
     -s, --source       The source file/folder of the Actions that will be converted.
     -d, --destination  Absolute path to the location where the .sl files will be created.
     -h, --help
    
  4. Copy the newly created .sl files to your CloudSlang content folder or set -d <path_to>..\cloud-slang-content\content.

Note: If the files already exist, they will be updated with the new values. At the moment, only the gav: section is updated.

NEW: cs-content-generator-plugin

This plugin can also be added as another step in a Maven build to generate content.

Maven plugin example:

    [...]
      <plugins>
            <plugin>
                <groupId>io.cloudslang.tools</groupId>
                <artifactId>cs-content-generator-plugin</artifactId>
                <version>${version}</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
      </plugins>
    [...]

The plugin can run independent from the build: 'mvn package' which will generate the .sl files as long as there is a .jar in the ${project.build.directory} of the project.

Read our Contribution Guide here.

About

Generates CloudSlang .sl files based on Java Actions.

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
license.template

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •