Ask is moving to Stack Overflow and Serverfault.com! Please use the "opendaylight" tag on either of these sites. This site is now in Read-Only mode

Revision history [back]

click to hide/show revision 1
initial version

Determining pom.xml dependencies for Yang imports

I'm trying to create a yang file that will import items from the "ietf-yang-types" module.

 import ietf-yang-types         { prefix "yang"; revision-date "2010-09-24";} 

I have included a dependency in my main project pom.xml,

<dependency>
  <groupId>org.opendaylight.yangtools.model</groupId>
  <artifactId>ietf-yang-types</artifactId>
  <version>2010.09.24.4-SNAPSHOT</version>
</dependency>

but when I try to build the project (with "mvn clean install") it still fails with the following error message.

[ERROR] Error 1: Imported module [ModuleIdentifierImpl{name='ietf-yang-types', namespace=null, revision=2010-09-24}] was not found. [at META-INF/yang/odl-eman-entity.yang:14:2]

What am I missing? How do I add the correct pom dependency so that maven will know where to find the specified yang import? In addition, is there a good central location to find the required dependency information for common ODL yang imports?

Thanks in advance for helping an ODL neophyte.

Determining pom.xml dependencies for Yang imports

I'm trying to create a yang file that will import items from the "ietf-yang-types" module.

 import ietf-yang-types         { prefix "yang"; revision-date "2010-09-24";} 

I have included a dependency in my main project pom.xml,

<dependency>
  <groupId>org.opendaylight.yangtools.model</groupId>
  <artifactId>ietf-yang-types</artifactId>
  <version>2010.09.24.4-SNAPSHOT</version>
</dependency>

but when I try to build the project (with "mvn clean install") it still fails with the following error message.

[ERROR] Error 1: Imported module [ModuleIdentifierImpl{name='ietf-yang-types', namespace=null, revision=2010-09-24}] was not found. [at META-INF/yang/odl-eman-entity.yang:14:2]

What am I missing? How do I add the correct pom dependency so that maven will know where to find the specified yang import? In addition, is there a good central location to find the required dependency information for common ODL yang imports?

Thanks in advance for helping an ODL neophyte.

EDIT 1 The issue was resolved by placing the correct maven dependency into the correct pom.xml file. The maven archetype for an ODL project adds the yang-to-sources dependencies to the <project_name>/api/pom.xml file. It was that yang-to-sources generation that was failing. Placing the dependency entry in that file fixed the problem.

Determining pom.xml dependencies for Yang imports

I'm trying to create a yang file that will import items from the "ietf-yang-types" module.

 import ietf-yang-types         { prefix "yang"; revision-date "2010-09-24";} 

I have included a dependency in my main project pom.xml,

<dependency>
  <groupId>org.opendaylight.yangtools.model</groupId>
  <artifactId>ietf-yang-types</artifactId>
  <version>2010.09.24.4-SNAPSHOT</version>
</dependency>

but when I try to build the project (with "mvn clean install") it still fails with the following error message.

[ERROR] Error 1: Imported module [ModuleIdentifierImpl{name='ietf-yang-types', namespace=null, revision=2010-09-24}] was not found. [at META-INF/yang/odl-eman-entity.yang:14:2]

What am I missing? How do I add the correct pom dependency so that maven will know where to find the specified yang import? In addition, is there a good central location to find the required dependency information for common ODL yang imports?

Thanks in advance for helping an ODL neophyte.

EDIT 1

The issue was resolved by placing the correct maven dependency into the correct pom.xml file. The maven archetype for an ODL project adds the yang-to-sources dependencies to the <project_name>/api/pom.xml file. It was that yang-to-sources generation that was failing. Placing the dependency entry in that file fixed the problem.

EDIT 2

Aparently all of the yang-model projects have been migrated from Yangtools to MD-SAL. The more up-to-date location of the ietf-yang-types model is:

<dependency>
  <groupId>org.opendaylight.mdsal.model</groupId>
  <artifactId>ietf-yang-types</artifactId>
  <version>2010.09.24.4-SNAPSHOT</version>
</dependency>