The requested profile "test" could not be activated because it does not exist.

标签: springboot maven
7人阅读 评论(0) 收藏 举报
分类:

SpringBoot项目在执行mvn install命令时出现以下问题:

[WARNING] The requested profile "test" could not be activated because it does not exist.
[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.3.3.RELEASE:repackage (default) on project mobile: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.3.3.RELEASE:repackage failed: Unable to find main class -> [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/PluginExecutionException

由repackage failed: Unable to find main class可以发现是没找到主类。
但事实是SpringBoot的启动类是已经写好了的。
错误原因:
在SpringBoot描述的包中存在其它的带有main方法的类。
删除main方法即可以解决以上问题。

查看评论

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

  • qq_32143169
  • qq_32143169
  • 2017-07-26 11:21:21
  • 8036

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

在命令行 mvn clean install -Dmaven.test.skip=true
  • zhangka002
  • zhangka002
  • 2016-11-09 19:18:02
  • 1121

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

今天初识SpringBoot。在启动项目后发现一个问题。我的SwaggerUI页面无法加在相应的js与css。并且maven加载时提示 [WARNING] The requested profi...
  • strophe
  • strophe
  • 2017-11-03 16:41:18
  • 6140

The service cannot be activated because it does not support ASP.NET compatibility

部署WCF时遇到这么个错: "The service cannot be activated because it does not supportASP.NET compatibility. AS...
  • woniu1104913
  • woniu1104913
  • 2015-09-29 14:43:14
  • 1230

一起学Maven(Maven仓库管理器之应用Nexus)<六>

hosted,本地仓库,这个仓库主要是用来存放本地的依赖包,服务于局域网,不访问公网 proxy,代理仓库,用来存放nexus从公网中获取的依赖包,这里有中央仓库,Apache和Codehaus开源网...
  • songdeitao
  • songdeitao
  • 2014-03-08 13:41:03
  • 6207

解决 service cannot be activated because it requires ASP.NET compatibility. ASP.NET compatibility is

解决 wcf The service cannot be activated because it requires ASP.NET compatibility. ASP.NET compatibil...
  • xiaoguang44
  • xiaoguang44
  • 2011-12-01 11:34:16
  • 3015

WCF The service cannot be activated because it does not support ASP.NET compatibility

测试发布到虚拟目录中时发生的报错现象,由于不支持asp.net兼容性而导致服务无法激活启用。具体错误信息如下:Server Error in '/Service2' Application. ----...
  • xunzaosiyecao
  • xunzaosiyecao
  • 2015-09-24 13:56:07
  • 2145

spark-1.4.1-bin-cdh5.3.2 Maven编译

spark-1.4.1-bin-cdh5.3.2 Maven编译
  • u011414200
  • u011414200
  • 2015-10-26 17:37:34
  • 4031

spark安装和编译

1、去官网下载spark,如果找不到你要的版本,随便点击下载一个。把地址复制出来,在浏览器地址栏中粘贴。去掉后面的具体位置,打开,进入父目录,找一个你要的下载。如果没有对应的hadoop版本,比如说2...
  • u013239621
  • u013239621
  • 2017-11-05 10:52:35
  • 100

Maven无法正常加载nexus私服3rd party中类库

导入项目后,项目是由maven构建的,公司搭建的有nexus 私服,用maven构建各个项目时不小心也在调eclipse配置,导致构建中断.重新构建时,一直提示失败: [WARNING] The...
  • FengYe_YuLu
  • FengYe_YuLu
  • 2017-08-23 20:27:22
  • 1537
    个人资料
    专栏达人 持之以恒
    等级:
    访问量: 30万+
    积分: 3260
    排名: 1万+
    博客专栏
    最新评论