I have a maven war project and am using maven-cargo-plugin to deploy the war
to the container and also to start/stop the container for functional
testing.  All works well on an internet-connected machine, but when I try to
execute my build on a disconnected machine, the cargo:deploy fails. I have
copied the source tree and my maven repository to the disconnected machine
and am running "mvn -o".  All other parts of the build complete
successfully.  If I manually deploy the war and start the container, the
functional tests run successfully. The disconnected machine is on a
completely isolated network, not just behind a firewall.  I have read the
cargo documentation and do not see anything that addresses this use-case.
Judging from the trace, it appears to be trying to contact
www.jboss.org(perhaps trying to validate the war???)  Is there a
mistake in my
configuration, or a way to work around this issue?

The failure: (hand typed so possible typos...)
[cargo:deploy {execution: copy-to-jboss}]
Parsed JBoss version = [5.1.0]
----------------------------------
 FATAL ERROR
---------------------------------
Failed to create deployable with implementation class
org.codehaus.cargo.container.jboss.deployable.JBossWAR for the parameters
(container [id = [jboss51x]], deployable type [war])
www.jboss.org
Trace
org.codehaus.cargo.container.ContainerException: Failed to create...
at
org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:154)
---snip---
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
---snip---
Caused by: org.codehaus.cargo.container.ContainerException: Failed to parse
JBoss WAR file in [correct_path_name_here]
  at:
org.codehaus.cargo.container.jboss.deployable.JBossWAR.<init>(JBossWAR.java:56)
---snip---
Caused by: java.net.UnknownHostException: www.jboss.org
  at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
---snip---

maven version 2.2.1
cargo version 1.1.1
java version 1.6.0_20 (connected)/1.6.0_23(disconnected)
OS: ubuntu 11.04 (connected)/RedHat (disconnected)
container: jBoss 5.1

This is the cargo configuration, as specified in the pluginManagement
section of my parent/aggregator pom:

                <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>${version.cargo}</version>
                    <configuration>
                        <deployer>
                            <deployables>
                                <deployable>

<location>${project.build.directory}/${project.build.finalName}.${project.packaging}</location>
                                </deployable>
                            </deployables>
                        </deployer>
                        <container>
                            <containerId>jboss51x</containerId>
                            <home>${jboss.home}</home>
                            <type>installed</type>
                            <systemProperties>
                                <javax.net.ssl.keyStore>
                                    XXX
                                    </javax.net.ssl.keyStore>
                                <javax.net.ssl.keyStorePassword>
                                    XXX
                                    </javax.net.ssl.keyStorePassword>
                                <javax.net.ssl.trustStore>
                                    XXX
                                    </javax.net.ssl.trustStore>
                                <javax.net.ssl.trustStorePassword>
                                    XXX
                                    </javax.net.ssl.trustStorePassword>
                                <jena.config.file>
                                    ${jena.config.file}
                                    </jena.config.file>
                            </systemProperties>
                        </container>
                        <configuration>
                            <type>existing</type>
                            <home>${jboss.server.dir}</home>
                            <properties>
                                <cargo.jvmargs>-XX:PermSize=512m
-XX:MaxPermSize=1024</cargo.jvmargs>
                                <cargo.jboss.configuration>
                                    default
                                    </cargo.jboss.configuration>
                                <cargo.protocol>
                                    https
                                    </cargo.protocol>
                                <cargo.servlet.port>
                                    8443
                                    </cargo.servlet.port>
                                <cargo.secure>true</cargo.secure>
                                <cargo.rmi.port>1099</cargo.rmi.port>
                                <cargo.client.auth>true</cargo.client.auth>

<cargo.hostname>${jboss.hostname}</cargo.hostname>
                            </properties>
                        </configuration>
                    </configuration>
                </plugin>

Reply via email to