我的Heroku Java应用(Telegram机器人)在启动时无法编译。

huangapple 未分类评论54阅读模式
标题翻译

My heroku java app (telegram bot) won't compile at launch

问题

以下是翻译好的内容:

加载我的使用Java(Maven)编写的Telegram机器人时出现了以下错误。

-----> 检测到Java应用
-----> 安装JDK 1.8... 完成
-----> 安装Maven 3.6.2... 完成
-----> 执行Maven
$ mvn -DskipTests clean dependency:list install
[INFO] 正在扫描项目...
[WARNING]
[WARNING] 构建有效模型org.example:GesualdoBot:jar:1.0-SNAPSHOT时出现一些问题
[WARNING] 对于org.apache.maven.plugins:maven-compiler-plugin的'build.plugins.plugin.version'缺失。位于第12行,第21列
[WARNING]
[WARNING] 强烈建议修复这些问题,因为它们威胁到构建的稳定性。
[WARNING]
[WARNING] 出于这个原因,未来的Maven版本可能不再支持构建这种格式不正确的项目。
[WARNING]
[INFO]
[INFO] ----------------------< org.example:GesualdoBot >-----------------------
[INFO] 正在构建GesualdoBot 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ GesualdoBot ---
[INFO] 正在删除/tmp/build_86eafd8379099658ed8301a1e005ecb8/target
[INFO]
[INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ GesualdoBot ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ GesualdoBot ---
[WARNING] 使用平台编码(实际上是UTF-8)来复制过滤后的资源,即构建是平台相关的!
[INFO] 跳过不存在的资源目录/tmp/build_86eafd8379099658ed8301a1e005ecb8/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ GesualdoBot ---
[INFO] 检测到更改 - 正在重新编译模块!
[WARNING] 文件编码尚未设置,使用平台编码UTF-8,即构建是平台相关的!
[INFO] 正在将4个源文件编译到/tmp/build_86eafd8379099658ed8301a1e005ecb8/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] 总时间:2.370秒
[INFO] 完成于:2020-05-27T18:45:46Z
[INFO] ------------------------------------------------------------------------
[ERROR] 未能执行目标org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)于项目GesualdoBot:编译失败 -> [帮助 1]
[ERROR]
[ERROR] 要查看错误的完整堆栈跟踪,请重新使用-e开关运行Maven。
[ERROR] 使用-X开关重新运行Maven,以启用完整的调试日志记录。
[ERROR]
[ERROR] 有关错误和可能的解决方案的更多信息,请阅读以下文章:
[ERROR] [帮助 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
! 错误:使用Maven构建应用失败
很抱歉,此构建失败!如果您在应用程序代码中找不到问题,
请提交工单,以便我们提供帮助:https://help.heroku.com/
! 推送被拒绝,无法编译Java应用程序。
! 推送失败

有人可以告诉我如何解决这个问题吗?我认为第一个警告是因为在我的pom.xml文件中没有为maven-compiler-plugin指定版本;有人知道我如何查看我正在使用的当前版本吗?

英文翻译

The following error occurred while loading my telegram bot written in Java (Maven).

-----&gt; Java app detected
-----&gt; Installing JDK 1.8... done
-----&gt; Installing Maven 3.6.2... done
-----&gt; Executing Maven
       $ mvn -DskipTests clean dependency:list install
       [INFO] Scanning for projects...
       [WARNING] 
       [WARNING] Some problems were encountered while building the effective model for org.example:GesualdoBot:jar:1.0-SNAPSHOT
       [WARNING] &#39;build.plugins.plugin.version&#39; for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 12, column 21
       [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] ----------------------&lt; org.example:GesualdoBot &gt;-----------------------
       [INFO] Building GesualdoBot 1.0-SNAPSHOT
       [INFO] --------------------------------[ jar ]---------------------------------
       [INFO] 
       [INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ GesualdoBot ---
       [INFO] Deleting /tmp/build_86eafd8379099658ed8301a1e005ecb8/target
       [INFO] 
       [INFO] --- maven-dependency-plugin:2.8:list (default-cli) @ GesualdoBot ---
       [INFO] 
       [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ GesualdoBot ---
       [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
       [INFO] skip non existing resourceDirectory /tmp/build_86eafd8379099658ed8301a1e005ecb8/src/main/resources
       [INFO] 
       [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ GesualdoBot ---
       [INFO] Changes detected - recompiling the module!
       [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
       [INFO] Compiling 4 source files to /tmp/build_86eafd8379099658ed8301a1e005ecb8/target/classes
       [INFO] ------------------------------------------------------------------------
       [INFO] BUILD FAILURE
       [INFO] ------------------------------------------------------------------------
       [INFO] Total time:  2.370 s
       [INFO] Finished at: 2020-05-27T18:45:46Z
       [INFO] ------------------------------------------------------------------------
       [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project GesualdoBot: Compilation failure -&gt; [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
 !     ERROR: Failed to build app with Maven
       We&#39;re sorry this build is failing! If you can&#39;t find the issue in application code,
       please submit a ticket so we can help: https://help.heroku.com/
 !     Push rejected, failed to compile Java app.
 !     Push failed

Can anyone tell me how to solve the problem? I think the first warning is detected because in my pom.xml file I have not specified a version for maven-compiler-plugin; does anyone know how do i see the current version i am using?

huangapple
  • 本文由 发表于 2020年5月31日 02:01:59
  • 转载请务必保留本文链接:https://java.coder-hub.com/62106634.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定