报错信息
The requested profile "pom.xml" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.21.0:test (default-test) on project springboot007: There are test failures.
[ERROR]
[ERROR] Please refer to D:\springboot\springboot007\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [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/MojoFailureException
在pom中加入了这个依赖,启动时就报错了,新手求解
<!-- cache -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<!-- redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
是不是网络问题,下载的jar包等不完整,导致出错了,删除你的redis相关的包,然后重新加载试试
可以到maven本地库中将redis相关的目录以及文件。然后点击你的ide中重新加载pom中依赖的库就可以了。
在pom 里面加 这段 跳过测试
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
可以把maven仓库删除,重新加载一次试试~
或者:https://stackoverflow.com/questions/25232541/warning-the-requested-profile-pom-xml-could-not-be-activated-because-it-does-n
maven updata project 或者重新构建一下
找到本地仓库jar路径,删除没有下载下来的Redisjar,在maven updata project
你少写了 version 。maven jar管理怎么可能不用填写jar version
groupId
artifactId
version