Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Maven多模块项目在eclipse中的tomcat上运行_Java_Maven_Web_Tomcat7_Multi Module - Fatal编程技术网

Java Maven多模块项目在eclipse中的tomcat上运行

Java Maven多模块项目在eclipse中的tomcat上运行,java,maven,web,tomcat7,multi-module,Java,Maven,Web,Tomcat7,Multi Module,我有一个maven多模块项目,其结构定义如下 我想使用maven在tomcat上运行这个项目,不进行war,然后在服务器上部署,而是为此使用maven插件 我在web模块中添加了这个插件 <plugins> <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-

我有一个maven多模块项目,其结构定义如下

我想使用maven在tomcat上运行这个项目,不进行war,然后在服务器上部署,而是为此使用maven插件

我在web模块中添加了这个插件

<plugins>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <url>http://localhost:8080/manager/text</url>
                    <server>mytomcat</server>
                    <path>/BATest</path>
                    <username>tomcat</username>
                    <password>s3cret</password>
                </configuration>
            </plugin>

这种方法在简单的maven web项目中运行良好。请为多模块maven项目提供帮助。

请阅读错误消息:
在中找不到前缀为“tomcat7”的插件。
。您必须给出
mvn包org.apache.tomcat.maven:tomcat7 maven plugin:run
…请阅读错误消息:
在…
中未找到前缀为“tomcat7”的插件。您必须给出
mvn包org.apache.tomcat.maven:tomcat7 maven plugin:run
。。。。
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] desktop
[INFO] JavaLearning
[INFO] web
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 6.2 KB/sec)
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 9.3 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] desktop ............................................ SKIPPED
[INFO] JavaLearning ....................................... SKIPPED
[INFO] web ................................................ SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.897 s
[INFO] Finished at: 2017-05-07T18:25:07+05:00
[INFO] Final Memory: 12M/108M
[INFO] ------------------------------------------------------------------------
[ERROR] 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 (D:\Development\MAVEN_REPO), central (https://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.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException