dukable
dukable

Reputation: 4058

Maven Project using Eclipse doesn't compile

I have been trying to make a simple Spring project using Eclipse and Maven but I am running into problems. The first one I am trying to resolve is the fact that my code doesn't seem to compile.

For example, if in a class I type Strrrring test = new String(); there is not error at all displayed by Eclipse. I checked the Properties of the project, under Java Compiler and everything seems to be fine.

Upvotes: 1

Views: 6309

Answers (2)

Som
Som

Reputation: 4728

Right click the project and do run as maven clean and maven install . It will work fine .

Upvotes: 0

Pau Kiat Wee
Pau Kiat Wee

Reputation: 9505

Command Line

If you have maven installed, you can make maven project working in Eclipse via mvn command. At the root of the project run:

mvn eclipse:eclipse

If you want to view the source/doc of the artifact used in your project, you can run following command instead:

mvn eclipse:eclipse -DdownloadSources=true

Eclipse Plugin

Or if you prefer use Eclipse plugin, you can install m2eclipse plugin and re-import project

Upvotes: 2

Related Questions