Eclipse 如何在maven构建期间解决缺少的context.xml?

Eclipse 如何在maven构建期间解决缺少的context.xml?,eclipse,maven,Eclipse,Maven,我使用Eclipse构建了一个maven web应用程序,并在目标中设置了以下命令:install tomcat:deploy。当我构建应用程序时,我遇到以下错误: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.ht

我使用Eclipse构建了一个maven web应用程序,并在目标中设置了以下命令:
install tomcat:deploy
。当我构建应用程序时,我遇到以下错误:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building web4 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ web4 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ web4 ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ web4 ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ web4 ---
[INFO] Packaging webapp
[INFO] Assembling webapp [web4] in [/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/kokhoe/workspace/web4/src/main/webapp]
[INFO] Webapp assembled in [71 msecs]
[INFO] Building war: /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ web4 ---
[INFO] Installing /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war to /home/kokhoe/.m2/repository/org/huahsin/web4/0.0.1-SNAPSHOT/web4-0.0.1-SNAPSHOT.war
[INFO] Installing /home/kokhoe/workspace/web4/pom.xml to /home/kokhoe/.m2/repository/org/huahsin/web4/0.0.1-SNAPSHOT/web4-0.0.1-SNAPSHOT.pom
[INFO] 
[INFO] >>> tomcat-maven-plugin:1.1:deploy (default-cli) @ web4 >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ web4 ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ web4 ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/kokhoe/workspace/web4/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ web4 ---
[INFO] Not compiling test sources
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ web4 ---
[INFO] Tests are skipped.
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ web4 ---
[INFO] Packaging webapp
[INFO] Assembling webapp [web4] in [/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/kokhoe/workspace/web4/src/main/webapp]
[INFO] Webapp assembled in [14 msecs]
[INFO] Building war: /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war
[INFO] WEB-INF/web.xml already added, skipping
[INFO] 
[INFO] <<< tomcat-maven-plugin:1.1:deploy (default-cli) @ web4 <<<
[INFO] 
[INFO] --- tomcat-maven-plugin:1.1:deploy (default-cli) @ web4 ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.938s
[INFO] Finished at: Mon Sep 17 12:16:34 MYT 2012
[INFO] Final Memory: 18M/215M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:tomcat-maven-plugin:1.1:deploy (default-cli) on project web4: Cannot find context file: /home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT/META-INF/context.xml -> [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/MojoExecutionException
SLF4J:未能加载类“org.SLF4J.impl.StaticLoggerBinder”。
SLF4J:默认为无操作(NOP)记录器实现
SLF4J:参见http://www.slf4j.org/codes.html#StaticLoggerBinder 详情请参阅。
[信息]正在扫描项目。。。
[信息]
[信息]------------------------------------------------------------------------
[信息]构建web4 0.0.1-SNAPSHOT
[信息]------------------------------------------------------------------------
[信息]
[信息]---maven资源插件:2.5:resources(默认资源)@web4---
[调试]执行上下文化
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的resourceDirectory/home/kokhoe/workspace/web4/src/main/resources
[信息]
[信息]---maven编译器插件:2.3.2:编译(默认编译)@web4---
[信息]无需编译-所有类都是最新的
[信息]
[信息]---maven资源插件:2.5:testResources(默认testResources)@web4---
[调试]执行上下文化
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的resourceDirectory/home/kokhoe/workspace/web4/src/test/resources
[信息]
[信息]---maven编译器插件:2.3.2:testCompile(默认testCompile)@web4---
[信息]未编译测试源
[信息]
[信息]---maven surefire插件:2.10:test(默认测试)@web4---
[信息]跳过测试。
[信息]
[信息]---maven war插件:2.1.1:war(默认war)@web4---
[信息]打包webapp
[信息]在[/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT]中组装webapp[web4]
[信息]处理战争项目
[信息]正在复制webapp资源[/home/kokhoe/workspace/web4/src/main/webapp]
[信息]Webapp在[71毫秒]内组装完成
[信息]构建战争:/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war
[INFO]WEB-INF/WEB.xml已添加,正在跳过
[信息]
[信息]---maven安装插件:2.3.1:install(默认安装)@web4---
[信息]安装/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war到/home/kokhoe/.m2/repository/org/huahsin/web4/0.0.1-SNAPSHOT/web4-0.0.1-SNAPSHOT.war
[信息]安装/home/kokhoe/workspace/web4/pom.xml至/home/kokhoe/.m2/repository/org/huahsin/web4/0.0.1-SNAPSHOT/web4-0.0.1-SNAPSHOT.pom
[信息]
[信息]>>>tomcat maven插件:1.1:deploy(默认cli)@web4>>>
[信息]
[信息]---maven资源插件:2.5:resources(默认资源)@web4---
[调试]执行上下文化
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的resourceDirectory/home/kokhoe/workspace/web4/src/main/resources
[信息]
[信息]---maven编译器插件:2.3.2:编译(默认编译)@web4---
[信息]无需编译-所有类都是最新的
[信息]
[信息]---maven资源插件:2.5:testResources(默认testResources)@web4---
[调试]执行上下文化
[信息]使用“UTF-8”编码复制筛选的资源。
[信息]跳过不存在的resourceDirectory/home/kokhoe/workspace/web4/src/test/resources
[信息]
[信息]---maven编译器插件:2.3.2:testCompile(默认testCompile)@web4---
[信息]未编译测试源
[信息]
[信息]---maven surefire插件:2.10:test(默认测试)@web4---
[信息]跳过测试。
[信息]
[信息]---maven war插件:2.1.1:war(默认war)@web4---
[信息]打包webapp
[信息]在[/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT]中组装webapp[web4]
[信息]处理战争项目
[信息]正在复制webapp资源[/home/kokhoe/workspace/web4/src/main/webapp]
[信息]Webapp在[14毫秒]内组装完成
[信息]构建战争:/home/kokhoe/workspace/web4/target/web4-0.0.1-SNAPSHOT.war
[INFO]WEB-INF/WEB.xml已添加,正在跳过
[信息]

[INFO]我已在maven目标中使用此命令解决了问题:


安装tomcat:run

我在maven目标中使用此命令解决了问题:


安装tomcat:run

context.xml的真正位置在哪里?你有没有加上。。。(不包括xml吗?)到构建部分的pom?context.xml的真正位置在哪里?你有没有加上。。。(不排除xml吗?)?