In fact I found how to do it and I publish my solution as an answer
In our pom.xml
, we refers the enunciate.xml path like this:
<plugin>
<groupId>org.codehaus.enunciate</groupId>
<artifactId>maven-enunciate-spring-plugin</artifactId>
<version>${enunciate.version}</version>
<configuration>
<configFile>src/conf/enunciate.xml</configFile>
</configuration>
<executions>
<execution>
<goals>
<goal>assemble</goal>
</goals>
</execution>
</executions>
</plugin>
and in the enunciate.xml
file:
<webapp postBase="web"></webapp>
which means the static resources can be put in src/conf/web/
and then my folder called images
will simply located in: src/conf/web/images
.
Like this all these static resources will be accessible by http://localhost:8080/myappcontext/images/
The enunciate documentation shows the option available for the webapp element:
- preBase is a folder or zipped archive which will be copied before the enunciate generation
- postBase is a folder of zipped archive which will be copied after the enunciate generation
For the images and other static resources there should not be any difference using one of these attributes.