groovy project from maven pom

Hi,
I am importing a maven project that has java files under src/main/java and groovy files under src/main/groovy
Only the java files are recognized as source files in Intellij and the groovy files are not.

Is there a way to fix that in the pom some how?

Thanks

0
Avatar
Permanently deleted user

Btw,
After I read a little in the forum I tried this in my pom:

<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>${basedir}/src/main/java</source>
                                <source>${basedir}/src/main/groovy</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>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

It didnt help...

0

Which IDEA version are you using?

0
Avatar
Permanently deleted user

Intellij 10.5.4

0

How exactly do you import the project, which actions do you invoke for that?

0
Avatar
Permanently deleted user

Well it is a part of a greater project which I imported through maven.
When I did svn-update it downloaded me this new project that has been added to our project tree.
So it just poped up a sujestion to import the project.

Basically i go to the pom in intellij, right click and select Maven -> force reimport

0

As the groovy sources ar configured by the plugin (build-helper-maven-plugin) they are not imported automatically.
Please use 'Generate Sources and Update Folders' action as desribed here: http://wiki.jetbrains.net/intellij/Maven_FAQ.

0

请先登录再写评论。