deploy webapplication to tomcat

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

deploy webapplication to tomcat

vasu
This post has NOT been accepted by the mailing list yet.
Hi all,

i am very new to maven and i have added eclipse plugin for maven using the below url

http://m2eclipse.sonatype.org/sites/m2e

then i created a web application using maven in eclipse. now i want deploy this application to tomcat7 using pom.xml

my pom.xml is

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.j2ee.sample</groupId>
  <artifactId>helloWorld</artifactId>
  <packaging>war</packaging>
  <version>0.0.1-SNAPSHOT</version>
  <name>helloWorld Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
     <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-servlet_2.4_spec</artifactId>
      <version>1.1.1</version>
    </dependency>
  </dependencies>
 
  <build>
    <finalName>helloWorld</finalName>
    <plugins>
    <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                <source>1.6</source>
                <target>1.6</target>
                </configuration>
        </plugin>

       
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>tomcat-maven-plugin</artifactId>
        <configuration>
          <url>http://localhost:8080/manager</url>
        </configuration>
      </plugin>
    </plugins>
  </build>
 
</project>


i am getting the following error


[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project helloWorld: Cannot invoke Tomcat manager: Connection refused: connect -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project helloWorld: Cannot invoke Tomcat manager
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot invoke Tomcat manager
        at org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:149)
        at org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarCatalinaMojo.java:70)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
        ... 19 more
Caused by: java.net.ConnectException: Connection refused: connect
        at java.net.DualStackPlainSocketImpl.connect0(Native Method)
        at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
        at java.net.Socket.connect(Socket.java:579)
        at java.net.Socket.connect(Socket.java:528)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:180)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:388)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:483)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:213)
        at sun.net.www.http.HttpClient.New(HttpClient.java:300)
        at sun.net.www.http.HttpClient.New(HttpClient.java:316)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:992)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:928)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:846)
        at org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:597)
        at org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:662)
        at org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:295)
        at org.codehaus.mojo.tomcat.AbstractDeployWarMojo.deployWar(AbstractDeployWarMojo.java:85)
        at org.codehaus.mojo.tomcat.AbstractDeployMojo.invokeManager(AbstractDeployMojo.java:85)
        at org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalinaMojo.java:141)
        ... 22 more


please help me what will make me to deploy thus application?
I am using eclipse indigo,tomcat7 and windows7.
Reply | Threaded
Open this post in threaded view
|

Re: deploy webapplication to tomcat

zadafohmder
This post has NOT been accepted by the mailing list yet.
ขอสัญญาว่าเราจะมุ่งมัน เพื่อการคำแนะนำที่ดีที่สุดสมาชิกที่ต้องการร่วมสนุก อย่าโลภ วันนี้คุณ แทงบอล ชนะได้ กำไร 10000 บาท แล้วให้พอเลิกแทงครับ อย่าอยากได้มากกว่านี้ มันอาจจะทำให้ผลกำไร 10000 บาท ของคุณหายไปหมดเลย เพราะความโลภตัวเดียวแท้ๆ holiday palace เหมือนการทำธุรกิจทั่วไป สิ่งสำคัญก็คือกำหนดเป้าหมายและทำให้ได้อย่างที่ตั้งไว้ หากท่านเริ่มต้นแบบไม่มีการควบคุมตัวเอง เริ่ม แทงฟุตบอล ด้วยเงินแทงสูง โอกาสสูญเสียก็สูง ถ้าท่านเล่นทุกวันโดยไม่มีจุดมุ่งหมายใด ๆ คุณก็จะไม่ไปถึงเป้าหมายที่ต้องการ