![](/img/trans.png)
[英]How to configure groovydoc (for gradle) to generate documentation for both java and groovy source
[英]How to configure maven and intellij to include parameters compiler flag for both groovy and java
嘿,我正在寫這篇文章,因為我花了一些時間試圖將Jackson的 ObjectMapper配置為在我的DTO上沒有@JsonCreator
和@JsonProperty
批注的情況下工作。 我想要達到的結果是能夠在intellij和使用Maven的控制台中運行Spock的測試(常規)。
由於此問題已解決: https: //youtrack.jetbrains.com/issue/IDEA-125737 intellij自動在以下Maven配置下進行安裝:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-parameters</compilerArgument>
<testCompilerArgument>-parameters</testCompilerArgument>
</configuration>
</plugin>
另外,如果您想使用Spock在Groovy中進行測試,則需要以下插件配置:
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>${gmavenplus-plugin.version}</version>
<configuration>
<parameters>true</parameters>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>compileTests</goal>
</goals>
</execution>
</executions>
</plugin>
加上其他信息:
我希望這可以節省一些時間:)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.