m2eclipse、subclipse - 检查 Web 应用程序

发布于 2024-12-20 09:04:06 字数 305 浏览 2 评论 0原文

在 SVN 存储库浏览器中,我可以右键单击“trunk”,这使我可以选择“作为 Maven 项目签出”。我有两个问题:

  1. 当它签出项目时,它给出目录结构 mavenxxxx >树干>源代码。我如何配置它,使其成为 MyProjectName > src 并跳过 trunk 文件夹并仅检查其内容?
  2. 当我检查我的项目时,它显示为一个 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:

  1. 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?
  2. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

朮生 2024-12-27 09:04:06

从 SVN 签出

听起来您在签出项目时没有选择“trunk”文件夹。如果您的项目名称是 Mavenxxxx 并且您在签出时选择“Mavenxxxx”,那么您将看到您所描述的行为。

在您的帖子中,您说您确实做到了,事实上,右键单击因此,我建议您以另一种方式检查您的项目:

  1. “文件”>“新建”>“其他”...
  2. 键入“SVN”
  3. ,选择“来自 SVN 的项目”,
  4. 然后单击“下一步”。 “然后选择/创建您的存储库并单击“下一步”
  5. 单击“浏览...”并导航到您的项目
  6. 突出显示“trunk”文件夹并单击“确定”,然后单击“完成”
  7. 在弹出窗口中,选择“签出指定名称的项目”
  8. 单击“完成”

如果出现这种情况不起作用,那么项目的根级别必须有一个名为“trunk”的文件夹。


启用Web应用程序项目

回答您的问题:

...它应该从我的网络应用程序中识别出它是一个网络应用程序吗?
pom 文件,或者我是否必须执行任何其他附加步骤才能
配置它吗?

您想要做的是改变项目的性质。这不能通过 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:

  1. File > New > Other...
  2. Type "SVN"
  3. Select "Project from SVN"
  4. Click "Next" then choose/create your repository and click "Next"
  5. Click Browse... and navigate to your project
  6. Highlight the "trunk" folder and click "Ok" then click "Finish"
  7. In the popup window, choose "Check out project with the name specified"
  8. Click "Finish"

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:

...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?

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...

本王不退位尔等都是臣 2024-12-27 09:04:06

您提到您正在使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文