yang-jnc


License

License

Categories

Categories

Net
GroupId

GroupId

com.airlenet.yang
ArtifactId

ArtifactId

yang-jnc
Last Version

Last Version

2.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

yang-jnc
yang-jnc
Project Organization

Project Organization

airlenet

Download yang-jnc

How to add to project

<!-- https://jarcasting.com/artifacts/com.airlenet.yang/yang-jnc/ -->
<dependency>
    <groupId>com.airlenet.yang</groupId>
    <artifactId>yang-jnc</artifactId>
    <version>2.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.airlenet.yang/yang-jnc/
implementation 'com.airlenet.yang:yang-jnc:2.0.0'
// https://jarcasting.com/artifacts/com.airlenet.yang/yang-jnc/
implementation ("com.airlenet.yang:yang-jnc:2.0.0")
'com.airlenet.yang:yang-jnc:jar:2.0.0'
<dependency org="com.airlenet.yang" name="yang-jnc" rev="2.0.0">
  <artifact name="yang-jnc" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.airlenet.yang', module='yang-jnc', version='2.0.0')
)
libraryDependencies += "com.airlenet.yang" % "yang-jnc" % "2.0.0"
[com.airlenet.yang/yang-jnc "2.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
com.airlenet.yang : ganymed-ssh2 jar 1.2.0
com.google.guava : guava jar 22.0

test (4)

Group / Artifact Type Version
junit : junit Optional jar 4.12
org.bouncycastle : bcprov-jdk15on jar 1.60
org.hamcrest : hamcrest-all jar 1.3
org.slf4j : slf4j-jdk14 jar 1.7.21

Project Modules

There are no modules declared in this project.

yang-java

Yang file is parsed by Java antlr4; Yang file is parsed by java code and JNC code is generated. Its principle is based on JNC and onos-yang-tools

Reference JNC pyang antlr onos-yang-tools

yang-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>LATEST</version>
</dependency>

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>2.0.0-SNAPSHOT</version>
        <configuration>
            <yangFilesDir>src/main/yang</yangFilesDir>
            <packageName>com.test.yang.model.gen</packageName>
            <classFileDir>src/main/java</classFileDir>
        </configuration>
        <executions>
            <execution>
                <id>default</id>
                <goals>
                    <goal>yang2java</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    <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

yang-example

License

See License File.

Versions

Version
2.0.0
1.2.0