他の人が同じものを使用できるように、いくつか試した後、私の質問に答えさせてください。
- ポイント1については、よくわかりません。Apache ACE の所有者に確認する必要があります
- ポイント2について:
マルセルがコメントしたように、エージェントjar「jar xf target.jar jar/org.apache.ace.agent.jar」を抽出し、コマンドを使用してローカルのmavenリポジトリに同じものをインストールしました
mvn install:install-file -Dfile=./org.apache.ace.agent.jar -DgroupId=org.apache.ace -DartifactId=org.apache.ace.agent -Dversion=2.0.1 -Dpackaging=jar
以下に詳述するように、元の Web アプリケーション Maven コードでこの依存関係を提供します。
<dependency>
<groupId>org.apache.ace</groupId>
<artifactId>org.apache.ace.agent</artifactId>
<version>2.0.1</version>
</dependency>
以下に詳述するように、Felix をインスタンス化していた追加の構成済みパラメーターを追加しました。
String localId = UUID.randomUUID().toString();
Map config = new HashMap();
//Here i am adding Apache ACE agent configuration. For now two are ok
config.put(AgentConstants.CONFIG_DISCOVERY_SERVERURLS, "http://localhost:8080");
config.put(AgentConstants.CONFIG_IDENTIFICATION_AGENTID, localId);
List<BundleActivator> activators = new ArrayList<>();
//Here i am attaching Apache ACE activator as system activator
activators.add((BundleActivator) new Activator());
config.put(FelixConstants.SYSTEMBUNDLE_ACTIVATORS_PROP, activators);
Felix felix = new Felix(config);
.... regular felix.start etc goes here.