Skip to content

Fix maven compile warnings

Workum, Dirk-Jan van requested to merge fix_mvn_compile_warnings into develop

When running mvn compile, two warnings are given before compilation starts:

% mvn compile
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for nl.wur.bif:pantools:jar:4.1.1
[WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-compiler-plugin @ line 251, column 21
[WARNING] 'dependencies.dependency.scope' for org.junit:junit-bom:pom must be one of [provided, compile, runtime, test, system] but is 'import'. @ line 55, column 20
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]

Here, I fix these by moving junit-bom to dependencyManagement and by making maven-compiler-plugin unique in the pom.xml file.

Merge request reports