对于Maven站点,标准映像目录为src/site/resources/images
。
不幸的是,我的asciidoc编辑器将图像复制到src/site/asciidoc/images
。我可以以某种方式将此目录添加到站点资源(如Maven resources plugin)?
答案 0 :(得分:1)
要将所有资源复制到outputDirectory,您只需在pom.xml-
中指定以下内容即可<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<!-- here the phase you need -->
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${basedir}/src/site/resources/images</outputDirectory>
<resources>
<resource>
<directory>src/non-packaged-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>