[英]Eclipse Spring Maven project
I'm kind of new to Eclipse. 我是Eclipse的新手。
So I installed the latest Eclipse Juno, m2e and SpringIDE. 因此,我安装了最新的Eclipse Juno,m2e和SpringIDE。
I failed ho understand how to create a Maven Spring project with the above combination of software. 我未能理解如何使用上述软件组合来创建Maven Spring项目。
The only options that Eclipse UI gives me is either a Maven project, or a Spring project: Eclipse UI给我的唯一选择是Maven项目或Spring项目:
I know that it IS possible to have a Maven/Spring project in Eclipse, and I actually have one: 我知道这是可能有在Eclipse一个Maven / Spring项目,实际上我有一个:
But to make it possible I had to create a Spring project and to manually edit its .project file to include Maven nature and build command: 但是要使其成为可能,我必须创建一个Spring项目并手动编辑其.project文件以包括Maven性质和构建命令:
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.springframework.ide.eclipse.core.springbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
and .project file to include build path: 和.project文件以包含构建路径:
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
Question: 题:
How do I do that from Eclipse UI without .project file modification? 我如何在不修改.project文件的情况下从Eclipse UI中做到这一点?
It there any way I can add natures to Eclipse projects from UI? 有什么方法可以从UI向Eclipse项目中添加性质吗?
Thanks 谢谢
尝试在项目资源管理器中右键单击项目->配置->转换为Maven项目
This option is available eg when using SpringSource Toolsuite 这个选项是可用的,例如当使用SpringSource Toolsuite时
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.