Liberty: Maven 아티팩트로 설치

Liberty 서버는 Maven 아티팩트로 설치될 수 있습니다. Maven 아티팩트로 설치하기 위한 두 가지 옵션이 있습니다. Maven 설치 플러그인을 사용하는 것과 Liberty 어셈블리 패키징 방법을 사용하는 것입니다.

Maven 설치 플러그인 사용

사용법:

maven-install-plugin을 사용하여 Liberty 서버 파일을 포함하는 압축 아카이브를 Maven 아티팩트로 설치할 수 있습니다. 압축된 아카이브는 iberty:package-server 목적 등으로 인해 생성할 수 있습니다.

예: 명령행 사용
mvn install:install-file
    -Dfile=/opt/ibm/wlp.zip \
    -DgroupId=myGroup \
    -DartifactId=myServer \
    -Dversion=1.0 \
    -Dpackaging=zip \
예: pom.xml 사용
사용 제품의 pom.xml 파일에서 사용할 수 있는 코드 스니펫입니다.
...
<plugin>
    <!-- Install the Liberty server zip into the local Maven repository -->
    <groupId>org.apache.maven.plugins</groupId>
    	<artifactId>maven-install-plugin</artifactId>
    	<version>2.2</version>
    	<executions>
        		<execution>
            			<id>install-liberty-to-repo</id>
            			<phase>process-resources</phase>
            			<goals>
                				<goal>install-file</goal>
            			</goals>
            <configuration>
                <file>/opt/ibm/wlp.zip</file>
                <groupId>myGroup</groupId>
                <artifactId>myServer</artifactId>
                	<version>1.0</version>
                				<packaging>zip</packaging>
           </configuration>
       		</execution>
</plugin> ...

Liberty 어셈블리 사용

사용법:

기존 서버 설치, 압축 아카이브 또는 다른 서버 Maven 아티팩트 외부에서 Liberty 서버 Maven 아티팩트를 작성하기 위해 liberty-assembly 패키징 유형을 사용할 수 있습니다. Maven compile 종속 항목으로 지정된 애플리케이션은 자동적으로 dropins/ 디렉토리에서 어셈블된 서버와 패키징됩니다.

예: Liberty 어셈블리 패키지 유형 사용
사용 제품의 pom.xml 파일에서 사용할 수 있는 코드 스니펫입니다.
<project>
    ...
    <groupId>myGroup</groupId>
    <artifactId>myServer</artifactId>
    <!-- Create Liberty server assembly -->
    <packaging>liberty-assembly</packaging>
    ...
    <dependencies>
        <!-- Package SimpleServlet.war with server assembly -->
        <dependency>
            <groupId>wasdev</groupId>
            <artifactId>SimpleServlet</artifactId>
            	<version>1.0</version>
            <type>war</type>
        </dependency>
    </dependencies>
    ...
    <build>
        <plugins>
            <!-- Enable liberty-maven-plugin -->
            <plugin>
                	<groupId>com.ibm.websphere.wlp.maven.plugins</groupId>
                	<artifactId>liberty-maven-plugin</artifactId> 
                	<version>1.0</version>
                <extensions>true</extensions>
                <configuration>
                    <serverHome>/opt/ibm/wlp</serverHome>
                    			<serverName>test</serverName>
                </configuration>
            </plugin>         </plugins>
    </build>        
    ...        
</project>

주제의 유형을 표시하는 아이콘 참조 주제



시간소인 아이콘 마지막 업데이트 날짜: Tuesday, 6 December 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=rwlp_maven_artifact
파일 이름: rwlp_maven_artifact.html