You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thorsten Heit <th...@gmx.de> on 2007/03/06 14:46:15 UTC

Does Cargo use the proxy settings in my settings.xml?

Hi *,


following the instructions in the Maven 2 quick reference card PDF I tried to let Maven deploy a web app to Tomcat via Cargo:

<build>
  <plugins>
    <plugin>
      <groupId>org.codehaus.cargo</groupId>
      <artifactId>cargo-maven2-plugin</artifactId>
      <executions>
        <execution>
          <id>tomcat-execution</id>
          <phase>package</phase>
          <goals>
            <goal>start</goal>
          </goals>
          <configuration>
            <wait>true</wait>
            <container>
            <containerId>tomcat5x</containerId>
            <zipUrlInstaller>
              <url>http://www.apache.org/dist/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.zip</url>
              <installDir>${installDir}</installDir>
            </zipUrlInstaller>
          </container>
          <configuration>
            <home>${project.build.directory}/tomcat5x/</home>
          </configuration>
        </configuration>
      </execution>
    </executions>
  </plugin>
...

Unfortunately "mvn -X integration-test" doesn't work; Cargo doesn't download Tomcat:

*snip*
[DEBUG] Configuring mojo 'org.codehaus.cargo:cargo-maven2-plugin:0.2:start' -->
[DEBUG]   (s) home = d:\workspaces\sukv-maven\SUKV_2\module-war\war-standalone\target\tomcat5x
[DEBUG]   (f) configuration = org.codehaus.cargo.maven2.Configuration@cc7439
[DEBUG]   (s) containerId = tomcat5x
[DEBUG]   (s) url = http://www.apache.org/dist/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.zip
[DEBUG]   (f) zipUrlInstaller = org.codehaus.cargo.maven2.ZipUrlInstaller@bb2bc3
[DEBUG]   (s) container = org.codehaus.cargo.maven2.Container@363068
[DEBUG]   (f) localRepository = [local] -> file://D:\Dokumente und Einstellungen\H2841\.m2\repository
[DEBUG]   (f) project = org.apache.maven.project.MavenProject@c78388e8
[DEBUG]   (f) repositories = [[ukv.releases] -> file:///d:/maven-repositories/releases, [ukv.snapshots] -> file:///d:/maven-repositories/snapshots, [central] -> http://repo1.maven.org/maven2, [codehaus-release-repo] -> http://repository.codehaus.org, [codehaus-snapshot-repo] -> http://snapshots.repository.codehaus.org, [apache.snapshot] -> http://people.apache.org/maven-snapshot-repository/]
[DEBUG]   (f) wait = true
[DEBUG] -- end configuration --
[INFO] [cargo:start {execution: tomcat-execution}]
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to download [http://www.apache.org/dist/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.zip]
Connection timed out: connect
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.codehaus.cargo.container.ContainerException: Failed to download [http://www.apache.org/dist/tomcat/tomcat-5/v5.0.30/bin/jakarta-tomcat-5.0.30.zip]
        at org.codehaus.cargo.container.installer.ZipURLInstaller.download(ZipURLInstaller.java:228)
        at org.codehaus.cargo.container.installer.ZipURLInstaller.install(ZipURLInstaller.java:105)
        at org.codehaus.cargo.maven2.Container.setupHome(Container.java:254)
        at org.codehaus.cargo.maven2.Container.createContainer(Container.java:181)
        at org.codehaus.cargo.maven2.AbstractCargoMojo.createContainer(AbstractCargoMojo.java:332)
        at org.codehaus.cargo.maven2.ContainerStartMojo.execute(ContainerStartMojo.java:53)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:420)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:330)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:123)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:272)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: in cargo code: java.net.ConnectException: Connection timed out: connect
        at org.apache.tools.ant.taskdefs.Get.execute(Get.java:267)
        at org.codehaus.cargo.container.installer.ZipURLInstaller.doDownload(ZipURLInstaller.java:242)
        at org.codehaus.cargo.container.installer.ZipURLInstaller.download(ZipURLInstaller.java:209)
        ... 23 more
*snip*

I'm sitting behind a proxy, and my settings.xml contains the necessary proxy settings which do work for me (Maven can download everything I'm using in my POMs). I already checked that the url for Tomcat is correct; Firefox downloads the zip file fully so there must be something else. I assume that Cargo simply doesn't use the proxy settings Maven uses, does it? Or is it something else I haven't seen yet? Do I have to add special configuration flags for the plugin for using a proxy?


nabRegards

Thorsten

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org