Reputation: 1161
Hey I am writing this since I spent some time trying to configure Jackson's ObjectMapper to work without @JsonCreator
and @JsonProperty
annotations on my DTOs. The result I wanted to achieve is to be able to run Spock's tests (groovy) in both intellij and in console with maven.
Upvotes: 0
Views: 916
Reputation: 1161
Since this issue is resolved: https://youtrack.jetbrains.com/issue/IDEA-125737 intellij automatically picks up below maven configuration:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgument>-parameters</compilerArgument>
<testCompilerArgument>-parameters</testCompilerArgument>
</configuration>
</plugin>
Also if you want to use Spock for testing in groovy you need following plugin configuration:
<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>
plus additional information:
I hope this saves someone some time :)
Upvotes: 1