<!-- 
RSS generated by JIRA (8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d) at Wed Feb 07 20:54:06 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-716] yang-maven-plugin built-in M2E support</title>
                <link>https://jira.opendaylight.org/browse/YANGTOOLS-716</link>
                <project id="10188" key="YANGTOOLS">yangtools</project>
                    <description>&lt;p&gt;Background: Lifecycle mappings are instructions for the Maven integration in the Eclipse IDE (M2E) what to do with Maven plugins; see e.g. &lt;a href=&quot;https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.eclipse.org/m2e/documentation/m2e-execution-not-covered.html&lt;/a&gt; for an introduction.&lt;/p&gt;

&lt;p&gt;yang-maven-plugin currently has no built-in lifecycle mapping. The current solution thus is to either:&lt;/p&gt;

&lt;p&gt; (a) manually yourself set an &amp;lt;ignore /&amp;gt; for yang-maven-plugin, which will cause M2E to completely ignore yang-maven-plugin, and so end-users just do &quot;mvn generate-sources&quot; whenever they initially import projects, change *.yang models, or switch branches (and the branch switching IMHO is in practice the most common and often used use case requiring manual action among the three...).&lt;/p&gt;

&lt;p&gt;  (b) use the M2Eclipse extension for the yang-maven-plugin which is available in the org.opendaylight.yangide.m2e.yang Eclipse plugin that is part of yangide (YangProjectConfigurator).&lt;/p&gt;

&lt;p&gt;I used to myself use, and through &lt;a href=&quot;https://github.com/vorburger/opendaylight-eclipse-setup&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/vorburger/opendaylight-eclipse-setup&lt;/a&gt; advocate for, the option (b) for the last 6 months.  But I&apos;ve meanwhile changed my mind and am about to switch this to (a) instead, because yangide: &lt;/p&gt;

&lt;p&gt;   &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.opendaylight.org/images/icons/emoticons/information.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt; seems to have a non-negligible impact on Eclipse workspace build performance due to its &quot;YANG Indexing&quot;; &lt;/p&gt;

&lt;p&gt;   (ii) embeds a easily outdated copy of yangtools JARs in its org.opendaylight.yangide.core Eclipse Plugin&apos;s libs/; &lt;/p&gt;

&lt;p&gt;   (iii) is not currently actively maintained.&lt;/p&gt;

&lt;p&gt;Long story short, and to get to the point of this enhancement: In an ideal world, from what I understand about this stuff, yang-maven-plugin would itself already provide lifecycle mapping metadata - &lt;a href=&quot;https://wiki.eclipse.org/M2E_compatible_maven_plugins&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://wiki.eclipse.org/M2E_compatible_maven_plugins&lt;/a&gt; describes how this can be achieved.  This would apparently also require the yang-maven-plugin to be written to be &quot;IDE-invokeable&quot; by using, only BuildContext to write files and emit validation errors.&lt;/p&gt;

&lt;p&gt;It doesn&apos;t look very complicated; but the one thing that I would be slightly worried about is performance; if m2e assume stateless yang-maven-plugin with no static (I&apos;m not sure it does; to be explored), it may be slow if it has to re-construct its &quot;index&quot; constantly? (That&apos;s basically what the index that part of yangide is for, which takes time o construct, from what I understand.)&lt;/p&gt;

&lt;p&gt;I personally don&apos;t have bandwidth to dig further into this in the short term, but I&apos;ll keep it on a list of possible things to look at over the next.. months, likely.  If anyone reads this and would like to have a stab at it, please go for it and don&apos;t let me hold you back.  (But I&apos;d certainly be willing to collaborate with/review/test etc. any work related to this.)&lt;/p&gt;</description>
                <environment>&lt;p&gt;Operating System: All&lt;br/&gt;
Platform: All&lt;/p&gt;</environment>
        <key id="23136">YANGTOOLS-716</key>
            <summary>yang-maven-plugin built-in M2E support</summary>
                <type id="10100" iconUrl="https://jira.opendaylight.org/secure/viewavatar?size=xsmall&amp;avatarId=10310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="1" iconUrl="https://jira.opendaylight.org/images/icons/priorities/blocker.svg">Highest</priority>
                        <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="10000">Done</resolution>
                                        <assignee username="rovarga">Robert Varga</assignee>
                                    <reporter username="vorburger">Michael Vorburger</reporter>
                        <labels>
                    </labels>
                <created>Mon, 14 Nov 2016 16:34:40 +0000</created>
                <updated>Sun, 10 Apr 2022 18:35:56 +0000</updated>
                            <resolved>Wed, 1 Mar 2017 01:14:46 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="44251" author="vorburger" created="Mon, 14 Nov 2016 16:42:36 +0000"  >&lt;p&gt;&amp;gt; because yangide: &lt;/p&gt;

&lt;p&gt;   (iv) doesn&apos;t &quot;work&quot; reliably anyway; e.g. on switch branches it does NOT currently appear to automatically transparently re-generate the required code&lt;/p&gt;</comment>
                            <comment id="44252" author="rovarga" created="Mon, 20 Feb 2017 21:58:44 +0000"  >&lt;p&gt;master: &lt;a href=&quot;https://git.opendaylight.org/gerrit/52087&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/52087&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For completely reliable operation, BUG-175 needs to be addressed so we can have an intermediate layer between generators and the plugin &amp;#8211; otherwise we cannot guarantee generators&apos; interactions.&lt;/p&gt;</comment>
                            <comment id="44253" author="rovarga" created="Thu, 23 Feb 2017 23:04:18 +0000"  >&lt;p&gt;boron: &lt;a href=&quot;https://git.opendaylight.org/gerrit/52229&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/52229&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44254" author="vorburger" created="Tue, 28 Feb 2017 21:17:12 +0000"  >&lt;p&gt;&lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/52416/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/52416/&lt;/a&gt; to clean gen. output dir in IDE..&lt;/p&gt;</comment>
                            <comment id="44255" author="vorburger" created="Tue, 28 Feb 2017 22:40:52 +0000"  >&lt;p&gt;I&apos;ve just done more testing re. this:&lt;/p&gt;

&lt;p&gt;to see if it&apos;s now possible (after c/52416 will be merged), or still premature, to remove the lifecycle-mapping ignore that we currently have in opendaylight-eclipse-setup..&lt;/p&gt;

&lt;p&gt;First observation: A number of projects actually have a lifecycle-mapping ignore for yang-maven-plugin hard-coded in their pom.xml; e.g. genius/lockmanager/&lt;/p&gt;
{api,impl}
&lt;p&gt; - all of those would have to be cleaned-up for this to really work as expected (I&apos;ll be raising Gerrits for that).&lt;/p&gt;

&lt;p&gt;Second observation: menu Project &amp;gt; Clean full build does apparently &lt;b&gt;NOT&lt;/b&gt; trigger M2E plugin execution - you HAVE to do project right click Maven &amp;gt; Update Project &amp;lt;Alt F5&amp;gt; to &quot;Update project configuration from pom.xml&quot; for the yang-maven-plugin code generation to run in-IDE.&lt;/p&gt;

&lt;p&gt;Third observation: Eclipse / M2E is, kind of obviously, not smart enough to trigger and order Project inter dependencies when running plugins.. e.g. if you do &quot;mvno -Pide clean&quot; in genius and then Maven &amp;gt; Update Project one or a few projects, you often run into this kind of error (in the Error Log) - because dependant projects have not yet been generated... (I found this surprising, because even though I&apos;d expect Java compilation red errors from gen. code ref. to other gen. code from dependant projects, the YANG parsing should still have worked?)&lt;/p&gt;

&lt;p&gt;Failed to parse YANG from source SourceSpecificContext &lt;span class=&quot;error&quot;&gt;&amp;#91;source=META-INF/yang/mdsalutil-impl.yang, current=SOURCE_PRE_LINKAGE, finished=INIT&amp;#93;&lt;/span&gt;: Imported module &lt;span class=&quot;error&quot;&gt;&amp;#91;odl-mdsalutil&amp;#93;&lt;/span&gt; was not found. &lt;span class=&quot;error&quot;&gt;&amp;#91;at META-INF/yang/mdsalutil-impl.yang:8:4&amp;#93;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;The solution to this is to do the Maven &amp;gt; Update Project on all open projects (or e.g. on a working set) after a clean; that seems to work.&lt;/p&gt;</comment>
                            <comment id="44256" author="vorburger" created="Tue, 28 Feb 2017 22:42:27 +0000"  >&lt;p&gt;Performance timing wise, I&apos;m seeing this having a significant impact that warrants more measurements - e.g. on Genius, a project clean without this (with lifecycle-mapping ignore for yang-maven-plugin) is ca. 1-ish minute, whereas with this it&apos;s ca. 4 minutes.  But a CLI &quot;mvn -Pq generate-sources&quot; in genius takes only ca. 1.5 minutes, so... code gen. by M2E is for some reason apparently (how can that be?), quite a bit, slower than on CLI mvn...&lt;/p&gt;

&lt;p&gt;The big Q then becomes if it&apos;s a Good Idea to transparently enable this for end-users, so that e.g. a new git clone and branch switching things &quot;just work&quot; (no red, even if full workspace rebuild is a bit slower) - or whether it&apos;s better to keep it on ignore and let people have to do &quot;mvn -Pq generate-sources&quot; on CLI as is now (which &lt;b&gt;is&lt;/b&gt; a PITA).&lt;/p&gt;</comment>
                            <comment id="44257" author="vorburger" created="Wed, 1 Mar 2017 00:17:01 +0000"  >&lt;p&gt;&amp;gt; Performance timing wise, I&apos;m seeing this having a significant impact&lt;/p&gt;

&lt;p&gt;FTR: I was measuring this using latest Version: Neon.2 Release (4.6.2) Build id: 20161208-0600, as I&apos;m struggling with bleeding edge Oxygen for other reasons&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;FYI https://bugs.eclipse.org/bugs/show_bug.cgi?id=512830&amp;#93;&lt;/span&gt;, in a workspace with only genius projects, closed all those in the &quot;genius-build&quot; dynamic working set (by &lt;a href=&quot;https://github.com/vorburger/opendaylight-eclipse-setup&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/vorburger/opendaylight-eclipse-setup&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&amp;gt; a CLI &quot;mvn -Pq generate-sources&quot; in genius takes only ca. 1.5 minutes&lt;/p&gt;

&lt;p&gt;that perhaps wasn&apos;t an entirely fair comparison, because that only gen. code but does not compile, better to compare it with e.g. a &quot;mvn -o -Pq clean package&quot; which is ca. 2.5 minutes.&lt;/p&gt;

&lt;p&gt;&amp;gt; whereas with this it&apos;s ca. 4 minutes&lt;/p&gt;

&lt;p&gt;or ca. 3.15 min. on measuring it again.. but still significantly more than the 1 min. without YANG code gen. in IDE, and the time on CLI .. although now the diff is ca. 45s, perhaps acceptable.&lt;/p&gt;</comment>
                            <comment id="44258" author="vorburger" created="Wed, 1 Mar 2017 00:23:36 +0000"  >&lt;p&gt;&amp;gt;&amp;gt; whereas with this it&apos;s ca. 4 minutes&lt;br/&gt;
&amp;gt; or ca. 3.15 min&lt;/p&gt;

&lt;p&gt;or ca. 2.55 min if I give Eclipse -Xmx4096m instead of -Xmx2048m&lt;/p&gt;</comment>
                            <comment id="44259" author="vorburger" created="Wed, 1 Mar 2017 01:14:46 +0000"  >&lt;p&gt;Also requires &lt;a href=&quot;https://git.opendaylight.org/gerrit/#/c/52440/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://git.opendaylight.org/gerrit/#/c/52440/&lt;/a&gt; re. target/ &lt;del&gt;VS&lt;/del&gt; target-ide/ ..&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </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_10002" key="com.pyxis.greenhopper.jira:gh-epic-link">
                        <customfieldname>Epic Link</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>YANGTOOLS-746</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10208" key="com.atlassian.jira.plugin.system.customfieldtypes:textfield">
                        <customfieldname>External issue ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>7182</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=7182]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10206" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Issue Type</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10305"><![CDATA[Improvement]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10204" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>ODL SR Target Milestone</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10344"><![CDATA[Boron-3]]></customfieldvalue>

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

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