Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
IntelliJ没有下载groovy项目的Maven源代码_Maven_Intellij Idea_Groovy - Fatal编程技术网

IntelliJ没有下载groovy项目的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>

我发现“下载源代码”对我们所有的Java项目都非常有用。但我并没有让它在Groovy项目中工作——它并没有出错,我们只是没有在IntelliJ中显示正确的源代码

IntelliJ或Maven中是否有某种配置可以实现这一点


谢谢。

这里有人发现了。我将其添加到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

是的,我见过同样的事情。它不能正常工作。是的,我见过同样的事情。它不能正常工作。