縫い目でデバッグ/開発用のcomponents.xmlをどのように作成しますか
質問
誰もが2つのバージョンを作成しましたか components.xml
以下のような components-dev.properties
または他方 dev
また prod
バージョン?
どうやってこれをしたの?
で作成された開発に使用しているカスタムコンポーネントがいくつかあります components.xml
私は独自に移動したいと思います components-dev.xml
しかし、私はこれを行う方法はありません。何か案は?
私が移動したいコードは、一般的に次のようなものです。
<component name="fooBar" class="org.bar.FooBar" />
解決
次のようなコンポーネントを条件付きでインストールできます。
<component name="fooBar" class="org.bar.FooBar" install="true" />
条件付きでインストールする必要があるコンポーネントがたくさんあり、生産に移行するときにすべてを切り替えたくない場合は、コンポーネント.propertiesファイルのエントリを使用できます。例えば:
components.properties
...
dev=true
...
components.xml
<components>
...
<component name="fooBar" class="org.bar.FooBar" install="@dev@" />
...
</components>
これで、DEV属性を変更する必要があります。
所属していません StackOverflow