日食 (STS) +梅文

发布于 2024-08-23 14:22:50 字数 261 浏览 4 评论 0原文

我基本上有两个问题:

  • 有没有办法从 Eclipse 调用 Maven 控制台? (我可以在其中编写 eclipse:eclipse,它开始构建 eclipse 项目)
  • 在哪里STS解压它的maven?我想将该路径添加到环境变量中,以便我可以从 Windows 控制台使用它。

I basically have 2 questions:

  • Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse, and it started building eclipse project)
  • Where does STS unpack it's maven? I'd like to add that path to env variables, so that I could use it from my windows console.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

执手闯天涯 2024-08-30 14:22:50

有没有办法从 Eclipse 调用 Maven 控制台? (我可以在其中编写 eclipse:eclipse,然后它开始构建 eclipse 项目)

您可以 在 eclipse 中打开一个 shell,cd 进入正确的目录并从那里运行 Maven 控制台。但是,当使用 M2Eclipse(参见下一点)时,您不应该运行 eclipse:eclipse。

STS 在哪里解压它的 Maven 包?我想将该路径添加到环境变量中,以便我可以从 Windows 控制台使用它。

STS 捆绑了 M2Eclipse,后者附带了 Maven 的嵌入式版本(因此它不会“解压”Maven)。但您可以将 M2Eclipse 配置为使用外部版本。转到窗口>偏好>梅文>安装添加...您的外部安装:

替代文字

Is there a way to invoke maven console from eclipse? (where I could write eclipse:eclipse, and it started building eclipse project)

You could open a shell inside eclipse , cd into the right directory and run the maven console from there. But, when using M2Eclipse (see next point), you're not supposed to run eclipse:eclipse.

Where does STS unpack it's maven? I'd like to add that path to env variables, so that I could use it from my windows console.

STS bundles M2Eclipse which comes with an embedded version of Maven (so it doesn't "unpack" Maven). But you can Configure M2Eclipse to use an external version. Go to window > Preference > Maven > Installations and Add... your external install:

alt text

獨角戲 2024-08-30 14:22:50

尝试 sonatype 中的 m2eclipse 插件,您可以完全消除使用“mvn eclipse:eclipse”。安装m2eclipse并重新启动eclipse后,选择File->Import->Maven->Existing Maven project。浏览到您的 Maven 项目并选择它。 m2eclipse 插件读取 pom 并创建一个 eclipse 项目(这是“mvn eclipse:eclipse”给出的步骤)。 m2eclipse 插件还有其他有用的功能,包括 pom 编辑器。

m2eclipse 项目正在从 sonatype 转移到 eclipse 基金会项目页面,并将在 Indigo 列车上发布。

有关 m2eclipse 的更多信息,请参阅此页面:http://m2eclipse.sonatype.org/

Try the m2eclipse plugin from sonatype and you can eliminate use of 'mvn eclipse:eclipse' altogether. After installing m2eclipse and restarting eclipse, select File->Import->Maven->Existing Maven project. Browse to your maven project and select it. The m2eclipse plugin reads the pom and creates an eclipse project (this is the step that 'mvn eclipse:eclipse' gives). There are other useful features of the m2eclipse plugin including pom editor.

m2eclipse project is moving out of sonatype into the eclipse foundation project page and will be released on the Indigo train.

See this page for more info on m2eclipse: http://m2eclipse.sonatype.org/

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