Maven将源文件复制到文件夹

时间:2018-09-01 11:33:29

标签: maven

是否可以在最终编译之前将源文件从maven项目复制到文件夹?

1 个答案:

答案 0 :(得分:0)

您可以使用maven-antrun-plugin将文件复制到另一个目录。

<select 
  class="form-control same-group" 
  [(ngModel)]="selected" 
  (ngModelChange)="select($event)" 
  formControlName="age">
  <option 
    *ngFor="let x of collection" 
    [value]="x">
    {{x}}
  </option>
</select>

<select 
  class="form-control same-group" 
  [(ngModel)]="selected2" 
  (ngModelChange)="select2($event)" 
  formControlName="age2">
  <option 
    *ngFor="let x of collection2" 
    [value]="x">
    {{x}}
  </option>
</select>

通常在<plugin> <artifactId>maven-antrun-plugin</artifactId> <configuration> <tasks> <copy todir="dest"> <fileset dir="src"> <include name="**/*"/> </fileset> </copy> </tasks> </configuration> <executions> <execution> <phase>deploy</phase> <goals> <goal>run</goal> </goals> </execution> </executions> </plugin> install的构建阶段中使用它,但是如果需要文件进行构建的另一步骤,则可以将该阶段设置为在Maven生命周期中更早的阶段。您只需要在执行中进行更改即可。看看Introduction to the Build Lifecycle