<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:53:10 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>OpenDaylight JIRA</title>
    <link>https://jira.opendaylight.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>8.20.10</version>
        <build-number>820010</build-number>
        <build-date>22-06-2022</build-date>
    </build-info>


<item>
            <title>[YANGTOOLS-410] Classes were not generated under destination folder, cause compilation error of generated classes</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-410</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Hi&lt;/p&gt;

&lt;p&gt;I want to generate java classes from ietf-inet-types@2010-09-24.yang and ietf-netconf-monitoring@2010-10-04.yang, I defined the generation folder to be target/test/src, but there are several classes generated under src/main/java, as attached picture. It causes compilation error, do you know why? Thank you!&lt;/p&gt;

&lt;p&gt;Yang files are also attached.&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="22830">YANGTOOLS-410</key>
            <summary>Classes were not generated under destination folder, cause compilation error of generated classes</summary>
                <type id="10104" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10303&amp;avatarType=issuetype">Bug</type>
                                                <status id="5" iconUrl="https://jira.opendaylight.org/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="green"/>
                                    <resolution id="10002">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="minna.hu@ericsson.com">Minna Hu</reporter>
                        <labels>
                    </labels>
                <created>Sat, 14 Feb 2015 00:52:40 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:28 +0000</updated>
                            <resolved>Wed, 18 Feb 2015 08:02:27 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="43273" author="minna.hu@ericsson.com" created="Sat, 14 Feb 2015 00:52:40 +0000"  >&lt;p&gt;Attachment ietf-netconf-monitoring@2010-10-04.yang has been added with description: ietf-netconf-monitoring&lt;/p&gt;</comment>
                            <comment id="43274" author="minna.hu@ericsson.com" created="Sat, 14 Feb 2015 00:53:06 +0000"  >&lt;p&gt;Attachment ietf-inet-types@2010-09-24.yang has been added with description: ietf-inet-type&lt;/p&gt;</comment>
                            <comment id="43275" author="minna.hu@ericsson.com" created="Sat, 14 Feb 2015 01:04:54 +0000"  >&lt;p&gt;Attachment bug.PNG has been added with description: classes generated in wrong place&lt;/p&gt;</comment>
                            <comment id="43268" author="tony.tkacik@gmail.com" created="Sun, 15 Feb 2015 11:50:43 +0000"  >&lt;p&gt;YANG (RFC6020) does not define logic how to determine type of union,&lt;br/&gt;
only how to validate it.&lt;/p&gt;

&lt;p&gt;Classes present in src/main/java are intended for user to customize&lt;br/&gt;
behaviour which type sould be used for serialization.&lt;/p&gt;

&lt;p&gt;There is opened enhancement issue for &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-49&quot; title=&quot;Do not generate Builders for Union types&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-49&quot;&gt;&lt;del&gt;MDSAL-49&lt;/del&gt;&lt;/a&gt; which will not require&lt;br/&gt;
users anymore to customize class.&lt;/p&gt;

&lt;p&gt;In meantime you could fill out implementation of these classes,&lt;br/&gt;
or use already generated sources for ietf-inet-types and ietf-netconf-monitoring&lt;br/&gt;
from YANGTools and controller project.&lt;/p&gt;

&lt;p&gt;Marking this as duplicate of &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-49&quot; title=&quot;Do not generate Builders for Union types&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-49&quot;&gt;&lt;del&gt;MDSAL-49&lt;/del&gt;&lt;/a&gt; since behaviour described by you is by design and will be removed by &lt;a href=&quot;https://jira.opendaylight.org/browse/MDSAL-49&quot; title=&quot;Do not generate Builders for Union types&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MDSAL-49&quot;&gt;&lt;del&gt;MDSAL-49&lt;/del&gt;&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="43269" author="minna.hu@ericsson.com" created="Tue, 17 Feb 2015 09:06:39 +0000"  >&lt;p&gt;Tony, thank you for your reply! This is quite interesting design.&lt;/p&gt;

&lt;p&gt;I noticed that in src/main/java, those generated classes are all Builder classes for unions, you also mentioned this. Did you mean that I need to implement getDefaultInstance method?&lt;/p&gt;

&lt;p&gt;And for most projects, the classes will be generated under src/main/yang-gen-sal, and src/main/java is also a source folder, so you won&apos;t expect compilation error, right?&lt;/p&gt;</comment>
                            <comment id="43270" author="tony.tkacik@gmail.com" created="Tue, 17 Feb 2015 17:41:10 +0000"  >&lt;p&gt;Yeah, that is true - you need to implement this method.&lt;/p&gt;

&lt;p&gt;This pattern - which generates stubs in src/main/java is pretty common across code generators for code, which needs to be implemented, but code generator does not &lt;br/&gt;
have enough inteligence to provide implementation.&lt;/p&gt;

&lt;p&gt;This code needs also to be checked in.&lt;/p&gt;

&lt;p&gt;For models in question (ietf-inet-types@2010-09-24.yang and ietf-netconf-monitoring@2010-10-04.yang) I suggest using ones already present in nexus,&lt;br/&gt;
since they already have these builders implemented by YANGTools and COntroller developers.&lt;/p&gt;</comment>
                            <comment id="43271" author="minna.hu@ericsson.com" created="Wed, 18 Feb 2015 02:28:05 +0000"  >&lt;p&gt;Thanks a lot, the jars implemented by YANGTools and COntroller developers will be a good reference for me.&lt;/p&gt;

&lt;p&gt;I found ietf-inet-types and ietf-netconf-monitoring artifacts in Nexus, they are under &amp;lt;groupId&amp;gt;org.opendaylight.controller&amp;lt;/groupId&amp;gt;. However, in yangtools repo, ietf-inet-types are under &amp;lt;groupId&amp;gt;org.opendaylight.yangtools.model&amp;lt;/groupId&amp;gt;, do you know why there is difference? Which one shall I use?&lt;/p&gt;

&lt;p&gt;I didn&apos;t find the module for ietf-netconf-monitoring in yangtools repo, is the module stored somewhere else? Please let me know, thank you!&lt;/p&gt;

&lt;p&gt;Looking forward to your reply! Thanks!&lt;/p&gt;</comment>
                            <comment id="43272" author="tony.tkacik@gmail.com" created="Wed, 18 Feb 2015 08:02:27 +0000"  >&lt;p&gt;ietf-inet-types is org.opendaylight.yangtools.model because it is protocol agnostic .&lt;/p&gt;

&lt;p&gt;ietf-netconf-monitoring is org.opendaylight.controller is in controller (netconf subsystem) because it is directly related to netconf.&lt;/p&gt;

&lt;p&gt;You could use both (ietf-netconf-monitoring uses ietf-inet-types from yangtools).&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10002">
                    <name>Duplicate</name>
                                            <outwardlinks description="duplicates">
                                        <issuelink>
            <issuekey id="26871">MDSAL-49</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="13010" name="bug.PNG" size="30676" author="minna.hu@ericsson.com" created="Sat, 14 Feb 2015 01:04:54 +0000"/>
                            <attachment id="13009" name="ietf-inet-types@2010-09-24.yang" size="16294" author="minna.hu@ericsson.com" created="Sat, 14 Feb 2015 00:53:06 +0000"/>
                            <attachment id="13008" name="ietf-netconf-monitoring@2010-10-04.yang" size="18669" author="minna.hu@ericsson.com" created="Sat, 14 Feb 2015 00:52:40 +0000"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                            <customfield id="customfield_11400" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2720</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10201" key="com.atlassian.jira.plugin.system.customfieldtypes:url">
                        <customfieldname>External issue URL</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[https://bugs.opendaylight.org/show_bug.cgi?id=2720]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                <customfield id="customfield_10000" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0271z:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>