开发者

Issue with importing projects generated with Maven into Eclipse Indigo

开发者 https://www.devze.com 2023-04-04 08:54 出处:网络
I have problem importing projects into Eclipse Indigo, generated by Maven2 on the commandline by using mvn eclipse:eclipse -Dwtpversion=2.0

I have problem importing projects into Eclipse Indigo, generated by Maven2 on the commandline by using mvn eclipse:eclipse -Dwtpversion=2.0

Everything works fine on Eclipse Helios, my projects are impor开发者_JAVA技巧ted, no compilation errors at all.

Helios uses "artifactId" from my pom.xml as the name of the project. It seems as if Indigo uses the name of the directory instead of the name of the artifactId for the name of the project.

Has anyone experienced something similar? If so, what was the solution?

EDIT: I did notice there is a difference in embedded Maven in Eclipse: Helios (and older versions of Indigo) use 3.0-SNAPHSOT whereas the latest Indigo uses 3.0.2 . Could that be the reason?

Thank you, Jan


Ok, I found out what the problem was. Maven is not to blame, it is an Eclipse thing. There has been a discussion about whether it is a bug or not here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=344337

The answer is: Check out project files in a new SUBDIRECTORY in your workspace. Then everything works as it should, project name gets imported correctly. If you checkout, build and import your project files IN the workspace, Eclipse ignores project name in .project file.

0

精彩评论

暂无评论...
验证码 换一张
取 消