3

I'm working on java 1.6 on eclipse. Yesterday, i tried to compile it to a runnable jar, but it didn't work. So , finnaly i tried to change the java version and i still can't compile the project. Then i tried to convert my project to Maven. Finally, i use this solution : How do I remove Maven from a Eclipse java project? But now, when i launch the project i have the error : 'Launching app' has encountered a problem. could not read maven project

in details i can read '...[FATAL] Non-readable-pom...' But i disable maven project.

And when i click ok, i can run my app, but i have a new pb what is 'the main class is not found'. I read on the net it's probably due to the java version changing.

Now, i'm looking to make the project as yesterday before those actions. I use git, so i tried to come back to the last commit but it doesn't work.

Could you give me some way or solutions?

ty, Olivier

Community
  • 1
  • 1
Olivier
  • 33
  • 1
  • 1
  • 9

3 Answers3

4

This helped to me:

Exit Eclipse.

Delete the .metadata folder in your workspace.

Start Eclipse.

After that you can import all your projects import -> General -> existing project into eclipse. From root directory you can choose all your projects.

slfan
  • 8,950
  • 115
  • 65
  • 78
user2557845
  • 49
  • 2
  • 5
1

Had the same problem: I removed the maven aspect and the pom. The project ran fine until I restarted Eclipse the next day and got the "Non-readable-pom"

What fixed it for me was (1) edit the .classpath and remove all "pom-derived" annotations there (2) remove the m2e stuff from the .settings directory.

anonymous
  • 11
  • 1
0

Had sameproblem: I figured the .. section in pom.xml was empty. Added 'groupId' and 'artifactId' there.Then in Eclipse: Right click Project -> Maven -> 'Update Project' It worked.

Amol
  • 1
  • 1