Quantcast
Channel: build-helper-maven-plugin adding additional source - Stack Overflow
Viewing all articles
Browse latest Browse all 3

build-helper-maven-plugin adding additional source

$
0
0

I am trying to add an additional source folder to my current maven project by using build-helper-maven plugin.

This source folder contains some common classes, like utility classes.

For that, here is my relevant pom.xml

<plugin><groupId>org.codehaus.mojo</groupId><artifactId>build-helper-maven-plugin</artifactId><version>1.9.1</version><executions><execution><id>add-source</id><phase>generate-sources</phase><goals><goal>add-source</goal> </goals><configuration><sources><source>C:/Users/CommonIncludes/src</source></sources></configuration></execution></executions></plugin>

Eclipse is showing the following error :

Build path entry is missing.Project->Right Click->Java build path->Source->

Project/Users/CommonIncludes/src(missing)

Here the additional source location : "C:/Users/CommonIncludes/src" is outside of the workspace of the current project. But eclipse always treating this as a location from current project.

I am using Eclipse 4.3 and m2e.How can I overcome this error through MAVEN, so that Eclipse can identify the linked source from correct location.? Or is there any alternate way to do this using MAVEN?

Any help will be greatly appreciated. Thanks in advance.


Viewing all articles
Browse latest Browse all 3

Trending Articles