如何在eclipse中构建基于maven java的项目

发布于 2024-11-19 13:59:22 字数 229 浏览 5 评论 0原文

我必须使用 Maven2 导入一个项目。到目前为止,我安装了 eclipse gallelio,然后安装了软件 eclipse IAM 和 apache maven。

然后我使用快速启动 Maven 架构创建一个新的 Maven2 项目。之后,我将我的 java 项目导入到这个 Maven 架构文件夹中。

现在我不知道如何将这个项目作为 Maven 架构运行。我必须创建一个我的源罐子

请帮助我

I have to import a project with Maven2. So far i installed eclipse gallelio then installed the software eclipse IAM and apache maven.

Then i create an new maven2 project with quickstart maven architecture. After that i import my java project into this maven architecture folder.

Now i don't know how to run this project as a maven architecture. I have to create a jar of my source

Please help me in this

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

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

发布评论

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

评论(4

迷你仙 2024-11-26 13:59:22

如果您只想/需要创建一个源 jar,则根本不需要使用 IDE。

只需在命令行执行mvn source:jar即可。生成的 JAR 将位于目标文件夹中。

除此之外:我不知道 IAM,但将 Eclipse 与 Maven 集成的首选方式是 m2e (以前称为m2eclipse)。

If you just want / need to create a source jar, there's no need to use an IDE at all.

Just execute mvn source:jar on the command line. The resulting JAR will be in the target folder.

Apart from that: I don't know IAM, but the preferred way to integrate Eclipse with Maven is m2e (formerly m2eclipse).

嘿哥们儿 2024-11-26 13:59:22

使用 Maven Source 插件 告诉 Maven 创建一个每个包装上都有源罐子。

Use the Maven Source plugin to tell Maven to create a source jar on every packaging.

倚栏听风 2024-11-26 13:59:22

有一些关于 IAM 的文章以前称为 q4e

如果您对 IAM 不是特别感兴趣, ,您可以看看m2eclipse,它比 IAM 进步了很多。

或者,您可以安装与 maven 插件捆绑在一起的 spring 工具套件

There are some articles on IAM previously called q4e

If you are not specifically intrested in IAM , you may have a look at m2eclipse which is much evolved than IAM.

Alternatively you can install spring tool suite which comes bundled with maven plugin

红焚 2024-11-26 13:59:22

我已经完全放弃了 Eclipse 插件而转而使用 Maven;他们总是给我带来痛苦。

通常我只是创建一个 M2_REPO 变量(在构建路径配置中),它指向本地 Maven 存储库并在命令行上运行“mvn eclipse:eclipse”。然后刷新后,您会看到 Maven 生成的 .project 和 .classpath,并且您可以在 Eclipse 中运行您的应用程序。

I've abandoned Eclipse plugins for Maven altogether; they always give me pain.

Normally I just create an M2_REPO variable (in build path configuration) which points to the local Maven repository and run 'mvn eclipse:eclipse' on the command line. Then after refreshing you see the Maven-generated .project and .classpath and you can run your application in Eclipse.

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