如何配置maven和intellij以包含groovy和java的参数编译器标志
嘿,我之所以写这篇文章,是因为我花了一些时间试图配置Jackson的ObjectMapper,使其在DTO上没有如何配置maven和intellij以包含groovy和java的参数编译器标志,java,maven,intellij-idea,groovy,jackson,Java,Maven,Intellij Idea,Groovy,Jackson,嘿,我之所以写这篇文章,是因为我花了一些时间试图配置Jackson的ObjectMapper,使其在DTO上没有@JsonCreator和@JsonProperty注释的情况下工作。我想要实现的结果是能够在intellij和maven控制台中运行Spock的测试(groovy)。因为这个问题已经解决:intellij在maven配置下自动拾取: <plugin> <groupId>org.apache.maven.plugins</groupId>
@JsonCreator
和@JsonProperty
注释的情况下工作。我想要实现的结果是能够在intellij和maven控制台中运行Spock的测试(groovy)。因为这个问题已经解决:intellij在maven配置下自动拾取:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-parameters</compilerArgument>
<testCompilerArgument>-parameters</testCompilerArgument>
</configuration>
</plugin>
<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>
org.apache.maven.plugins
maven编译器插件
-参数
-参数
另外,如果您想在groovy中使用Spock进行测试,则需要以下插件配置:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-parameters</compilerArgument>
<testCompilerArgument>-parameters</testCompilerArgument>
</configuration>
</plugin>
<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>
org.codehaus.gmavenplus
gmavenplus插件
${gmavenplus plugin.version}
真的
编译
编译测试
附加信息: