1
동일한 서버에서 2 개의 다른 glassfish 도메인에 응용 프로그램을 배포하려고합니다. 하나는 localhost-domain1이고 다른 하나는 localhost-domain2입니다. 내 배포는 모두 localhost-domain1로 이동합니다 (그러나 적어도 성공적으로 배포합니다). 설정하려면cargo maven plugin을 사용하여 두 개의 다른 glassfish 도메인에 배포하는 방법은 무엇입니까?
은 내가
<profile>
<id>continousIntegrationA</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/webapp</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.5</version>
<configuration>
<container>
<containerId>glassfish4x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.hostname>*censored*</cargo.hostname>
<cargo.remote.username>*censored*</cargo.remote.username>
<cargo.remote.password>*censored*</cargo.remote.password>
<cargo.remote.port>4848</cargo.remote.port>
<cargo.glassfish.domain.name>localhost-domain1</cargo.glassfish.domain.name>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<properties>
<context>${project.name}</context>
</properties>
</deployable>
</deployables>
</configuration>
<dependencies>
<dependency>
<groupId>org.glassfish.deployment</groupId>
<artifactId>deployment-client</artifactId>
<version>3.2-b06</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>continousIntegrationB</id>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/webapp</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.5</version>
<configuration>
<container>
<containerId>glassfish4x</containerId>
<type>remote</type>
</container>
<configuration>
<type>runtime</type>
<properties>
<cargo.hostname>*censored*</cargo.hostname>
<cargo.remote.username>*censored*</cargo.remote.username>
<cargo.remote.password>*censored*</cargo.remote.password>
<cargo.remote.port>4949</cargo.remote.port>
<cargo.glassfish.domain.name>localhost-domain2</cargo.glassfish.domain.name>
</properties>
</configuration>
<deployables>
<deployable>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<type>war</type>
<properties>
<context>${project.name}</context>
</properties>
</deployable>
</deployables>
</configuration>
<dependencies>
<dependency>
<groupId>org.glassfish.deployment</groupId>
<artifactId>deployment-client</artifactId>
<version>3.2-b06</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
그럼 내가 원하는 프로필을 배포 내 pom.xml 파일에이 프로필을 만들어, 아직 두 프로필은 로컬 호스트-domain1을로 배포합니다.
화물 버전을 1.4.6으로 변경해 보았습니다. 도움이되지 않았다. 또한 도메인 이름을/domainX로 명명 한 튜토리얼을 보았습니다. 그렇지 않았습니다. 도움. – Areinu