【发布时间】:2014-02-28 07:38:36
【问题描述】:
我需要使用 maven(pom.xml) mvn clean install 命令为我的 spring 框架项目创建战争。我的项目 SpringMVC 文件夹包含 jsp 和 src 文件夹 src 中的所有文件夹都在 web-inf 内创建,但我需要在 web-inf 之外创建 jsp 和其他文件夹。
pom.xml 构建标签代码
<build>
<finalName>SpringMVC</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<webResources>
<resource>
<!-- this is relative to the pom.xml directory -->
<directory>resource2</directory>
</resource>
</webResources>
</configuration>
</plugin>
</plugins>
</build>
在 web-inf 附近没有创建 war 文件 jsp 文件夹。我不知道还能尝试什么。
我预期的输出文件夹结构
SpringMVC.war
|-- META-INF
| |-- MANIFEST.MF
| `-- maven
| `-- com.example.projects
| `-- documentedproject
| |-- pom.properties
| `-- pom.xml
|-- WEB-INF
| |-- classes
| | |-- com
| | | `-- example
| | | `-- projects
| | | `-- SampleAction.class
| | `-- images
| | `-- sampleimage.jpg
| `-- web.xml
|-- external-resource.jpg
|-- image2
| `-- external-resource2.jpg
|-- index.jsp
`-- jsp
`-- websource.jsp
【问题讨论】:
-
你能告诉你文件夹布局和你想把哪个目录放到war文件中吗?
-
请编辑您的答案,不要将其作为命令发布
标签: java spring maven web-applications directory-structure