Closed ak-seyam closed 2 years ago
Unfortunately, my case is different.
These are my settings for SDK version and compiler
Any troubleshooting steps?
Thanks.
I'll dig into how to make it happen automatically - I'm sure there is a way - but what I'm doing is just right clicking the generated source folder under target and clicking "Mark as generated sources root"
I think for maven adding this snippet will let intelliJ automatically detect it
https://stackoverflow.com/questions/5170620/unable-to-use-intellij-with-a-generated-sources-folder
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<id>test</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/target/generated-sources</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
A little strange, but take that up with Maven/Jetbrains
I think for maven adding this snippet will let intelliJ automatically detect it
https://stackoverflow.com/questions/5170620/unable-to-use-intellij-with-a-generated-sources-folder
<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.4</version> <executions> <execution> <id>test</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${basedir}/target/generated-sources</source> </sources> </configuration> </execution> </executions> </plugin>
A little strange, but take that up with Maven/Jetbrains
This worked for me, thanks
Yep. Most IDEs should already handle this via their generic support for generated sources.
Here is a recording of the workflow in IntelliJ