7.8. 배포 콘텐츠 보기

관리 배포에서 파일 정보를 검색하고 JBoss EAP 관리 인터페이스를 사용하여 파일의 내용을 읽을 수 있습니다.

7.8.1. 배포에서 파일 검색

browse-content 작업을 사용하여 관리되는 배포의 파일과 디렉터리를 확인합니다. 전체 배포 구조를 반환하거나 경로 인수를 사용하여 특정 디렉토리의 경로를 제공하는 인수를 제공하지 않습니다.

참고

Deployments (배포) 탭으로 이동하고 배포를 선택하고 드롭다운에서 View (보기)를 선택하여 관리 콘솔에서 배포 콘텐츠를 찾아볼 수도 있습니다.

/deployment=helloworld.war:browse-content(path=META-INF/)

그러면 helloworld.war 배포의 META-INF/ 디렉터리에 파일 및 디렉터리가 표시됩니다.

{
    "outcome" => "success",
    "result" => [
        {
            "path" => "MANIFEST.MF",
            "directory" => false,
            "file-size" => 827L
        },
        {
            "path" => "maven/org.jboss.eap.quickstarts/helloworld/pom.properties",
            "directory" => false,
            "file-size" => 106L
        },
        {
            "path" => "maven/org.jboss.eap.quickstarts/helloworld/pom.xml",
            "directory" => false,
            "file-size" => 2713L
        },
        {
            "path" => "maven/org.jboss.eap.quickstarts/helloworld/",
            "directory" => true
        },
        {
            "path" => "maven/org.jboss.eap.quickstarts/",
            "directory" => true
        },
        {
            "path" => "maven/",
            "directory" => true
        },
        {
            "path" => "INDEX.LIST",
            "directory" => false,
            "file-size" => 251L
        }
    ]
}

다음 인수를 browse-content 작업에 지정할 수도 있습니다.

아카이브
아카이브 파일만 반환할지 여부.
깊이
반환할 파일의 깊이를 지정합니다.

7.8.2. 배포 내용 읽기

read -content 작업을 사용하여 관리 배포에서 파일의 내용을 읽을 수 있습니다. 전체 배포를 반환하거나 경로 인수를 사용하여 특정 파일의 경로를 제공하는 인수를 제공하지 않습니다. 예를 들면 다음과 같습니다.

/deployment=helloworld.war:read-content(path=META-INF/MANIFEST.MF)

그러면 관리 CLI에 표시되거나 파일 시스템에 저장할 수 있는 파일 스트림이 반환됩니다.

{
    "outcome" => "success",
    "result" => {"uuid" => "24ba8e06-21bd-4505-b4d4-bdfb16451b95"},
    "response-headers" => {"attached-streams" => [{
        "uuid" => "24ba8e06-21bd-4505-b4d4-bdfb16451b95",
        "mime-type" => "text/plain"
    }]}
}

7.8.2.1. 파일의 내용 표시

첨부 파일 display 명령을 사용하여 MANIFEST.MF 파일의 내용을 읽습니다.

attachment display --operation=/deployment=helloworld.war:read-content(path=META-INF/MANIFEST.MF)

그러면 helloworld .war 배포에서 관리 CLI에 있는 MANIFEST. MF 파일의 콘텐츠가 표시됩니다.

ATTACHMENT 8af87836-2abd-423a-8e44-e731cc57bd80:
Manifest-Version: 1.0
Implementation-Title: Quickstart: helloworld
Implementation-Version: 7.4.0.GA
Java-Version: 1.8.0_131
Built-By: username
Scm-Connection: scm:git:git@github.com:jboss/jboss-parent-pom.git/quic
 kstart-parent/helloworld
Specification-Vendor: JBoss by Red Hat
...

7.8.2.2. 파일의 내용을 저장합니다

첨부 파일 save 명령을 사용하여 MANIFEST.MF 파일의 내용을 파일 시스템에 저장합니다.

attachment save --operation=/deployment=helloworld.war:read-content(path=META-INF/MANIFEST.MF) --file=/path/to/MANIFEST.MF

그러면 helloworld .war 배포에서 MANIFEST. MF 파일을 경로/to/MANIFEST.MF 의 파일 시스템에 저장합니다. file 인수를 사용하여 파일 경로를 지정하지 않으면 고유한 연결 ID를 사용하여 파일의 이름을 지정하고 관리 CLI의 작업 디렉터리에 저장됩니다. 기본적으로 EAP_HOME/bin/ 입니다.