cancel
Showing results for 
Search instead for 
Did you mean: 

Code completion in eclipse: this compilation unit is not on the build path of a java project

b_schnarr
Champ in-the-making
Champ in-the-making
Hello at all,

I imported the activiti project from git into my eclipse workspace using the git import function. After that, I converted the project into a maven project. But when I try to use the code completion, I get the following error in eclipse: this compilation unit is not on the build path of a java project

Can anyone help me with this?

Best regards and thanks
Ben
6 REPLIES 6

b_schnarr
Champ in-the-making
Champ in-the-making
This here answered my question: http://stackoverflow.com/questions/2206572/eclipse-this-compilation-unit-is-not-on-the-build-path-of....

There you can read: When using maven with multiproject and a parent project make sure you're not editing the file in the maven parent project.

jbarrez
Star Contributor
Star Contributor
Yes - indeed.

The way I always do it is simply import it in Eclipse using the maven plugin.
Point it to the root POM, and it will include the root + all modules.

b_schnarr
Champ in-the-making
Champ in-the-making
I downloaded the zip-file from github. When I try to import the whole project using the eclipse maven plugin, eclipse hangs on the step "Validating activiti-engine /activiti-engine/src/test/resources/org/activiti/engine/test/api/repository/BpmnWithUnsafeContentXmlContent.bpmn20.xml (see this picture: https://www.dropbox.com/s/g2uucprtbl0fc1c/validation.PNG)

I simply did File –> Import –> Existing Maven Projects

Therefore, eclipse can not build the project. Did I something wrong?

b_schnarr
Champ in-the-making
Champ in-the-making
I tried to build the project with mvn clean compile deploy -e
Maven tried to fetch files from https://oss.sonatype.org/service/local/staging/deploy/maven2/ which is password protected. I tried to build the official 5.15-Tag.
Could anyone help me?
Thanks and best regards
Ben

b_schnarr
Champ in-the-making
Champ in-the-making
After installing "tycho project configurators" and after disabling the xml validations in eclipse, everything worked fine.

jbarrez
Star Contributor
Star Contributor
The xml validation error is due to http://www.jorambarrez.be/blog/2013/02/19/uploading-a-funny-xml-can-bring-down-your-server/

Indeed, if you're using Eclipse EE edition, xml validation is enabled by default.