Skip to content

Commit 4bc84da

Browse files
authored
Replace animal-sniffer with javac parameter (bramp#312)
* Replace animal-sniffer with javac parameter / maven.compiler.release property
1 parent 6966a23 commit 4bc84da

File tree

1 file changed

+14
-31
lines changed

1 file changed

+14
-31
lines changed

pom.xml

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
<properties>
4242
<base.java.version>1.8</base.java.version>
43+
<maven.compiler.source>${base.java.version}</maven.compiler.source>
44+
<maven.compiler.target>${base.java.version}</maven.compiler.target>
4345

4446
<powermock.version>1.5.2</powermock.version>
4547

@@ -243,11 +245,6 @@
243245
<artifactId>maven-surefire-plugin</artifactId>
244246
<version>3.2.1</version>
245247
</plugin>
246-
<plugin>
247-
<groupId>org.codehaus.mojo</groupId>
248-
<artifactId>animal-sniffer-maven-plugin</artifactId>
249-
<version>1.23</version>
250-
</plugin>
251248
<plugin>
252249
<groupId>org.codehaus.mojo</groupId>
253250
<artifactId>cobertura-maven-plugin</artifactId>
@@ -485,11 +482,6 @@
485482
<artifactId>extra-enforcer-rules</artifactId>
486483
<version>1.5.1</version>
487484
</dependency>
488-
<dependency>
489-
<groupId>org.codehaus.mojo</groupId>
490-
<artifactId>animal-sniffer-enforcer-rule</artifactId>
491-
<version>1.21</version>
492-
</dependency>
493485
</dependencies>
494486
<executions>
495487
<execution>
@@ -520,27 +512,6 @@
520512
</executions>
521513
</plugin>
522514

523-
<plugin>
524-
<groupId>org.codehaus.mojo</groupId>
525-
<artifactId>animal-sniffer-maven-plugin</artifactId>
526-
<executions>
527-
<execution>
528-
<id>check-java-api</id>
529-
<phase>test</phase>
530-
<goals>
531-
<goal>check</goal>
532-
</goals>
533-
<configuration>
534-
<signature>
535-
<groupId>org.codehaus.mojo.signature</groupId>
536-
<artifactId>java17</artifactId>
537-
<version>1.0</version>
538-
</signature>
539-
</configuration>
540-
</execution>
541-
</executions>
542-
</plugin>
543-
544515
<!-- Coverage reporting -->
545516
<plugin>
546517
<groupId>org.codehaus.mojo</groupId>
@@ -740,4 +711,16 @@
740711
</plugin>
741712
</plugins>
742713
</reporting>
714+
715+
<profiles>
716+
<profile>
717+
<id>set-compiler-release</id>
718+
<activation>
719+
<jdk>[9,)</jdk>
720+
</activation>
721+
<properties>
722+
<maven.compiler.release>${base.java.version}</maven.compiler.release>
723+
</properties>
724+
</profile>
725+
</profiles>
743726
</project>

0 commit comments

Comments
 (0)