[YANGTOOLS-1366] unable to generate onf1.4 classes Created: 19/Nov/21  Updated: 20/Jan/22  Resolved: 20/Jan/22

Status: Verified
Project: yangtools
Component/s: None
Affects Version/s: 7.0.8
Fix Version/s: 7.0.9

Type: Bug Priority: Medium
Reporter: Michael Dürre Assignee: Michael Dürre
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File core-model-1-4.yang    

 Description   

I tried to build java sources for onf1.4 model and got this error

core-model-1-4.yang

Failed to execute goal org.opendaylight.yangtools:yang-maven-plugin:7.0.8:generate-sources (binding) on project sdnr-wt-devicemanager-onap-onf14-provider: Execution binding of goal org.opendaylight.yangtools:yang-maven-plugin:7.0.8:generate-sources failed: Conflict on org.opendaylight.yangtools.yang.model.ri.stmt.impl.eff.RegularLeafEffectiveStatement@2a8081f5 between LeafGenerator{argument=(urn:onf:yang:core-model-1-4?revision=2019-11-27)local-id, addedByUses} and LeafGenerator{argument=(urn:onf:yang:core-model-1-4?revision=2019-11-27)local-id, addedByUses}

It  works with silcion-sr2 yangtools(6.0.7)



 Comments   
Comment by Michael Dürre [ 19/Nov/21 ]

FYI demx8as6

Comment by Michael Dürre [ 19/Nov/21 ]

with increased version code generation works. So I have overwritten yang-maven-plugin version from 7.0.8 to 7.0.9 and mdsal-binding-java-api-generator from 8.0.5 to 8.0.6

<pluginManagement>
  <plugins>
    <plugin>           
      <groupId>org.opendaylight.yangtools</groupId>           
      <artifactId>yang-maven-plugin</artifactId>           
      <version>7.0.9</version>           
      <executions>             
        <execution>               
          <id>binding</id>               
          <goals>                 
            <goal>generate-sources</goal>               
          </goals>               
          <configuration>                 
            <inspectDependencies>true</inspectDependencies>               
          </configuration>             
        </execution>           
      </executions>           
      <dependencies>             
        <dependency>               
          <groupId>org.opendaylight.mdsal</groupId>               
          <artifactId>mdsal-binding-java-api-generator</artifactId>               
          <version>8.0.6</version>               
          <scope>compile</scope>             
        </dependency>           
      </dependencies>         
    </plugin>       
  </plugins>     
</pluginManagement>
Comment by Robert Varga [ 19/Nov/21 ]

Please always provide a complete stack trace.
Also please check latest version in a particular stream before filing an issue, because just as your message indicates, this is clearly a duplicate.

Comment by Robert Varga [ 19/Nov/21 ]

It would also be super nice if you stopped confusing YANGTOOLS and MDSAL.

Comment by Michael Dürre [ 20/Jan/22 ]

but is fixed in 7.0.9 (phosphorus-sr1)

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