如何解决集装箱异常问题

时间:2014-02-03 12:18:47

标签: java maven tomcat maven-3 maven-cargo

我正在尝试使用货物插件启动独立的apache tomcat 5.5容器,但是我收到以下错误:

[DEBUG] [URLDeployableMonitor] Checking URL [http://localhost:8080/cargocpc/index.html] for status using a timeout of [120000] ms...
[DEBUG] [URLDeployableMonitor] URL [http://localhost:8080/cargocpc/index.html] is not responding: -1 java.net.ConnectException: Connection refused: connect

这是我的货物配置:

<build>
    <finalName>MyApp</finalName>
    <plugins>
        <plugin>
            <groupId>org.codehaus.cargo</groupId>
            <artifactId>cargo-maven2-plugin</artifactId>
            <configuration>
                <container>
                    <containerId>tomcat5x</containerId>
                    <home>C:\Users\user\tomcat</home>
                </container>
                <configuration>
                    <home>target/tomcat5x</home>
                    <files>
                        ... a few files to copy
                    </files>
                </configuration>
            </configuration>
        </plugin>
    </plugins>
</build>

我该如何解决?

1 个答案:

答案 0 :(得分:0)

当我意识到我使用https而不是http作为协议时,我得到了相同的异常。将协议更改为http为我解决了问题。我希望它可以帮助你和任何可能错过这种微妙之处的人。