[CONTROLLER-399] Some generated sources in yang-test show as unstaged/changed in Git Created: 25/Apr/14  Updated: 05/May/15  Resolved: 05/May/15

Status: Resolved
Project: controller
Component/s: adsal
Affects Version/s: Helium
Fix Version/s: None

Type: Bug
Reporter: Tom Pantelis Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


External issue ID: 852

 Description   

The *Module and *ModuleFactory source files that are generated by the yang-maven-plugin are put under src/main/java. Normally, these files are meant to be permanent (unless manually deleted) but the ones in yang-test aren't because the intent is to re-generate them on each build for testing so there is a yang-test maven plugin that deletes the source files before building. They actually are checked into Git but probably by accident.

The yang-test maven plugin also inserts implementation code into the files after their generated. This should result in the files being the same on each build so git doesn't see them as changed but the code generator inserts a new time stamp into the files each time they're generated so git does see them as changed. This seems to be a recent change as it wasn't happening before.

Instead of generating the files under src/main/java we should generate them under the git-ignored src/main/yang-config. The yangtools CodeGeneratorImpl class allows you to specify a "persistentSourceDir" that overrides the default src/main/java for "persistent" files. We should add this to the JMXGenerator as well.

In addition, the ProcessSources class which rewrites the stub methods with implementation code needs to look in src/main/yang-config.



 Comments   
Comment by Tom Pantelis [ 25/Apr/14 ]

Submitted to Gerrit: https://git.opendaylight.org/gerrit/6411

Comment by Tom Pantelis [ 03/May/14 ]

Fixed upstream

Comment by Carol Sanders [ 05/May/15 ]

This bug is part of the project to Move all ADSAL associated component bugs to ADSAL.

Generated at Wed Feb 07 19:52:55 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.