Maven cannot find tomcat7 goal while using tomcat7-maven-plugin

1.2k views Asked by At

I'm facing a problem while trying to setup my webapp deployment to tomcat 7 using maven tomcat plugin.

settings.xml:

<server>
  <id>server</id>
  <username>admin</username>
  <password>password</password>
</server>

pom.xml:

<plugin>
  <groupId>org.apache.tomcat.maven</groupId>
  <artifactId>tomcat7-maven-plugin</artifactId>
  <version>2.2</version>
  <configuration>
    <server>server</server>
    <url>http://localhost:8080/manager/text</url>
    <path>/myapp</path>
  </configuration>
</plugin>

When I'm starting to type mvn tom<tab> autocomplete suggests me only mvn tomcat:.

The output for mvn tomcat:list is:

[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'tomcat'.
[INFO] ------------------------------------------------------------------------
[INFO] Building myapp
[INFO]    task-segment: [tomcat:list]
[INFO] ------------------------------------------------------------------------
[INFO] [tomcat:list {execution: default-cli}]
[INFO] Listing applications at http://localhost:8080/manager
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Cannot invoke Tomcat manager

Embedded error: http://localhost:8080/manager/list
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Dec 22 21:37:08 MSK 2013
[INFO] Final Memory: 13M/211M
[INFO] ------------------------------------------------------------------------

It looks like that the tomcat6-maven-plugin is actually in use.

The output for mvn tomcat7:list is:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Required goal not found: tomcat7:list in org.apache.tomcat.maven:tomcat7-maven-plugin:2.2
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Dec 22 21:43:41 MSK 2013
[INFO] Final Memory: 7M/116M
[INFO] ------------------------------------------------------------------------

I'm using Ubuntu 13.10, all software is installed via repository.

1

There are 1 answers

0
Saif Asif On BEST ANSWER

As far as I know , some goals are yet not available with the tomcat7 mojo and mvn tomcat7:list is one of them. mvn tomcat6:list is available for the tomcat6 mojo.