尝试连接模块 pom 和父 pom。如何设置相对路径?
我还没有找到合适的例子,所以我在这里问:
我的项目结构是
workspace
|
|-->plugins
| |
| --> some.plugin.folder
| |
| --> parentpom.xml
|
|-->tests
|
|-->some.test.plugin.folder
|
|--> pom.xml
好的,我可以在parentpom.xml中添加测试模块。
<module>../tests/some.test.plugin.folder</module>
但我一生都无法在测试插件的 pom.xml 中找到父 pom 的正确相对路径。
<parent>
...
<relativePath>../../plugins/parentpom.xml</relativePath>
</parent>
有人可以帮助我吗?或者不可能使用两个 ../ ?
I haven't found an appropriate example for this, so I ask here:
My project structure is
workspace
|
|-->plugins
| |
| --> some.plugin.folder
| |
| --> parentpom.xml
|
|-->tests
|
|-->some.test.plugin.folder
|
|--> pom.xml
Okay, I can add test modules in the parentpom.xml.
<module>../tests/some.test.plugin.folder</module>
But I can't for the life of me find the correct relative path to the parent pom in the pom.xml of the test plugin.
<parent>
...
<relativePath>../../plugins/parentpom.xml</relativePath>
</parent>
Can someone help me? Or is it impossible to use two ../ ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
模块中名为 some.test.plugin.folder 的相对路径应该只是路径,不包含文件名。它应该是:
此外,您的父模块应该有一个
pom.xml
,因此将parentpom.xml
重命名为pom.xml
。The relative path in your module called some.test.plugin.folder should be a path only and not contain a file name. It should be:
Also your parent module should have a
pom.xml
, so renameparentpom.xml
topom.xml
.