Eclipse 中的 Maven:子级的更改不会显示在父级的文件中

发布于 2024-10-17 14:47:45 字数 503 浏览 1 评论 0原文

我在 eclipse (M2Eclipse) 中使用 Maven,并且我有一个多模块项目,我使用“作为 Maven 项目签出”将其带到我的工作区。

结构在 Eclipse 中似乎是扁平的,并且它有子项的重复项:父项在那里,所有子项都作为文件夹嵌套在其中(不显示子项内的包,因为包应该看起来像这样,但将它们作为嵌套的普通文件夹),此外,所有子项目都显示为父项目旁边的独立项目(在子项目下:包按其应有的方式显示,显示包图标,并且是点符号)。

因此,当我更改子项目中的文件时,父级子文件夹中的相应文件也会更改(我可以在 eclipse 中看到它们)。

它一直对我有用,我可以通过提交父项目来提交我的更改。

但是,突然就变了。我已经更改了子项目中的很多文件,但是这些更改不会显示在父项目中,并且我无法在一次提交中全部提交,我必须逐一提交每个子项目,这会增加大量提交并增加版本号是不必要的。 另外,这让我担心大会也不会采取最新的变化->不过我还没试过。

我将不胜感激任何帮助,我经常遇到 Maven 的问题! 谢谢

I'm using maven in eclipse (M2Eclipse), and I have a multi-module project which I used 'checkout as a maven project' to bring it to my workspace.

The structure seems to be flat in eclipse and it has duplicate of children: parent is there with all the children nested in it as folders (doesn't show the packages inside children as a package should look like, but has them as nested ordinary folders), also, all the children show up as independent projects beside the parent (under the children projects: the packages are shown as they should, the package icon is shown and it is dot notation).

So, when I change a file in a child project, the corresponding file in the parent's subfolders also changes (I can see them both in eclipse).

It has always worked for me, and I could commit my changes by just committing the parent project.

But, it suddenly changed. I have changed a lot of files in children's projects, but the changes don't show in the parent's project and I cannot commit them all in one commit, I will have to commit each child one by one which adds a lot of commits and increases the version number unnecessarily.
Also, it makes me worried that the assembly will also not take the latest changes-> I haven't tried it though.

I will appreciate any help, I get stuck with problems with maven frequently!!
Thanks

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

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

发布评论

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

评论(2

街道布景 2024-10-24 14:47:45

事情不会突然改变。您安装了任何新插件吗?检查您的安装历史记录。

您是否更改了首选项中的任何内容?全新安装 Eclipse 是否也会发生同样的情况?当您将首选项导入全新安装时,它会改变吗?

您使用哪种版本控制系统?

Things don't suddenly change. Did you install any new plug-ins? Check your install history.

Did you change anything in the preferences? Does the same happen with a fresh install of Eclipse? Does it change when you import the preferences into a clean install?

Which version control system do you use?

生活了然无味 2024-10-24 14:47:45

您是否在子模块项目上执行了 mvn install ?请尝试删除您的 m2 存储库目录。

问题似乎是 repo 目录中的 jar 子模块文件没有更新。

have you executed a mvn install on the sub-module projects? Please try to delete you m2 repository directory.

It'seems the problems is that the jars sub-modules files are not updated in the repo directory.

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