Error running 'tomcat:run' Cannot run program..CreateProcess error=2,系统找不到指定的文件
Error running 'tomcat:run': Cannot run program "tomcat:run" (in directory "D:\WorkTest\Maven\maven02"): CreateProcess error=2, 系统找不到指定的文件
当看到这样的报错真的难受!!

搞了一下午,换了maven的好多版本,又试了jdk的配置,maven配置也没问题,idea配置也没问题!!!
1.重点来了 用tomcat:run 在工程目录下运行还是一直报错!王德发!!!

难受不!!! (我是跟着视频学敲的)
最后配置了
mvn tomcat7:run 这样才行,码的默认的tomcat有问题啊!考虑默认版本tomcat6有问题, 记住mvn tomcat7:run才可以运行

这是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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>zo1</groupId>
<artifactId>maven02</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging> <name>maven02 Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties> <dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- JSTL -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Servlet核心包 -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<!--JSP -->
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
</dependencies> <build>
<finalName>maven02</finalName>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.1.0</version>
</plugin>
<!-- see http://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_war_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>3.2.2</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.8.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8080</port>
<path>/</path>
</configuration>
</plugin> </plugins>
</pluginManagement>
</build>
</project>
点击输入 mvn tomcat7:run

ok!!!

你**的终于出来了!
Error running 'tomcat:run' Cannot run program..CreateProcess error=2,系统找不到指定的文件的更多相关文章
- Error:C:\Users\issuser\AndroidStudioProjects\SQLiteDemo1\.gradle\buildOutputCleanup\cache.properties (系统找不到指定的文件。)
android studio报下图中的这个错误的解决办法: 解决办法: 1.删除掉下图中标记的2个文件夹 2.将下图标记的文件的文件名重命名,把最后的后缀.lock去掉,因为加上了这个后缀,所以提示找 ...
- daemon not running; starting now at tcp:5037 adb: CreateFileW 'nul' failed: 系统找不到指定的文件
1. INFO - roid.tools.idea.adb.AdbService - Initializing adb using: C:\Users\Administrator\AppData\Lo ...
- Jenkins报错Caused: java.io.IOException: Cannot run program "sh" (in directory "D:\Jenkins\Jenkins_home\workspace\jmeter_test"): CreateProcess error=2, 系统找不到指定的文件。
想在本地执行我的python文件,我本地搭建了一个Jenkins,使用了execute shell来运行我的脚本,发现报错 [jmeter_test] $ sh -xe D:\tomcat\apach ...
- 解决java.io.IOException: Cannot run program "cygpath": CreateProcess error=2, 系统找不到指定的文件 的错误
一.外部环境: 系统环境:Windows 8 磁盘分区:只有C盘 开发环境:IntelliJ IDEA Community Edition 2016.1.3(64) 执行代码:rdd.saveAsTe ...
- IDEA 安装完码云插件,运行报“Cannot run program "xxx":CreateProcess error=2,系统找不到指定的文件”
错误:Cannot run program "E:\Program Files\Git\bin\git.exe":CreateProcess error=2,系统找不到指定的文件 ...
- Cannot run program “git.exe”: createprocess error=2,系统找不到指定的文件
Android Studio提供VCS(Version Control System)版本控制系统,默认情况使用Git.GitHub工具需要配置git.exe路径,否则提示“cannot run pr ...
- PhpStorm中报 “Cannot run program git.exe, 系统找不到指定的文件”
http://blog.csdn.net/lamp_yang_3533/article/details/52003021 在使用PhpStorm的GitHub或Git功能时,经常会出现以下错误信息: ...
- building '_mysql' extension error: [WinError 2] 系统找不到指定的文件。
D:\4yanjiiu\APIzidong\MySQL-python-1.2.5>py running install running bdist_egg running egg_info wr ...
- 无法启动"D\projects\hello\Debug\hello.exe" 系统找不到指定的文件。[LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏]
这两天安装Visual Studio遇到这样的一个问题,用自己的电脑和公司的电脑都出现同样的问题.两台电脑都是新系统,按理来说是没有问题的.但是一出现问题,对于我这个小白来说,还是耗费了挺多精力都无果 ...
随机推荐
- 企业代码版本管理之争:TrunkBased vs GitFlow vs AoneFlow vs OneFlow vs ExeFlow
目录 引言 TrunkBased GitFlow AoneFlow OneFlow ExeFlow 综述 引言 网络上版本管理系统之争持久而喧嚣,依照声量来讲目前应该是Git占了较大的优势.不过我们本 ...
- CodeForces 1058 F Putting Boxes Together 树状数组,带权中位数
Putting Boxes Together 题意: 现在有n个物品,第i个物品他的位置在a[i],他的重量为w[i].每一个物品移动一步的代价为他的w[i].目前有2种操作: 1. x y 将第x的 ...
- CF1005E1 Median on Segments (Permutations Edition) 思维
Median on Segments (Permutations Edition) time limit per test 3 seconds memory limit per test 256 me ...
- CF980B Marlin 构造 思维 二十四
Marlin time limit per test 1 second memory limit per test 256 megabytes input standard input output ...
- 深度递归必须知道的尾调用(Lambda)
引导语 本文从一个递归栈溢出说起,像大家介绍一下如何使用尾调用解决这个问题,以及尾调用的原理,最后还提供一个解决方案的工具类,大家可以在工作中放心用起来. 递归-发现栈溢出 现在我们有个需求,需要计算 ...
- 使用Elastic APM监控你的.NET Core应用
作者:Jax 前言 在应用实际的运维过程中,我们需要更多的日志和监控来让我们对自己的应用程序的运行状况有一个全方位的了解.然而对于大部分开发者而言,平时大家所关注的更多的是如何更优雅的实现业务,或者是 ...
- Redis的最常被问到知识点总结
1.什么是redis? Redis 是一个基于内存的高性能key-value数据库. 2.Reids的特点 Redis本质上是一个Key-Value类型的内存数据库,很像memcached,整个数据库 ...
- 每天学会一点点(spring-mvc.xml与web.xml配置文件)
1.spring-mvc.xml中拦截器的使用 首先在springMVC.xml配置如下代码: <!-- 拦截器 --> <mvc:interceptors> <bean ...
- 阿里雷卷:Reactive 基金会的成立将对开发方式带来哪些影响?
作者 | 赵钰莹 近日,Linux 基金会宣布成立 Reactive 基金会.对于 Reactive,各位开发者应该并不陌生,尤其是 Node.js 开发者,但真正了解并意识到这件事情对开发方式带来的 ...
- .NET Core 3.0 Preview 9 发布
翻译自官方博客 今天,我们宣布推出.NET Core 3.0 Preview 9.就像预览版8一样,我们专注打磨最终版本的.NET Core 3.0,而不是添加新功能.如果这些最终版本看起来不像早期预 ...