私はmaven-bundle-plugin
(bnd
効果的に)を使用しています。
ソースからリソース ファイルを含めるのは簡単です。
たとえば、リソース ファイル ( ) はビルド時にディレクトリ ( )src/main/resources/some.xml
の下に移動され、命令を使用してバンドルに含めることができます。target
target/classes/some.xml
<Include-Resource>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.0.1</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Include-Resource>
some.xml=target/classes/some.xml,
</Include-Resource>
</instructions>
</configuration>
</plugin>
依存関係を持たせましょう:
<dependency>
<groupId>com.example</groupId>
<artifactId>library</artifactId>
<version>1.0.0</version>
</dependency>
依存内のリソースファイルを参照する方法はjar
?
つまり、どのように
次のように指定します。
com.example:library:1.0.0:jar/some.xml
これの代わりに:
target/classes/some.xml
依存関係の1つからのリソースが出力バンドルに表示されるようにしますjar
か?