To solve the problem, add the following in the <build> element:

<pluginManagement>
	<plugins>
		<!--This plugin's configuration is used to store Eclipse m2e settings
			only. It has no influence on the Maven build itself. -->
		<plugin>
			<groupId>org.eclipse.m2e</groupId>
			<artifactId>lifecycle-mapping</artifactId>
			<version>1.0.0</version>
			<configuration>
				<lifecycleMappingMetadata>
					<pluginExecutions>
						<pluginExecution>
							<pluginExecutionFilter>
								<groupId>org.codehaus.mojo</groupId>
								<artifactId>build-helper-maven-plugin</artifactId>
								<versionRange>1.5</versionRange>
								<goals>
									<goal>add-source</goal>
								</goals>
							</pluginExecutionFilter>
							<action>
								<execute/>
							</action>
						</pluginExecution>
					</pluginExecutions>
				</lifecycleMappingMetadata>
			</configuration>
		</plugin>
	</plugins>
</pluginManagement>
 

Leave a Reply