[
https://issues.apache.org/jira/browse/NETBEANS-6163?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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 <generatorName> , 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/<your-choice-of-identifier>
* specify, that this should be included into the sources to compile (option:
{{{}<addCompileSourceRoot{}}}> - 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: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists