Code Monkey home page Code Monkey logo

yang-maven-plugin's Introduction

play-yang

Play Yang based on JNC,and a plugin for pyang to generate Java classes from YANG models.

Reference JNC pyang

play-jnc

Modify based on JNC

yang-maven-plugin

Download

Download the latest JAR or grab via Maven:

<dependency>
  <groupId>com.airlenet.yang</groupId>
  <artifactId>yang-maven-plugin</artifactId>
  <version>1.2.0-SNAPSHOT</version>
</dependency>

or Gradle:

compile 'com.airlenet.yang:yang-maven-plugin:1.2.0-SNAPSHOT'

Snapshots of the development version are available in Sonatype's snapshots repository.

Usage

<plugins>
    <plugin>
        <groupId>com.airlenet.yang</groupId>
        <artifactId>yang-maven-plugin</artifactId>
        <version>1.2.0-SNAPSHOT</version>
        <configuration>
            <skip>false</skip>
            <showWarnings>false</showWarnings>
            <errorAbort>false</errorAbort>
            <excludes>
                <exclude>tailf/*.yang</exclude>
                <exclude>ietf/*.yang</exclude>
                <exclude>iana/*.yang</exclude>
            </excludes>
        </configuration>
        <executions>
            <execution>
                <id>process</id>
                <goals>
                    <goal>process</goal>
                </goals>
                <configuration>
                    <outputDirectory>target/generated-sources/java</outputDirectory><!-- src/main/java -->
                    <packageName>com.airlenet.yang.model</packageName>
                </configuration>
            </execution>
        </executions>
    </plugin>
    <!-- add source resource: java class & resource -->
    <plugin>
       <groupId>org.codehaus.mojo</groupId>
       <artifactId>build-helper-maven-plugin</artifactId>
       <version>1.7</version>
       <executions>
           <execution>
               <id>add-source</id>
               <phase>generate-sources</phase>
               <goals>
                   <goal>add-source</goal>
               </goals>
               <configuration>
                   <sources>
                       <source>target/generated-sources/java</source>
                   </sources>
               </configuration>
           </execution>
           <execution>
               <id>add-resource</id>
               <phase>generate-resources</phase>
               <goals>
                   <goal>add-resource</goal>
               </goals>
               <configuration>
                   <resources>
                       <resource>
                           <directory>target/generated-sources/java</directory>
                       </resource>
                   </resources>
               </configuration>
           </execution>
       </executions>
    </plugin>
</plugins>
mvn package                 # generator java class from yang model,compile,package

mvn yang:validate           # validate yang model

yang-example

License

See License File.

yang-maven-plugin's People

Contributors

airshiplay avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

airlenet

yang-maven-plugin's Issues

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.