1

プロファイルの変更を開始し、途中でいくつかの間違いを犯しました。

このため、完全に削除したい PID がプロファイルに含まれています。

fabric:profile-display defaultこれらは、この投稿の下部にある出力で確認できます。

彼らです:

http:

patch.repositories=http:

org.ops4j.pax.url.mvn.repositories=http:

これを削除する正しいコマンドが見つかりません。私はもう試した:

config:delete org.ops4j.pax.url.mvn.repositories=http:

これは正常に完了します。しかし、defaultプロファイルにはまだこの pid がリストされています。

私も試しました:

fabric:profile-edit --delete -p org.ops4j.pax.url.mvn.repositories=http: default

これは失敗します:

Error executing command: String index out of range: -1

これは、プロパティ パス/propertyを指定する必要があることを示します。

追加も単に/機能しません。

もう1つの問題は、次の行に示されているように、一見空の名前のpidがあることです。

PID: (この出力プレフィックスには何も続きません)。

の出力fabric:profile-display default:

Profile id: default
Version   : 1.0
Parents   : 
Associated Containers : 

Container settings
----------------------------
Repositories : 
        mvn:org.fusesource.fabric/fuse-fabric/7.0.1.fuse-084/xml/features

Features : 
        fabric-agent
        karaf
        fabric-jaas
        fabric-core

Agent Properties : 
          patch.repositories =  http://repo.fusesource.com/nexus/content/repositories/releases,
                 http://repo.fusesource.com/nexus/content/groups/ea
          org.ops4j.pax.url.mvn.repositories =  http://repo1.maven.org/maven2,
                 http://repo.fusesource.com/nexus/content/repositories/releases,
                 http://repo.fusesource.com/nexus/content/groups/ea,
                 http://repository.springsource.com/maven/bundles/release,
                 http://repository.springsource.com/maven/bundles/external,
                 http://scala-tools.org/repo-releases
          org.ops4j.pax.url.mvn.defaultRepositories =   file:${karaf.home}/${karaf.default.repository}@snapshots,
                file:${karaf.home}/local-repo@snapshots


Configuration details
----------------------------
PID: 


PID: org.ops4j.pax.url.mvn
  org.ops4j.pax.url.mvn.useFallbackRepositories false
  org.ops4j.pax.url.mvn.disableAether true
  org.ops4j.pax.url.mvn.repositories ${profile:org.fusesource.fabric.agent/org.ops4j.pax.url.mvn.repositories}
  org.ops4j.pax.url.mvn.defaultRepositories ${profile:org.fusesource.fabric.agent/org.ops4j.pax.url.mvn.defaultRepositories}


PID: patch.repositories=http:


PID: org.ops4j.pax.url.mvn.repositories=http:


PID: http:


PID: org.fusesource.fabric.zookeeper
  zookeeper.url ${zk:root/ip}:2181

誰かが正しいコマンドを指すことができれば、私は非常に感謝しています。

4

2 に答える 2

2

fabric:profile-editwithのコマンドライン コードを見てみましたが--delete、残念ながら、この関数は PID 自体を削除するのではなく、PID からキーと値のペアを削除するように設計されているようです。

(これは githubのProfileEdit.javaのコードです)

基本的に、そのコマンドを使用して PID を「空にする」ことはできますが、削除することはできません。

fabric:profile-edit --delete --pid mypid/mykey=myvalue myprofile

これがあまり役に立たないことを知っていたので、隣に座っている(そして私よりずっと賢い)同僚に尋ねたところ、彼は次のことを勧めました。

  1. でヒューズ管理コンソールを有効にしますcontainer-add-profile root fmc

  2. ブラウザでfmcを開き(私のものはポート8181のlocalhostにあります)、Profilesページに移動し、リストからプロファイルを選択します

  3. タブに移動し、Config Files核攻撃する PID を見つけて、十字 (X) をクリックします。

出来上がり、pidはなくなっているはずです。「空白の」プロファイルを含め、これが機能するかどうかを知りたい...

于 2013-06-17T10:51:11.580 に答える
0

以下は Fuse 6.2 で機能します。

1) プロパティ ファイル (PID オブジェクトになる) 用

# create
profile-edit --resource foobar.properties default

# delete
profile-edit --delete --pid foobar default

2) 任意のファイルの場合

# create
profile-edit --resource foobar.xml default


#delete
only via hawtio web console, see screenshot:

ここに画像の説明を入力

于 2016-05-18T12:04:01.183 に答える