[WARNING] The requested profile "pom.xml" could not be activated because it does not exist.

一、前言

    前两天用eclipse建了一个spring boot项目,建完直接clean-install来着,结果第一步clean就给我报了一个这么个错。

二、解决

    一开始我以为是maven仓库依赖方面的问题,检查了各项配置,没有任何问题;于是各种百度,大多都是说什么JDK版本、maven依赖方面的问题,有说改run configration的,有说检查JDK版本的,还有说把仓库删了重搞,一脸懵逼有木有;跑去google结果也是大同小异。

    最后直接比对我本地另一个运行正常的项目,最终发现是项目properties>>>maven中avtive maven profiles的问题,只需要删去pom.xml就行了

三、问题分析

    本人对问题原因了解不够,未能明确问题原因。但根据期间查阅的资料,很大可能是在maven的settting.xml文件中需要配置激活profile,而此处填写的应该是激活的profile的那个ID值(ID值为自定义);依据是maven文档中对profiles的激活一节中所提到的知识点。欢迎大佬补充。

The requested profile "tomcat7:run" could not be activated because it does not exist. [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.074 s [INFO] Finished at: 2025-06-05T16:04:32+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "tomcat7:run" could not be activated because it does not exist. [ERROR] No goals have been specified for this build. You must specify a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal> or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>. Available lifecycle phases are: pre-clean, clean, post-clean, validate, initialize, generate-sources, process-sources, generate-resources, process-resources, compile, process-classes, generate-test-sources, process-test-sources, generate-test-resources, process-test-resources, test-compile, process-test-classes, test, prepare-package, package, pre-integration-test, integration-test, post-integration-test, verify, install, deploy, pre-site, site, post-site, site-deploy. -> [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/NoGoalSpecifiedException
06-07
"D:\JAVA JDK\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\code\EPM\epmcloud-pdm-server -Djansi.passthrough=true -Dmaven.home=D:\maven\apache-maven-3.6.3 -Dclassworlds.conf=D:\maven\apache-maven-3.6.3\bin\m2.conf "-Dmaven.ext.class.path=D:\JAVAIDEA\JetBrains\IntelliJ IDEA Community Edition 2024.2.1\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\JAVAIDEA\JetBrains\IntelliJ IDEA Community Edition 2024.2.1\lib\idea_rt.jar=62728:D:\JAVAIDEA\JetBrains\IntelliJ IDEA Community Edition 2024.2.1\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath D:\maven\apache-maven-3.6.3\boot\plexus-classworlds-2.6.0.jar;D:\maven\apache-maven-3.6.3\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2024.2.1 -s D:\maven\apache-maven-3.6.3\conf\settings-epm.xml -Dmaven.repo.local=D:\maven\maven-erdc install [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for epm.cloud:epmcloud-pdm-starter:pom:3.1.2 [WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: erd.cloud:erdcloud-mq-client:jar -> duplicate declaration of version ${erdcloud-sdk.version} @ epm.cloud:epmcloud-pdm-server:3.1.2, D:\code\EPM\epmcloud-pdm-server\pom.xml, line 273, column 25 [WARNING] [WARNING] Some problems were encountered while building the effective model for epm.cloud:epmcloud-pdm-server:pom:3.1.2 [WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: erd.cloud:erdcloud-mq-client:jar -> duplicate declaration of version ${erdcloud-sdk.version} @ line 273, column 25 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] ------------------------------------------------------------------------ [INFO] Reactor Build Order: [INFO] [INFO] epmcloud-pdm-server [pom] [INFO] epmcloud-pdm-sdk [jar] [INFO] epmcloud-pdm-api [jar] [INFO] epmcloud-pdm-service [jar] [INFO] epmcloud-pdm-starter [pom] [INFO] epmcloud-pdm-app [jar] [INFO] epmcloud-pdm-plugin [pom] [INFO] epmcloud-pdm-sso [jar] [INFO] [INFO] -------------------< epm.cloud:epmcloud-pdm-server >-------------------- [INFO] Building epmcloud-pdm-server 3.1.2 [1/8] [INFO] --------------------------------[ pom ]--------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for epmcloud-pdm-server 3.1.2: [INFO] [INFO] epmcloud-pdm-server ................................ FAILURE [ 1.281 s] [INFO] epmcloud-pdm-sdk ................................... SKIPPED [INFO] epmcloud-pdm-api ................................... SKIPPED [INFO] epmcloud-pdm-service ............................... SKIPPED [INFO] epmcloud-pdm-starter ............................... SKIPPED [INFO] epmcloud-pdm-app ................................... SKIPPED [INFO] epmcloud-pdm-plugin ................................ SKIPPED [INFO] epmcloud-pdm-sso ................................... SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.642 s [INFO] Finished at: 2025-08-05T14:11:12+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "nexus" could not be activated because it does not exist. [ERROR] Failed to execute goal on project epmcloud-pdm-server: Could not resolve dependencies for project epm.cloud:epmcloud-pdm-server:pom:3.1.2: Failed to collect dependencies at erd.cloud:erdcloud-mq-client:jar:3.2.4 -> erd.cloud:erdcloud-mq-rocketmq:jar:3.2.4-1 -> org.apache.rocketmq:rocketmq-spring-boot-starter:jar:2.3.1 -> org.apache.rocketmq:rocketmq-spring-boot:jar:2.3.1 -> org.apache.rocketmq:rocketmq-client:jar:5.3.0 -> org.apache.rocketmq:rocketmq-remoting:jar:5.3.0 -> org.apache.rocketmq:rocketmq-common:jar:5.3.0 -> io.grpc:grpc-netty-shaded:jar:1.53.0 -> io.grpc:grpc-core:jar:[1.53.0]: No versions available for io.grpc:grpc-core:jar:[1.53.0] within specified range -> [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/DependencyResolutionException
最新发布
08-06
[INFO] Scanning for projects... [INFO] [INFO] ---------------< com.longshare.ta:parameter-center-run >---------------- [INFO] Building parameter-center-run 2023.7-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for com.longshare.ta:parameter-center-support:jar:2023.7-SNAPSHOT is missing, no dependency information available [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 1.463 s [INFO] Finished at: 2023-07-16T21:44:34+08:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "as" could not be activated because it does not exist. [ERROR] Failed to execute goal on project parameter-center-run: Could not resolve dependencies for project com.longshare.ta:parameter-center-run:jar:2023.7-SNAPSHOT: Failure to find com.longshare.ta:parameter-center-support:jar:2023.7-SNAPSHOT in https://repo.91asl.com:9443/nexus/repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of maven-public has elapsed or updates are forced -> [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/DependencyResolutionException Process finished with exit code 1
07-17
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值