IntelliJ没有下载groovy项目的Maven源代码
我发现“下载源代码”对我们所有的Java项目都非常有用。但我并没有让它在Groovy项目中工作——它并没有出错,我们只是没有在IntelliJ中显示正确的源代码 IntelliJ或Maven中是否有某种配置可以实现这一点IntelliJ没有下载groovy项目的Maven源代码,maven,intellij-idea,groovy,Maven,Intellij Idea,Groovy,我发现“下载源代码”对我们所有的Java项目都非常有用。但我并没有让它在Groovy项目中工作——它并没有出错,我们只是没有在IntelliJ中显示正确的源代码 IntelliJ或Maven中是否有某种配置可以实现这一点 谢谢。这里有人发现了。我将其添加到pom(groovy源代码,groovy测试源代码)中,现在一切都正常了 <plugin> <groupId>org.codehaus.mojo</groupId>
谢谢。这里有人发现了。我将其添加到pom(groovy源代码,groovy测试源代码)中,现在一切都正常了
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-groovy-source</id>
<!-- before package phase -->
<phase>test</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/main/groovy</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-groovy-test-source</id>
<!-- before package phase -->
<phase>test</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/test/groovy</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
org.codehaus.mojo
构建助手maven插件
添加groovy源代码
测试
添加源
${basedir}/src/main/groovy
添加groovy测试源
测试
添加测试源
${basedir}/src/test/groovy
这里有人发现了。我将其添加到pom(groovy源代码,groovy测试源代码)中,现在一切都正常了
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-groovy-source</id>
<!-- before package phase -->
<phase>test</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/main/groovy</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-groovy-test-source</id>
<!-- before package phase -->
<phase>test</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/test/groovy</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
org.codehaus.mojo
构建助手maven插件
添加groovy源代码
测试
添加源
${basedir}/src/main/groovy
添加groovy测试源
测试
添加测试源
${basedir}/src/test/groovy
是的,我见过同样的事情。它不能正常工作。是的,我见过同样的事情。它不能正常工作。