2 つの異なる svn の場所から同じ出力ディレクトリにダウンロードする必要があります。だから私は2つの異なる実行を構成しました。ただし、チェックアウトを実行するたびに出力ディレクトリが削除されるため、ダウンロード済みのプロジェクトも削除されます。
これが私の pom.xml のサンプルです。
<profile>
<id>checkout</id>
<activation>
<property>
<name>checkout</name>
<value>true</value>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-scm-plugin</artifactId>
<version>1.3</version>
<configuration>
<username>${svn.username}</username>
<password>${svn.pass}</password>
<checkoutDirectory>${path}</checkoutDirectory>
<skipCheckoutIfExists/>
</configuration>
<executions>
<execution>
<id>checkout_a</id>
<configuration>
<connectionUrl>scm:svn:https://host_n/folder</connectionUrl>
<checkoutDirectory>${path}</checkoutDirectory>
</configuration>
<phase>process-resources</phase>
<goals>
<goal>checkout</goal>
</goals>
</execution>
<execution>
<id>checkout_b</id>
<configuration>
<connectionUrl>scm:svn:https://host_l/anotherfolder</connectionUrl>
<checkoutDirectory>${path}</checkoutDirectory>
</configuration>
<phase>process-resources</phase>
<goals>
<goal>checkout</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
フォルダ ${path} を削除する実行を防ぐ方法はありますか?
私は解決策を思いつきましたが、それを機能させることはできません:
プロファイルに maven-clean-plugin の実行を追加しました。
<profile>
<id>checkout</id>
...
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>not-clean</id>
<configuration>
<filesets>
<fileset>
<directory>${path}</directory>
<excludes>
<exclude>*/*</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
<phase>initialize</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
しかし、フォルダー内のすべてを除外する方法を理解できません。
何か案が?