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

0

Determining pom.xml dependencies for Yang imports

asked 2016-06-30 11:46:23 -0800

George Adam gravatar image

updated 2016-07-07 09:26:16 -0800

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>
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-06-30 23:30:01 -0800

I think this artifact is not available in nexus repository. I am able to see some different version for the it: https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/org/opendaylight/yangtools/model/ietf-yang-types-20130715/

You try to change the dependency to :

<dependency>
  <groupId>org.opendaylight.yangtools.model</groupId>
  <artifactId>ietf-yang-types</artifactId>
  <version>2013.07.15.7.4-SNAPSHOT</version>
</dependency>
edit flag offensive delete publish link more
Login/Signup to Answer

Question Tools

Follow
1 follower

Stats

Asked: 2016-06-30 11:46:23 -0800

Seen: 290 times

Last updated: Jul 07 '16