[jira] [Commented] (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 commented on NETBEANS-6163: --- [~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] [Commented] (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 commented on NETBEANS-6163: --- [~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] [Commented] (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 commented on NETBEANS-6163: --- [~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 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. > 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] [Commented] (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=17473203#comment-17473203 ] Steven Swor commented on NETBEANS-6163: --- [~taps] Is the maven plugin really behaving inappropriately here? Is it written down somewhere how plugins that generate sources should behave, or is this just "common knowledge" among plugin developers? The maven build seems to be fine with how these plugins behave. It's only NetBeans that can't seem to make heads or tails of it. 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? > 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
[jira] [Commented] (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=17472853#comment-17472853 ] Thomas Schapitz commented on NETBEANS-6163: --- [~sworisbreathing] Incidentally, I've seen that too in the openapi-generator-plugin. Unfortunately, there are two other aspects to this: a.) This mode of operation of the plugin is intended to generate a complete project, not just some source. So placing this into 'generated-sources' is clearly inappropriate both from a Maven as well as a Netbeans point of view. b.) The configuration of this specific plugin, which, in turn relies on pluggable 'generators', that are specified by option , is pretty messy. In some cases, it is possible to tweak the adapters, to generate only specific sources, and also to place them appropriately, in others that might prove difficult. So, in this case: * look up the configuration of the generator used. Look for options, that allow the following: * switch off generation of project support files * specify output oft the source below target/generated-sources/ * specify, that this should be included into the sources to compile (option: {{{} - the openapi-generator-plugin mostly does this by default, so you don't need the build helper) After a priming build, this should result in Netbeans setting up the source roots matching the one of Maven. While it would be nice, if Netbeans supplied a bit of more support here, I also don't think it is the business of Netbeans to fix goofy plugin configurations. If the options I mentioned are not available, it would be more appropriate to contact the author of the specific generator. The case in point here is: this plugin is maintained by the openapi community, that isn't exactly focussed on getting Maven things right. > 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
[jira] [Commented] (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 commented on NETBEANS-6163: --- 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
[jira] [Commented] (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=17467104#comment-17467104 ] Thomas Schapitz commented on NETBEANS-6163: --- This is rather a problem of certain improper coded plugins, then one of maven or netbeans. By convention, a single plugin execution should place the package root of genereated source just one level below of target/generated-sources/, where this usually indicates the plugins name, e. g. 'jaxb'. The plugin will put this directory also into the source path, and netbeans will pick it up from there too. In some cases though, noncompliant plugins allow to configure the output path. In others, usage of the build-helper-plugin is necessary. 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'. > 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