CDAP Maven Plugin


License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

co.cask
ArtifactId

ArtifactId

cdap-maven-plugin
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

maven-plugin
Description

Description

CDAP Maven Plugin
CDAP Maven Plugin
Project URL

Project URL

http://cask.co
Project Organization

Project Organization

Cask Data, Inc.
Source Code Management

Source Code Management

https://github.com/caskdata/cdap-maven-plugin.git

Download cdap-maven-plugin

How to add to project

<plugin>
    <groupId>co.cask</groupId>
    <artifactId>cdap-maven-plugin</artifactId>
    <version>1.0.1</version>
</plugin>

Dependencies

compile (5)

Group / Artifact Type Version
org.apache.maven : maven-plugin-api jar 2.0
org.apache.maven : maven-project jar 2.2.1
org.json : json jar RELEASE
commons-codec : commons-codec jar 1.6
commons-io : commons-io jar 2.5

provided (1)

Group / Artifact Type Version
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.2

Project Modules

There are no modules declared in this project.

CDAP Maven Plugin

Join CDAP community License

This repository has collection of CDAP Maven Plugins.

CDAP Plugin JSON

This Maven plugin allows one to create plugin JSON.

Configurations

Configuration Required Default Description
cdapArtifacts Y N/A Specifies all the parent CDAP artifacts and scope this plugin is applicable for.
widgetsDirectory N ${project.dir}/widgets Specifies alternate widgets directory.
docsDirectory N ${project.dir}/docs Specifies alternate documentation directory.
iconsDirectory N ${project.dir}/icons Specifies alternate icons directory.

Maven Goal

This plugin allows you to specify a maven goal that would generate the plugin json file create-plugin-json. The result of create will be placed in ${project.build} directory.

To run only the goal

mvn cdap:create-plugin-json

Example POM

<plugin>
  <groupId>co.cask</groupId>
  <artifactId>cdap-maven-plugin</artifactId>
  <version>1.0-SNAPSHOT</version>
  <configuration>
    <cdapArtifacts>
       <parent>system:cdap-data-pipeline[4.0.0,9.0.0-SNAPSHOT)</parent>
       <parent>system:cdap-data-streams[4.0.0,9.0.0-SNAPSHOT)</parent>
    </cdapArtifacts>
   </configuration>
   <executions>
     <execution>
       <id>create-artifact-config</id>
       <phase>prepare-package</phase>
       <goals>
         <goal>create-plugin-json</goal>
       </goals>
     </execution>
   </executions>
 </plugin>

Output

[INFO] ------------------------------------------------------------------------
[INFO] Building Trash Sink 1.1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- cdap-maven-plugin:1.0-SNAPSHOT:create-plugin-json (default-cli) @ trash-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] CDAP Plugin JSON
[INFO] ------------------------------------------------------------------------
[INFO] Project              : Trash Sink
[INFO] Group ID             : co.cask
[INFO] Artifact ID          : trash-plugin
[INFO] Version              : 1.1.0-SNAPSHOT
[INFO] Base Directory       : /Users/nitin/Work/Devel/plugin-json-test
[INFO] Build Directory      : /Users/nitin/Work/Devel/plugin-json-test/target
[INFO] Widgets Directory    : /Users/nitin/Work/Devel/plugin-json-test/widgets
[INFO] Docs Directory       : /Users/nitin/Work/Devel/plugin-json-test/docs
[INFO] CDAP Artifacts
[INFO]  system:cdap-data-pipeline[4.0.0,9.0.0-SNAPSHOT)
[INFO]  system:cdap-data-streams[4.0.0,9.0.0-SNAPSHOT)
[INFO] ------------------------------------------------------------------------
[INFO] Successfully created  : trash-plugin-1.1.0-SNAPSHOT.json
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.026 s
[INFO] Finished at: 2017-03-19T03:21:38-07:00
[INFO] Final Memory: 13M/309M
[INFO] ------------------------------------------------------------------------

Versions

Version
1.0.1
1.0.0