Search
Calendar
September 2017
S M T W T F S
« Sep    
 12
3456789
10111213141516
17181920212223
24252627282930
Your widget title
Archives

Posts Tagged ‘Maven 3’

PostHeaderIcon Maven 3: ‘build.plugins.plugin[…].dependencies.dependency.scope’ for … must be one of [compile, runtime, system] but is ‘test’

Case

I am migrating a project from Maven 2 to Maven 3. Fortunately, Maven 3 is said to be mostly back-compatible with Maven 2.
Anyway, on first build, I got this message:

[INFO] Scanning for projects...
[ERROR] The build could not read 3 projects -> [Help 1]
[ERROR]
[ERROR]   The project lalou.jonathan.rmi-server:1.10.0-SNAPSHOT (C:\workarea\...\pom.xml) has 2 errors
[ERROR]     'build.plugins.plugin[org.codehaus.mojo:weblogic-maven-plugin].dependencies.dependency.scope' for org.slf4j:slf4j-log4j12:jar must be one of [compile, runtime, system]
but is 'test'. lalou.jonathan:rmi-server:${project.parent.version}, C:\workarea\...\pom.xml, line 103,
column 32

Quick fix

Introduce a tag pluginManagement between build and plugins, ie replace:

	<build>
(...)
		<plugins>
(...)

with:

	<build>
(...)
		<pluginManagement>
			<plugins>
(...)