Related question
How to configure IntelliJ IDEA and/or Maven to automatically add directories with Java source code generated using jaxb2-maven-plugin?
I have a custom plugin that generates sources under target/generated-sources
(Note no toolname here). So I get sources like target/generated-sources/com/mycompany
...etc.
This format cannot be changed at all, so will I be able to configure Intellij into adding it as a source folder. As of now, I can see that Intellij has added target/generated-sources/com
as the source folder.
Please note that I do not have the option of configuring the plugin !
UPDATE 1: I do not agree with the fact that I MUST put my generated sources under a tool name folder. It may be a good convention, but if I have only one generator there is no need for me to put it there? Again, in my pom.xml I have a resources
section which clearly indicates that target/generated-sources
should be treated as a source folder. This works perfectly fine in Eclipse so I have no idea why Intellij would not respect my settings.
TL;DR -> When I put target/generated-sources
in the resource section of pom.xml
why is Intellij overzealous to add target/generated-sources/com
to the classpath?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…