我有这样的项目。
MainProject
|
+- SubProject1
|
+- SubProject2
|
+- SubProject3
我正在尝试执行MVN SITE命令。我可以在项目信息部分设置所有其他部分。
所有子模块的POM.XML都有SubProject1条目。
这就是我能够在Project Modules Section中看到该模块名称的原因。
但是当我试图点击子模块链接时,它正在寻找PARENT PROJECT下的HTML文件,所以这样的事情。
MainProject /目标/站点/ SubModule1 / index.html中
实际上那个位置我找不到任何东西。那么MultiModule结构SITE创建的正确方法是什么?
寻找一些好的多模块材料或网站,以便阅读并解决我的问题。或者,如果你有任何POM.XML使用它,请在这里发布。
答案 0 :(得分:0)
实际上,IDE(Eclipse?)中的层次结构并不遵循运行site:deploy(使用distributionManagement部分)时将生成的层次结构。
当您使用site:deploy生成网站时,它会将所有元素放入(例如apache http server convention):
/var/htdocs/
|
+- /MainProject
|
+---/SubProject1
| |
| +--- /index.html
|
+--- /SubProject2
| |
| +--- /index.html
|
+--- /SubProject3
| |
| +--- /index.html
|
+--- /index.html
你的身体在你的工作区:
D:/workspace/
|
+- /MainProject
|
+---/SubProject1
| |
| +--- /target
| | |
| | +--- /index.html
|
+--- /SubProject2
| |
| +--- /target
| | |
| | +--- /index.html
|
+--- /SubProject3
| |
| +--- /target
| | |
| | +--- /index.html
|
+--- /target
| |
| +--- /index.html
因此,在根项目和文件之间比在部署时更多。此结构不适用于针对站点创建的链接:deploy:)
如果我对你的问题有误,请告诉我,但这听起来很常见。