使用 Maven-Eclipse 覆盖本地 Maven 存储库中生成的目标?

发布于 2024-09-17 18:09:55 字数 845 浏览 12 评论 0原文

Maven 不会覆盖本地存储库中 Eclipse 项目的构建版本。我只更改了 META-INF/MANIFEST.MF 文件,但 Maven 似乎无法识别该文件,因此不会覆盖本地存储库中的工件。我怎样才能强制它覆盖?这是 Maven 日志:

[INFO] 
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ message ---
[INFO] 
[INFO] --- maven-install-plugin:2.3:install (default-install) @ message ---
[INFO] **Skipped re-installing C:\dev\ws\Message\target\message-0.0.1.jar to C:\Users\Tim\.m2\repository\samba\message\message\0.0.1\message-0.0.1.jar, seems unchanged**
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.915s
[INFO] Finished at: Fri Sep 03 15:22:12 CEST 2010
[INFO] Final Memory: 7M/175M
[INFO] ------------------------------------------------------------------------

Maven won't overwrite the built version of an eclipse project in my local repository. I only changed a META-INF/MANIFEST.MF file, but Maven doesn't seem to recognize that and therefore doesn't overwrite the artifacts in the local repository. How can I force it to overwrite? This is the maven log:

[INFO] 
[INFO] --- maven-jar-plugin:2.2:jar (default-jar) @ message ---
[INFO] 
[INFO] --- maven-install-plugin:2.3:install (default-install) @ message ---
[INFO] **Skipped re-installing C:\dev\ws\Message\target\message-0.0.1.jar to C:\Users\Tim\.m2\repository\samba\message\message\0.0.1\message-0.0.1.jar, seems unchanged**
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.915s
[INFO] Finished at: Fri Sep 03 15:22:12 CEST 2010
[INFO] Final Memory: 7M/175M
[INFO] ------------------------------------------------------------------------

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

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

发布评论

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

评论(3

走野 2024-09-24 18:09:55

好吧,我想我刚刚看到 Maven 没有将 METAINF/MENIFEST.MF 文件与目标中的其他文件一起部署。看来我必须以某种方式解决这个问题。抱歉,我是 Maven 新手。

Okay, I think I just saw that Maven doesn't deploy the METAINF/MENIFEST.MF file with the other files in the targets. Seems I have to work on that somehow. Sorry, I'm new to Maven.

苍风燃霜 2024-09-24 18:09:55

将 RELEASE 版本与 Maven 一起使用时要小心。您不应该“重新部署”它们 - 因为合同规定它们永远不会再改变。如果您将 RELEASE 版本部署到全局 Maven 存储库(例如 Nexus),您将无法再次重新部署它。如果需要更改,您必须构建新版本。

在开发阶段使用 SNAPSHOT 版本 (0.0.1-SNAPSHOT)。这些可以更改和重新部署。

如果您只使用本地存储库,则规则不是那么严格,但您应该了解 RELEASE / SNAPSHOT 版本差异。

Be careful when using RELEASE Versions with maven. You should not "redeploy" them - as the contract is that they will never change anymore. If you deploy a RELEASE Version to a global Maven repository (e.g. Nexus) you will not be able to redeploy it again. You have to build a new Version if changes are necessary.

In phases of development use SNAPSHOT Versions (0.0.1-SNAPSHOT). These can be changed and redeployed.

If you are only working with your local repository the rules are not that strong but you should know about the RELEASE / SNAPSHOT version differences.

旧街凉风 2024-09-24 18:09:55

问题是我使用捆绑插件来生成 osgi 捆绑包。通过这些,捆绑插件生成它自己的 MANIFEST.MF 文件,并且不使用我放入资源中的文件。事实上,当我尝试使用自己的 MANIFEST.MF 文件以及捆绑插件生成的文件时,我也遇到了一些错误。

The problem was that I used the bundle plugin to generate osgi bundles. With these, the bundle plugin generates it's own MANIFEST.MF file and doesn't use the file that I put into my resources. In fact I also got some error when I tried to use my own MANIFEST.MF file in addition to the one generated by the bundle plugin.

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