、私は次の1(src/assembly/bin.xml
)のように見えるのアセンブリを使用したい:、このアセンブリを使用するには
<assembly>
<id>bin</id>
<formats>
<format>tar.gz</format>
<format>tar.bz2</format>
<format>zip</format>
</formats>
<dependencySets>
<dependencySet>
<unpack>false</unpack>
<scope>runtime</scope>
<outputDirectory>lib</outputDirectory>
</dependencySet>
</dependencySets>
<fileSets>
<fileSet>
<directory>src/main/command</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>*.sh</include>
<include>*.bat</include>
</includes>
</fileSet>
</fileSets>
</assembly>
をあなたのpom.xmlに以下の設定を追加します。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/assembly/bin.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
このサンプルでは、src/main/command
の下にある開始/停止スクリプトはbin
にバンドルされています。依存関係はlib
にバンドルされています。ニーズに合わせてカスタマイズしてください。
私はこれが正当化しているために十分一般的でした考え出し組み込みのアセンブリですが、明らかにそうではありません。いつものようにありがとう。 – Jared
私は本当に同意します。このようなもののためにあらかじめ定義された記述子を持つことは理にかなっています(スクリプトの場所など、いくつかの規則に基づいています)。 –