日食 (STS) +梅文
我基本上有两个问题:
- 有没有办法从 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以 在 eclipse 中打开一个 shell,cd 进入正确的目录并从那里运行 Maven 控制台。但是,当使用 M2Eclipse(参见下一点)时,您不应该运行 eclipse:eclipse。
STS 捆绑了 M2Eclipse,后者附带了 Maven 的嵌入式版本(因此它不会“解压”Maven)。但您可以将 M2Eclipse 配置为使用外部版本。转到窗口>偏好>梅文>安装和添加...您的外部安装:
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
.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:
尝试 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/