简体   繁体   English

Groovy Maven插件,将目标存根标记为源目录

[英]Groovy Maven plugin, marking target stub as source directory

I am using gmavenplus-plugin, below is the configuration details 我正在使用gmavenplus-plugin,下面是配置详细信息

  <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
                <version>1.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>addSources</goal>
                            <goal>addTestSources</goal>
                            <goal>generateStubs</goal>
                            <goal>compile</goal>
                            <goal>generateTestStubs</goal>
                            <goal>compileTests</goal>
                            <goal>removeStubs</goal>
                            <goal>removeTestStubs</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

After each time maven clean build, intellij's settings gets updated and it maker generated stub as source and test source folders. 每次执行maven clean build之后,intellij的设置都会更新,并且它会生成存根作为源文件夹和测试源文件夹。 Ideally goal removeStubs and removeTestStubs should remove it from source. 理想情况下,目标removeStubs和removeTestStubs应该将其从源中删除。 All examples on internet is based on above configuration only. 互联网上的所有示例仅基于上述配置。

Am I missing something. 我错过了什么吗?

The way IntelliJ hooks into the GMavenPlus (and GMaven) lifecycle was by expecting specific goal names. IntelliJ挂接到GMavenPlus(和GMaven)生命周期的方式是通过预期特定的目标名称。 1.6 fixes this by renaming the goals to match IntelliJ's expectations. 1.6通过重命名目标以符合IntelliJ的期望来解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM