If you're using the Tomcat plugin, you'll need to configure it's
settings w/in that plugin. It has nothing to do with Cargo.  I'd
suggest using "tomcat:run-war" or "tomcat:run" rather than deploying
it to an existing server.  If you'd like to deploy to an existing
server, just use Cargo and change your configuration from downloading
to using a <home> variable. If you look, there should be a comment
that tells you how to do this.

Matt

On 5/9/07, nmall <[EMAIL PROTECTED]> wrote:

Where is the port set to 8080 when deploying thru' maven. I changed my Tomcat
port to 8081 however, though I specified 8081 in the cargo plugin as below,
it is still trying to connect on 8080 and therefore getting a connection
refused. Thanks for your suggestions!

[INFO] Deploying war to http://localhost:8080/myproject-1.0-SNAPSHOT


       <!-- Cargo settings -->
        <cargo.container>tomcat6x</cargo.container>
        <cargo.container.home>${env.CATALINA_HOME}</cargo.container.home>

<cargo.container.url>http://archive.apache.org/dist/tomcat/tomcat-5/v5.5.23/bin/apache-tomcat-5.5.23.zip</cargo.container.url>
        <cargo.host>localhost</cargo.host>
        <cargo.port>8081</cargo.port>
        <cargo.wait>false</cargo.wait>
Hi,

 My tomcat server is up and running and when I do a mvn -e tomcat:deploy, I
get the following error from maven. Any idea why. I have cargo settings etc
in my pom.xml. Thanks for your help!

[INFO] Generating war
c:\work\build\myproject\target\myproject-1.0-SNAPSHOT.war
[INFO] Building war:
c:\work\build\myproject\target\myproject-1.0-SNAPSHOT.war
[INFO] [tomcat:deploy]
[INFO] Deploying war to http://localhost:8080/myproject-1.0-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Cannot invoke Tomcat manager

Embedded error: Server returned HTTP response code: 401 for URL:
http://localhos
t:8080/manager/deploy?path=%2Fmyproject-1.0-SNAPSHOT&war=
[INFO]
------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Cannot invoke Tomcat
man
ager
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:564)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandalone
Goal(DefaultLifecycleExecutor.java:493)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(Defau
ltLifecycleExecutor.java:463)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegmen
ts(DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLi
fecycleExecutor.java:143)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        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(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        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: org.apache.maven.plugin.MojoExecutionException: Cannot invoke
Tomcat
manager
        at
org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalin
aMojo.java:140)
        at
org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarC
atalinaMojo.java:59)
        at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPlugi
nManager.java:443)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(Defa
ultLifecycleExecutor.java:539)
        ... 16 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for
URL:
 http://localhost:8080/manager/deploy?path=%2Fmyproject-1.0-SNAPSHOT&war=
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1174)
        at
org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:619)

        at
org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:
680)
        at
org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:302)


--
View this message in context: 
http://www.nabble.com/Maven-Tomcat-deploy-401-error-tf3716595s2369.html#a10406605
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to