Tengo un problema cuando yo wan’t para implementar mi proyecto de maven con tomcat. Solo obtengo un mensaje de error 404.
Cuando yo intente con jetty funciona bien.

Creo que hay algo mal con el pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<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>com.shoot.tail</groupId>
<artifactId>shootout</artifactId>
<packaging>war</packaging>
<version>1.2</version>
<name>Shootout</name>
<repositories>
<repository>
<id>java.net</id>
<url>https://maven.java.net/content/repositories/releases</url>
</repository>
</repositories>
<properties>
<myfaces.version>2.1.8</myfaces.version>
<mojarra.version>2.1.11</mojarra.version>
<jetty.version>8.1.5.v20120716</jetty.version>
<tomcat.version>7.0.12</tomcat.version>
</properties>
<profiles>
<profile>
<id>mojarra</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>${mojarra.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>${mojarra.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>jdbc-pool</artifactId>
<version>${jdbc-pool.version}</version>
<scope>system</scope>
<systemPath>${basedir}/../${web.project}/WebContent/WEB-INF/lib/tomcat-jdbc.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.tomcat</groupId>
<artifactId>juli</artifactId>
<version>${tomcat.version}</version>
</dependency>
</dependencies>
<properties>
<override-web-xml>src/main/jetty/override-mojarra-web.xml</override-web-xml>
</properties>
</profile>
<profile>
<id>myfaces</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>${myfaces.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>${myfaces.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<properties>
<override-web-xml>src/main/jetty/override-myfaces-web.xml</override-web-xml>
</properties>
</profile>
</profiles>
<!-- Project dependencies -->
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<finalName>shootout</finalName>
<defaultGoal>install</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>${tomcat.version}</version>
<configuration>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
<overrideDescriptor>${override-web-xml}</overrideDescriptor>
</webAppConfig>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<webAppConfig>
<contextPath>/${project.artifactId}</contextPath>
<overrideDescriptor>${override-web-xml}</overrideDescriptor>
</webAppConfig>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<wtpversion>2.0</wtpversion>
<downloadSources>true</downloadSources>
<additionalProjectFacets>
<jst.jsf>2.0</jst.jsf>
</additionalProjectFacets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>

Versión
Eclipse: Juno
Tomcat: 7.0.12
Maven: 3.0.5

Y el error:

    [ERROR] Plugin org.codehaus.mojo:tomcat-maven-plugin:7.0.12 or one of its depend
encies could not be resolved: Failed to read artifact descriptor for org.codehau
s.mojo:tomcat-maven-plugin:jar:7.0.12: Failure to find org.codehaus.mojo:tomcat-
maven-plugin:pom:7.0.12 in http://repo.maven.apache.org/maven2 was cached in the
local repository, resolution will not be reattempted until the update interval
of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.plugin.PluginResolutionException: Plugin org.codehaus.mojo:tomc
at-maven-plugin:7.0.12 or one of its dependencies could not be resolved: Failed
to read artifact descriptor for org.codehaus.mojo:tomcat-maven-plugin:jar:7.0.12
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:129)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getPluginD
escriptor(DefaultMavenPluginManager.java:142)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDes
criptor(DefaultMavenPluginManager.java:261)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(D
efaultBuildPluginManager.java:185)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDesc
riptor(MojoDescriptorCreator.java:235)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul
ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalcul
ator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
eStarter.java:98)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
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(DelegatingMethodAcces
sorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
cher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
a:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
uncher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:
352)
Caused by: org.sonatype.aether.resolution.ArtifactDescriptorException: Failed to
read artifact descriptor for org.codehaus.mojo:tomcat-maven-plugin:jar:7.0.12
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:296)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
readArtifactDescriptor(DefaultArtifactDescriptorReader.java:186)
at org.sonatype.aether.impl.internal.DefaultRepositorySystem.readArtifac
tDescriptor(DefaultRepositorySystem.java:279)
at org.apache.maven.plugin.internal.DefaultPluginDependenciesResolver.re
solve(DefaultPluginDependenciesResolver.java:115)
... 20 more
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Failure t
o find org.codehaus.mojo:tomcat-maven-plugin:pom:7.0.12 in http://repo.maven.apa
che.org/maven2 was cached in the local repository, resolution will not be reatte
mpted until the update interval of central has elapsed or updates are forced
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
aultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
facts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
fact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:281)
... 23 more
Caused by: org.sonatype.aether.transfer.ArtifactNotFoundException: Failure to fi
nd org.codehaus.mojo:tomcat-maven-plugin:pom:7.0.12 in http://repo.maven.apache.
org/maven2 was cached in the local repository, resolution will not be reattempte
d until the update interval of central has elapsed or updates are forced
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.newExcept
ion(DefaultUpdateCheckManager.java:230)
at org.sonatype.aether.impl.internal.DefaultUpdateCheckManager.checkArti
fact(DefaultUpdateCheckManager.java:204)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
aultArtifactResolver.java:427)
... 26 more
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please rea
d the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResoluti
onException

Muchas gracias por su ayuda.
Los mejores deseos
Robert

¿recibe algún error a la hora de crear/implementar?
Sí, lo he añadido.

OriginalEl autor BobBarker | 2013-03-15

4 Comentarios

  1. 4

    Resuelto.

    este es mi final pom.xml:

    [...]
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>tomcat-maven-plugin</artifactId>
    <configuration>
    <server>tomcat</server>  
    <url>http://localhost:8080/manager/text</url>  
    </configuration>
    </plugin>
    [...]

    Gracias guido por su ayuda (:

    OriginalEl autor BobBarker

  2. 2

    esto funciona:

    https://stackoverflow.com/a/16592276/503601

    hay un error en el plugin. Este plugin no leer la url de la etiqueta.

    <configuration>
    <url>http://localhost:8080/manager/html</url>
    </configuration>

    para establecer el uso de la propiedad

    <properties>
    <maven.tomcat.url>http://localhost:8080/manager/text</maven.tomcat.url>
    </properties>

    artículo completo en http://jvm-java.blogspot.com.es/2013/06/publish-with-maven-in-tomcat7.html

    Gracias por señalarlo. Estoy utilizando la versión 2.2 de la tomcat7-maven-plugin y han confirmado esto. También quería señalar que esta entrada propiedades DEBE ESTAR codificado en cada pom archivo que se va a implementar una guerra. Por ejemplo, en mi caso tengo un padre en común maven spring mvc proyecto que todos mis maven de la guerra de los proyectos de heredar de y normalmente pongo propiedades comunes en los padres de pom. Para esta propiedad en particular cualquier valor/URI poner en el padre pom es ignorado. Incluso he intentado crear una propiedad personalizada en la que el padre y la inyecte como <maven.tomcat.url>${myCustonUri}</maven.tomcat.url> siempre ignord

    OriginalEl autor user503601

  3. 1

    Se especifica tomcat versión en lugar de la de tomcat-maven-plugin versión, causando maven para no encontrar el plugin (en realidad, leyendo el mensaje de error debe haber ayudado a usted); aquí:

    <properties>
    <tomcat.version>7.0.12</tomcat.version>
    </properties>
    [...]
    <build>
    <plugins>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>tomcat-maven-plugin</artifactId>
    <version>${tomcat.version}</version>
    [...]

    Uso 1.2-INSTANTÁNEA (por ejemplo) para ${tomcat.versión} o declarar otra variable si el uso de tomcat versión en otros lugares.

    Además, tomcat 7.0 necesidades configuración adicional para interactuar con el administrador de webapp, como este:

    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>tomcat-maven-plugin</artifactId>
    <version>1.2-SNAPSHOT</version>
    <configuration>
    <url>http://localhost:8080/manager/html</url>
    </configuration>
    </plugin>

    O bien, puede utilizar la versión 2.x que ha sido movido bajo apache, y donde los mojos se ha cambiado el nombre a tomcat6 y tomcat7 con los mismos objetivos.

    <pluginManagement>
    <plugins>
    <plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat6-maven-plugin</artifactId>
    <version>2.1</version>
    </plugin>
    <plugin>
    <groupId>org.apache.tomcat.maven</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.1</version>
    </plugin>
    </plugins>
    </pluginManagement>
    Gracias, estoy un paso más allá. [ADVERTENCIA] Algunos de los problemas encontrados durante la construcción de la configuración efectiva [ADVERTENCIA] no reconocido de la etiqueta: ‘id’ (posición: START_TAG visto …<servidores>\n \t<id >… @112:8) @ C:\Software\maven\conf\settings.xml línea 112, columna 8 [ADVERTENCIA] [INFO] Escaneo para proyectos de… [ADVERTENCIA] El POM para org.codehaus.mojo:tomcat-maven-plugin:jar:1.2-INSTANTÁNEA de la falta, sin dependencia de la información disponible C:\Software\maven\conf\settings.xml Línea 112 <id>TomcatServer</id> <nombre de usuario>admin</nombre de usuario> <contraseña>admin</contraseña>
    es que parece que después de la mudanza a apache, codehaus repositorio sólo los hosts de la versión 1.0. Leer la primera y la segunda las respuestas a esta pregunta: stackoverflow.com/questions/2013576/…
    gracias, creo que esto ayudó, pero hay otro problema, que he publicado en una nueva respuesta para una mejor lectura
    Bob, debes editar tu pregunta original con los nuevos datos/resultados; sólo publicar una respuesta si se ha solucionado el problema usted mismo y desea compartir con los demás. Tal vez intentar cortar no de las partes pertinentes del código fuente para ser más conciso. Leer más en hacer preguntas en stackoverflow faq :stackoverflow.com/faq

    OriginalEl autor guido

  4. 1

    sí que se ve mejor.

    Creo que intenta implementar el proyecto, pero un error en la construcción.

    [INFO] Error stacktraces are turned on.
    [WARNING]
    [WARNING] Some problems were encountered while building the effective settings
    [WARNING] Unrecognised tag: 'id' (position: START_TAG seen ...<servers>\n  \t<id
    >... @112:8)  @ C:\Software\maven\conf\settings.xml, line 112, column 8
    [WARNING]
    [INFO] Scanning for projects...
    [WARNING] The POM for org.codehaus.mojo:tomcat7-maven-plugin:jar:2.0-SNAPSHOT is
    missing, no dependency information available
    [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:tomcat7-mav
    en-plugin:2.0-SNAPSHOT: Plugin org.codehaus.mojo:tomcat7-maven-plugin:2.0-SNAPSH
    OT or one of its dependencies could not be resolved: Failed to read artifact des
    criptor for org.codehaus.mojo:tomcat7-maven-plugin:jar:2.0-SNAPSHOT
    Downloading: http://repository.apache.org/content/groups/snapshots-group/org/apa
    che/maven/plugins/maven-metadata.xml
    [WARNING] Could not transfer metadata org.apache.maven.plugins/maven-metadata.xm
    l from/to apache.snapshots (http://repository.apache.org/content/groups/snapshot
    s-group/): Failed to transfer file: http://repository.apache.org/content/groups/
    snapshots-group/org/apache/maven/plugins/maven-metadata.xml. Return code is: 500
    , ReasonPhrase:Server Error.
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Shootout 1.2
    [INFO] ------------------------------------------------------------------------
    [WARNING] The POM for org.codehaus.mojo:tomcat7-maven-plugin:jar:2.0-SNAPSHOT is
    missing, no dependency information available
    [WARNING] Failed to retrieve plugin descriptor for org.codehaus.mojo:tomcat7-mav
    en-plugin:2.0-SNAPSHOT: Plugin org.codehaus.mojo:tomcat7-maven-plugin:2.0-SNAPSH
    OT or one of its dependencies could not be resolved: Failed to read artifact des
    criptor for org.codehaus.mojo:tomcat7-maven-plugin:jar:2.0-SNAPSHOT
    [WARNING] Failure to transfer org.apache.maven.plugins/maven-metadata.xml from h
    ttp://repository.apache.org/content/groups/snapshots-group/was cached in the lo
    cal repository, resolution will not be reattempted until the update interval of
    apache.snapshots has elapsed or updates are forced. Original error: Could not tr
    ansfer metadata org.apache.maven.plugins/maven-metadata.xml from/to apache.snaps
    hots (http://repository.apache.org/content/groups/snapshots-group/): Failed to t
    ransfer file: http://repository.apache.org/content/groups/snapshots-group/org/ap
    ache/maven/plugins/maven-metadata.xml. Return code is: 500 , ReasonPhrase:Server
    Error.
    [INFO]
    [INFO] >>> tomcat-maven-plugin:1.1:deploy (default-cli) @ shootout >>>
    [INFO]
    [INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ shootout -
    --
    [debug] execute contextualize
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
    i.e. build is platform dependent!
    [INFO] Copying 1 resource
    [INFO]
    [INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ shootout ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO]
    [INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ sh
    ootout ---
    [debug] execute contextualize
    [WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources,
    i.e. build is platform dependent!
    [INFO] Copying 0 resource
    [INFO]
    [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ shoot
    out ---
    [INFO] Nothing to compile - all classes are up to date
    [INFO]
    [INFO] --- maven-surefire-plugin:2.10:test (default-test) @ shootout ---
    [INFO] Surefire report directory: C:\Software\workspace\shootout\target\suref
    ire-reports
    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Results :
    Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
    [INFO]
    [INFO] --- maven-war-plugin:2.1.1:war (default-war) @ shootout ---
    [INFO] Packaging webapp
    [INFO] Assembling webapp [shootout] in [C:\Software\workspace\shootout\target
    \shootout]
    [INFO] Processing war project
    [INFO] Copying webapp resources [C:\Software\workspace\shootout\src\main\weba
    pp]
    [INFO] Webapp assembled in [47 msecs]
    [INFO] Building war: C:\Software\workspace\shootout\target\shootout.war
    [WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ig
    nored
    (webxml attribute is missing from war task, or ignoreWebxml attribute is specifi
    ed as 'true')
    [INFO]
    [INFO] <<< tomcat-maven-plugin:1.1:deploy (default-cli) @ shootout <<<
    [INFO]
    [INFO] --- tomcat-maven-plugin:1.1:deploy (default-cli) @ shootout ---
    [INFO] Deploying war to http://localhost:8080/shootout
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 3.682s
    [INFO] Finished at: Fri Mar 15 10:21:19 CET 2013
    [INFO] Final Memory: 10M/24M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy
    (default-cli) on project shootout: Cannot invoke Tomcat manager: Connection refu
    sed: connect -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal o
    rg.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project shootou
    t: 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.buildProje
    ct(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProje
    ct(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBu
    ild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(Lifecycl
    eStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
    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(DelegatingMethodAcces
    sorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Laun
    cher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.jav
    a:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(La
    uncher.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(AbstractCatalin
    aMojo.java:149)
    at org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarC
    atalinaMojo.java:70)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(Default
    BuildPluginManager.java:101)
    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(DualStackPlainSocketI
    mpl.java:69)
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.ja
    va:339)
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocket
    Impl.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:378)
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:473)
    at sun.net.www.http.HttpClient.<init>(HttpClient.java:203)
    at sun.net.www.http.HttpClient.New(HttpClient.java:290)
    at sun.net.www.http.HttpClient.New(HttpClient.java:306)
    at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLC
    onnection.java:995)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConne
    ction.java:931)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection
    .java:849)
    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(AbstractDepl
    oyWarMojo.java:85)
    at org.codehaus.mojo.tomcat.AbstractDeployMojo.invokeManager(AbstractDep
    loyMojo.java:85)
    at org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalin
    aMojo.java:141)
    ... 22 more
    [ERROR]
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please rea
    d the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionE
    xception

    C:\Software\maven\conf\settings.xml: Línea 111-115

      <servers>
    <id>tomcat</id>
    <username>admin</username>
    <password>admin</password>
    </servers>

    pom.xml

        <repositories>
    [...]
    <repository>
    <id>people.apache.snapshots</id>
    <url>http://repository.apache.org/content/groups/snapshots-group/</url>
    <releases>
    <enabled>false</enabled>
    </releases>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
    </repository>
    </repositories>
    [...]
    <pluginRepositories>
    <pluginRepository>
    <id>apache.snapshots</id>
    <name>Apache Snapshots</name>
    <url>http://repository.apache.org/content/groups/snapshots-group/</url>
    <releases>
    <enabled>false</enabled>
    </releases>
    <snapshots>
    <enabled>true</enabled>
    </snapshots>
    </pluginRepository>
    </pluginRepositories>
    [...]
    <build>
    <finalName>shootout</finalName>
    <defaultGoal>install</defaultGoal>
    <plugins>
    <plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>jetty-maven-plugin</artifactId>
    <version>${jetty.version}</version>
    <configuration>
    <webAppConfig>
    <contextPath>/${project.artifactId}</contextPath>
    <overrideDescriptor>${override-web-xml}</overrideDescriptor>
    </webAppConfig>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>tomcat7-maven-plugin</artifactId>
    <version>2.0-SNAPSHOT</version>
    <configuration>
    <url>http://localhost:8080/manager/html</url>
    <server>tomcat</server>
    <username>admin</username>
    <password>admin</password>
    </configuration>
    </plugin>
    </plugins>
    <pluginManagement>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
    <source>1.6</source>
    <target>1.6</target>
    <encoding>UTF-8</encoding>
    </configuration>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>
    <version>2.9</version>
    <configuration>
    <wtpversion>2.0</wtpversion>
    <downloadSources>true</downloadSources>
    <additionalProjectFacets>
    <jst.jsf>2.0</jst.jsf>
    </additionalProjectFacets>
    </configuration>
    </plugin>
    </plugins>
    </pluginManagement>
    </build>

    gracias por su ayuda y lo siento por la cantidad de preguntas.
    robert

    OriginalEl autor BobBarker

Dejar respuesta

Please enter your comment!
Please enter your name here