gpt4 book ai didi

java - mvn 站点仅创建 css、图像和 Web-Inf 文件夹

转载 作者:行者123 更新时间:2023-12-03 04:36:25 24 4
gpt4 key购买 nike

当我运行 mvn site:run 并转到 localhost:8080 时,我只看到 3 个文件夹:

  • CSS
  • 图片
  • 网络信息

如何获取index.html文件?或者我应该在哪里创建index.html?

pm.xmlsite/

<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<port>9000</port>
<tempWebappDirectory>
${basedir}/src/documentation/src/site
</tempWebappDirectory>
</configuration>
</plugin>
</plugins>
</build>
</project>

最佳答案

也许类似以下项目结构的东西适合您:

<project>
+- src/
+- site/
+- apt/
| +- apt-files
| +- index.apt <-- index file
|
|- fml/ <-- optional ...
| +- fml-files
|
|- ....
| +- ...
|
|- resources/
| +- css/
| +- images/
|
`- site.xml <-- this must be configuered appropriately

还需配置以下内容才能部署:

  <distributionManagement>
<site>
<id>site</id>
<url>http://host.coom/site</url>
</site>
</distributionManagement>

关于java - mvn 站点仅创建 css、图像和 Web-Inf 文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5276387/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com