m2eclipse、subclipse - 检查 Web 应用程序
在 SVN 存储库浏览器中,我可以右键单击“trunk”,这使我可以选择“作为 Maven 项目签出”。我有两个问题:
- 当它签出项目时,它给出目录结构 mavenxxxx >树干>源代码。我如何配置它,使其成为 MyProjectName > src 并跳过 trunk 文件夹并仅检查其内容?
- 当我检查我的项目时,它显示为一个 java 项目,而我希望它是一个 Web 应用程序项目,它是否应该从我的 pom 文件中识别出它是一个 Web 应用程序,或者我是否必须遵循任何其他附加操作配置步骤?
谢谢
In the SVN repository browser I can right click on 'trunk' which gives me the option to 'checkout as maven project'. I have two problems:
- When it checks out the project, it is giving it the directory structure mavenxxxx > trunk > src. How do I configure this so it is MyProjectName > src and skip the trunk folder and only check out it's contents?
- When I check out my project it appears as a java project when I want it to be a web application project, is it supposed to be picking up that it is a web application from my pom file, or do I have to follow any other additional steps to configure it?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
从 SVN 签出
听起来您在签出项目时没有选择“trunk”文件夹。如果您的项目名称是 Mavenxxxx 并且您在签出时选择“Mavenxxxx”,那么您将看到您所描述的行为。
在您的帖子中,您说您确实做到了,事实上,右键单击因此,我建议您以另一种方式检查您的项目:
如果出现这种情况不起作用,那么项目的根级别必须有一个名为“trunk”的文件夹。
启用Web应用程序项目
回答您的问题:
您想要做的是改变项目的性质。这不能通过 POM 文件来完成。
相反,右键单击您的项目,转到“Project Facets”部分。
您应该能够将其设置为 Web 应用程序项目。
如果您看到一个链接,上面写着“转换为多面形式...”,那么就这样做。接下来,选择与 WebApps 相关的方面。我没有针对 Web 应用程序项目的 eclipse 设置,因此我无法告诉您您将看到的确切措辞。我认为您需要 面向 Java 开发人员的 Eclipse IDE看到了,我有 J2EE 版本。
我希望这有帮助...
Check Out From SVN
It sounds like you are not selecting the "trunk" folder when you checkout your project. If your project name is Mavenxxxx and you select 'Mavenxxxx" when you check out, then you will get see the behavior you've described.
In your post, you said you did, in fact, right-click on "trunk." So I would suggest checking out your project another way. Try this:
If that doesn't work, then there must be folder at the root level of your project named "trunk." As in Mavenxxxx > trunk > trunk.
Enable Web Application Project
To answer your question:
What you are trying to do is change the nature of your project. That can't be done from the POM file.
Instead, right click your project, go to the "Project Facets" section.
That is where you should be able to set it as a web application project.
If you see a link that says, "convert to faceted form..." then do that. Next, choose the facet related to WebApps. I don't have my eclipse setup for Web Application projects so I can't tell you the exact wording that you'll see. I think you need the Eclipse IDE for Java Developers to see that and I have the J2EE version.
I hope that helps...
您提到您正在使用 Subclipse,我强烈建议您使用 Subversive SVN Team Provider 而不是 Subclipse。 gmale 的指令应该从那时起起作用。
You mentioned that you're using Subclipse, I highly recommend using Subversive SVN Team Provider over Subclipse. gmale's instructions should work from that point on.