含まれているファイルなしでディレクトリ構造を別のルートディレクトリにコピーするにはどうすればよいですか? たとえば、次から:
root
-> dir1
-> dir2
-> dir3
to:
another_root
-> dir1
-> dir2
-> dir3
含まれているファイルなしでディレクトリ構造を別のルートディレクトリにコピーするにはどうすればよいですか? たとえば、次から:
root
-> dir1
-> dir2
-> dir3
to:
another_root
-> dir1
-> dir2
-> dir3
次のような目的でmaven-resource-pluginを使用できます。
<project>
...
<build>
<plugins>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</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/extra-resources</outputDirectory>
<resources>
<resource>
<directory>src/non-packaged-resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
...
</build>
...
</project>
しかし、コンテンツのないフォルダーのみがコピーされるように構成できるかどうかはわかりません。それとは別に、maven-copy-pluginを見ることができますが、Maven の道を進んでいないようです。