3

bndwrapAntタスクを使用して非 OSGi jar をディレクトリにラップしようとしています。これに対する私の現在のAnt構成は次のとおりです。

<target name="wrap-jars" description="Wrap non-OSGi jars">
    <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${biz.aQute:bnd:jar}"/>
    <bndwrap output="${dist.dir}/app-modules">
        <fileset dir="${dist.dir}/app-modules" includes="*.jar" />
    </bndwrap>
    <move overwrite="true" todir="${dist.dir}/app-modules" >
        <fileset dir="${dist.dir}/app-modules" includes="*.bar" />
        <mapper type="glob" from="*.bar" to="*.jar" />
    </move>
</target>

これは正常に動作しますが、問題は既存の OSGi jar もラップすることであり、これが問題を引き起こします。たとえば、Bundle-SymbolicNameヘッダーがデフォルト値に変更されていることに気付きました。それは私が望んでいない何か他のものを変えているかもしれません。OSGi情報がまったくないjarでのみ動作させたいです。

マニフェスト内の既存の OSGi ヘッダーを無視するように BND に指示する方法、または既に OSGi 化されている完全な jar を実行する方法はありますか?

4

3 に答える 3

0

非OSGijarを別のフォルダーに保管し、filesetそのフォルダーのみを処理するようにを変更します。

于 2011-11-17T15:03:39.547 に答える
0

最近の bnd バージョン (2.1.0 など) では、OSGi jar を再ラップするときに Bundle-SymbolicName が優先されるようになりました。

于 2013-03-06T12:41:54.777 に答える