Better maven-scala-plugin support (please automatically recognize /src/main/scala and /src/test/scala)
I'm importing a Maven project that contains a mix of Scala and Java code.
The pom.xml specifies the maven-scala-plugin, and the project layout has "/src/main/scala" and "/src/test/scala" directories.
It would be nice if IDEA could pick this up, and automatically mark these directories as "sources" and "test sources" respectively.
At the moment I have to do this manually for one module after another.
This is annoying, and a good example of something that should be picked up and automatically configured out-of-the-box.
Another nice feature would be configure the facet with the scala-compiler and scala-libary JAR dependencies distributed through maven dependencies.
Is something like this planned already? If not, should I create a YouTrack ticket for IDEA, or for the Scala plugin?
请先登录再写评论。
Better if you'll create a ticket. Main work now is on code insight. So this fixes will not be soon.
Best regards,
Alexander Podkhalyuzin.
Here's the ticket:
http://youtrack.jetbrains.net/issue/SCL-1812
Votes welcome
I've been using the following with success... YMMV
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>src/main/groovy</source>
<source>src/main/java</source>
<source>src/main/scala</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-test-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>src/test/groovy</source>
<source>src/test/java</source>
<source>src/test/scala</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>