2016-10-23 5 views

答えて

0

Mavenのものはまったく同じようには動作しません。

maven-resources-pluginでこれを行う場合は、これはできません。

回避策として、maven-antrun-pluginを使用して、そこからプロパティの変更とコピーを実行したいことがあります。

0
<plugins> 
<plugin> 
     <groupId>org.codehaus.mojo</groupId> 
     <artifactId>build-helper-maven-plugin</artifactId> 
     <version>1.7</version> 
     <executions> 
      <execution> 
      <id>regex-property</id> 
      <goals> 
       <goal>regex-property</goal> 
      </goals> 
      <configuration> 
       <name>tag.version</name> 
       <value>${project.version}</value> 
       <regex>\.</regex> 
       <replacement>_</replacement> 
      </configuration> 
      </execution> 
     </executions> 
     </plugin> 
      <plugin> 
     <artifactId>maven-resources-plugin</artifactId> 
     <version>3.0.1</version> 
     <executions> 
      <execution> 
      <id>copy-resources</id> 
      <!-- here the phase you need --> 
      <phase>validate</phase> 
      <goals> 
       <goal>copy-resources</goal> 
      </goals> 
      <configuration> 
       <outputDirectory>${basedir}/target/extraresources</outputDirectory> 
       <resources> 
       <resource> 
        <directory>src/main/resources/${migration}</directory> 
        <targetPath>db/oracle/${migration}</targetPath> 
       </resource> 
       </resources> 
      </configuration> 
      </execution> 
     </executions> 
     </plugin> 
<plugins> 
関連する問題