[YANGTOOLS-1457] yang-maven-plugin execution is not reliably following the configuration Created: 11/Oct/22 Updated: 18/Jan/24 |
|
| Status: | Confirmed |
| Project: | yangtools |
| Component/s: | maven plugin |
| Affects Version/s: | 10.0.0 |
| Fix Version/s: | 14.0.0, 11.0.6, 13.0.2 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Ruslan Kashapov | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
Case #1 Actual: if multiple fileGenerator sections are using same identifier then only one will be processed, the others will be ignored. the issue is caused by configuration data transformation from list to map, resulting part of configuration being lost example (addresses org.opendaylight.yangtools.yang2sources.plugin.it.YangToSourcesPluginTestIT#testAdditionalConfiguration):
<plugin>
<groupId>org.opendaylight.yangtools</groupId>
<artifactId>yang-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<goals>
<goal>generate-sources</goal>
</goals>
<configuration>
<yangFilesRootDir>../files</yangFilesRootDir>
<inspectDependencies>false</inspectDependencies>
<fileGenerators>
<fileGenerator>
<identifier>
org.opendaylight.yangtools.plugin.generator.api.TestFileGenerator
</identifier>
<configuration>
<nm1>abcd=a.b.c.d</nm1>
<nm2>abcd2=a.b.c.d.2</nm2>
</configuration>
</fileGenerator>
<fileGenerator>
<identifier>
org.opendaylight.yangtools.plugin.generator.api.TestFileGenerator
</identifier>
<configuration>
<c1>config</c1>
</configuration>
</fileGenerator>
</fileGenerators>
</configuration>
</execution>
</executions>
...
</plugin>
Expected: it should be possible to execute same file generator Case #2 Actual: The file generation is executed for every FileGeneratorFactory implementation found in the classpath even if the FileGenerator identifier is absent in the configuration. Expected: file generation should be executed only for explicitly defined generators. |