[jira] [Comment Edited] (NETBEANS-6163) Maven does not set generated source roots correctly
[ https://issues.apache.org/jira/browse/NETBEANS-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17475042#comment-17475042 ] Thomas Schapitz edited comment on NETBEANS-6163 at 1/13/22, 1:34 AM: - [~sworisbreathing] I find the sentence "Most pugins adhere..." below "Please Note" telling enough: somebody at Netbeans has taken note in the past ,-). Whether this is also buried somewhere in Maven doc, I don't know. For me, it goes without saying, to avoid introduction of unnecessary sources into the tree if possible for the stated reasons. Rummaging through a generated tree to look for hidden source roots might make things worse too: Not only could this be time consuming and fruitless, but you might even get more than you bargained for. was (Author: taps): [~sworisbreathing] I find the sentence "Most pugins adhere..." below "Please Note" telling enough: somebody at Netbeans has taken note in the past ,-). Whether this is also buried somewhere in Maven doc, I don't know. For me, it goes without saying, to avoid introduction of unnecessary sources into the tree if possible for the stated reasons. Rummaging through a generated tree to look for hidden source roots might make things worse too: Not only could this be time consuming even fruitless, but you might even get more than you bargained for. > Maven does not set generated source roots correctly > --- > > Key: NETBEANS-6163 > URL: https://issues.apache.org/jira/browse/NETBEANS-6163 > Project: NetBeans > Issue Type: Bug > Components: projects - Maven >Reporter: Martin Entlicher >Assignee: Martin Entlicher >Priority: Major > Labels: pull-request-available > Fix For: Next > > Attachments: image-2022-01-12-16-50-02-502.png > > Time Spent: 2h 10m > Remaining Estimate: 0h > > Clone and build [https://github.com/dsyer/native-image-debug] > Open the project in NetBeans and see that under {{Generated Sources}} there > are packages like: {{src.main.java.org.springframework.aot}}, etc. > The initial {{src/main/java}} should not be included in the source root. -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Comment Edited] (NETBEANS-6163) Maven does not set generated source roots correctly
[ https://issues.apache.org/jira/browse/NETBEANS-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474988#comment-17474988 ] Steven Swor edited comment on NETBEANS-6163 at 1/12/22, 10:10 PM: -- [~taps] thanks for the screenshot, but what I was really after was, "Is it written down somewhere *in the maven documentation* (i.e. a page under https://maven.apache.org) how plugins that generate sources should behave, or is this just 'common knowledge' among *maven* plugin developers?" was (Author: sworisbreathing): [~taps] thanks for the screenshot, but what I was really after was, "Is it written down somewhere *in the maven documentation* (i.e. a page under https://maven.apache.org) how plugins that generate sources should behave, or is this just 'common knowledge' among plugin developers?" > Maven does not set generated source roots correctly > --- > > Key: NETBEANS-6163 > URL: https://issues.apache.org/jira/browse/NETBEANS-6163 > Project: NetBeans > Issue Type: Bug > Components: projects - Maven >Reporter: Martin Entlicher >Assignee: Martin Entlicher >Priority: Major > Labels: pull-request-available > Fix For: Next > > Attachments: image-2022-01-12-16-50-02-502.png > > Time Spent: 2h 10m > Remaining Estimate: 0h > > Clone and build [https://github.com/dsyer/native-image-debug] > Open the project in NetBeans and see that under {{Generated Sources}} there > are packages like: {{src.main.java.org.springframework.aot}}, etc. > The initial {{src/main/java}} should not be included in the source root. -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
[jira] [Comment Edited] (NETBEANS-6163) Maven does not set generated source roots correctly
[ https://issues.apache.org/jira/browse/NETBEANS-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17474694#comment-17474694 ] Thomas Schapitz edited comment on NETBEANS-6163 at 1/12/22, 6:41 PM: - [~sworisbreathing] How this should be configured is actually shown on the projects property page: !image-2022-01-12-16-50-02-502.png! So, yes, this is a standard. What is more, this isn't just a Netbeans invention, but relates to the Maven best practices, how the directory structure within a Maven project should be organized. Note, that the openapi-generator is in fact a multi purpose library, able to parse swagger swagger/open-api schemata, and then generating arbitrary output using plugable generators. This library is then wrapped into several hosting environments, among others a CLI application and the Maven plugin, the later is mainly passing through the various configuration options, that haven't been devised with Maven in mind. One of the generation options is to generate a complete Maven or Gradle project containing the code to implement a client for that API. This could be build, installed, and deployed, to be consumed by an other project as dependency, which is a sensible solution in many use cases, as it avoids duplicating the source and classes. It might also provide sort of a starting point, if you use it to generate server side stubs, e. g. in place of a Maven archetype. But it certainly not intended, to spam a whole project infrastructure into target/generated-sources, if you just want to pick the model classes and the API interfaces, which you might want to use in a customized Spring Boot build. This is indeed an abomination, causing unnecessary waste of time, diskspace and energy. It is equivalent to uprooting and carting off a tree, because you want to eat the apples. You asked: 'What's wrong with having NetBeans pick up the generated sources from maven instead of making an assumption about how plugins are going to behave?' Nothing, You cited the idea back to me, that I mentioned earlier on, didn't I? I'm just a bit reluctant, to drop something as "Major Bug" into the lap of Netbeans, if the work around for this "bug" consists in properly adhering to Mavens standards. Netbeans already has a really big codebase. It might pay to curb the growth a bit. BTW.: if you look into the discussion of the linked PR here: [https://github.com/apache/netbean/pull/3285#discussion_r741711876] the impression is, that Netbeans is already doing this. If I was to vote for this issue, I would downgrade it to it to "Minor Improvement", since it is not exactly stopping the world from turning. was (Author: taps): [~sworisbreathing] How this should be configured is actually shown on the projects property page: !image-2022-01-12-16-50-02-502.png! So, yes, this is a standard. What is more, this isn't just a Netbeans inventions, but relates to the Maven best practices, how the directory structure within a Maven project should be organized. The problem here is due to the fact, that the openapi-generator is in fact a multi purpose library, able to parse swagger swagger/open-api schemata, and then generating arbitrary output using plugable generators. This library is then wrapped into several hosting environments, among others a CLI application and the Maven plugin. One of the generation options is to generate a complete Maven or Gradle project containing the code to implement a client for that API. This could be build, installed, and deployed, to be consumed by an other project as dependency, which is a sensible solution in many use cases, as it avoids duplicating the source and classes. It might also provide sort of a starting point, if you use it to generate server side stubs, e. g. in place of a Maven archetype. But it doesn't make sense, to spam a whole project infrastructure into generated-sources, if you just want to pick the model classes and the API interfaces, which you might want to use in a customized Spring Boot build. This is indeed an abomination, causing unnecessary waste of time, diskspace and energy. It is equivalent to uprooting and carting off a tree, because you want to eat the apples. You asked: 'What's wrong with having NetBeans pick up the generated sources from maven instead of making an assumption about how plugins are going to behave?' Nothing, You cited the idea back to me, that I mentioned earlier on, didn't I? I'm just a bit reluctant, to drop something as "Major Bug" into the lap of Netbeans, if the work around for this "bug" consists in properly adhering to Mavens standards. Netbeans already has a really big codebase. It might pay to curb the growth a bit. BTW.: if you look into the discussion of the linked PR here: [https://github.com/apache/netbean/pull/3285#discussion_r741711876] the impression is, that
[jira] [Comment Edited] (NETBEANS-6163) Maven does not set generated source roots correctly
[ https://issues.apache.org/jira/browse/NETBEANS-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17472445#comment-17472445 ] Steven Swor edited comment on NETBEANS-6163 at 1/11/22, 4:28 AM: - There's a similar issue with openapi-generator-maven-plugin... it generates a full maven/gradle project structure under generated-sources (with both a build.gradle *and* a pom.xml). In that setup, netbeans completely barfs on the generated sources and doesn't render them at all in the projects window. {quote} In any case, netbeans shouldn't try to second guess the maven project configuration, but rather tap into the maven model intercepting the source roots during a 'priming build'. {quote} I believe this should fix the issue with the openapi generator plugin as well. was (Author: sworisbreathing): There's a similar issue with openapi-generator-maven-plugin... it generates a full maven/gradle project structure under generated-sources (with both a build.gradle *and* a pom.xml). In that setup, netbeans completely barfs on the generated sources and doesn't render them at all. {quote} In any case, netbeans shouldn't try to second guess the maven project configuration, but rather tap into the maven model intercepting the source roots during a 'priming build'. {quote} I believe this should fix the issue with the openapi generator plugin as well. > Maven does not set generated source roots correctly > --- > > Key: NETBEANS-6163 > URL: https://issues.apache.org/jira/browse/NETBEANS-6163 > Project: NetBeans > Issue Type: Bug > Components: projects - Maven >Reporter: Martin Entlicher >Assignee: Martin Entlicher >Priority: Major > Labels: pull-request-available > Fix For: Next > > Time Spent: 2h 10m > Remaining Estimate: 0h > > Clone and build [https://github.com/dsyer/native-image-debug] > Open the project in NetBeans and see that under {{Generated Sources}} there > are packages like: {{src.main.java.org.springframework.aot}}, etc. > The initial {{src/main/java}} should not be included in the source root. -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists