2017-03-03 57 views

回答

1

所有的资源复制到输出目录,你可以简单地指定按照您的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> 

来源 - Example from the plugin itself.