"webapp"というアーキタイプのMavenプロジェクトを作成しましたが、 "mvn tomcat7:start"コマンドを開始すると、Maven - 現プロジェクトのプレフィックス 'tomcat7'のプラグインが見つかりません
No plugin found for prefix 'tomcat7' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\dark\.m2\repository), central (http://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
マイプロジェクト構造:
-src
-main
-resources
-webapp
-WEB-INF
-web.xml
-index.jsp
-target
-classes
-dependency
- // the 'dependency' directory contains all the jar files
-lbagno
-maven-archiver
-surefire
lbagno.war
私のpom.xmlがうまくTomcatの依存関係が含まれています。
のpom.xml
<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.myspace</groupId>
<artifactId>lbagno</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>lbagno 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.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
<build>
<finalName>lbagno</finalName>
</build>
</project>
それが動作しない理由を私は理解していません。
解決策はありますか?
は
私はMavenプロジェクトを何ヶ月も 'pom.xml'(@RCのような)宣言で問題なくTomcatにデプロイしていましたが、突然明白な変更はなく、壊れました。あなたのソリューションはそれを再び展開しました。 – Merchako
これを特別なケースとしてsettings.xmlに追加するのはなぜですか? –
が既に存在し、私の問題を解決していません – Justin