最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】VSCode中调试Java用maven的pom.xml还是gradle的build.gradle

Java crifan 2088浏览 0评论
折腾:
【记录】VSCode中参考java的官网教程确认调试环境配置是否正确
期间,此处,VSCode中进行Java开发,想要调试java代码,但是检测出一堆问题。还提示让去设置maven等内容。
说是,需要配置好项目才行。
但是此处,要去搞清楚:到底是用pom.xml 还是 build.gradle ?
点击前面的:Update Project Configuration
提示:
No Java project to update!
没有给出要的解释
Maven for Java – Visual Studio Marketplace
好像推荐用maven,且看起来也简单方便够用
vscode debug java use pom.xml or build.gradle
vscode java which  pom.xml build.gradle
Maven Support, Java Package, and Dependency Management in Visual Studio Code
官网中,也是貌似只提到了maven,没说gradle
Gradle support · Issue #10 · redhat-developer/vscode-java · GitHub
也提到了:2016年的评论“+1. Maven has been all but replaced by Gradle on any new projects that I know of. Without Gradle support, the plugin is not really usable :-/”
而自己也依稀记得:之前有人说过,现在多数用gradle,而不用maven了。
终极指南:如何使用Visual Studio Code进行 Java 开发?-InfoQ
Visual Studio Code for Java: The Ultimate Guide 2019
VSCode+Gradle搭建Java开发环境_Blues Feng的博客-CSDN博客
安装Gradle
创建Gradle工程
Vscode Java
注:此处不支持Android的gradle
Gradle support · Issue #10 · redhat-developer/vscode-java · GitHub
vscode maven vs gradle
Gradle vs Visual Studio Code | What are the differences?
Spring Boot support in Visual Studio Code
java maven vs gradle
Java构建工具:Maven与Gradle的对比 – 知乎
还是gradle用起来清爽
Gradle Build Tool
Ant vs Maven vs Gradle | Baeldung
Gradle | Gradle vs Maven Comparison
Gradle vs. Maven – DZone Java
【总结】
  • Maven是pom.xml
  • Gradle是:build.gradle
所以问题变成:
此处VSCode调试Java,用Maven还是Gradle
  • Maven:用的最广,最多
  • Gradle:新出来的,用起来清爽
    • 和maven比这些做的更好:
      • flexibility
      • performance
        • gradle支持增量编译incremental build
          • Incremental compilations for Java classes
          • Compile avoidance for Java
          • The use of APIs for incremental subtasks
          • A compiler daemon that also makes compiling a lot faster
      • user experience
      • dependency management
        • gradle支持
          • The use of substitution rules for compatible libraries
          • The use of ReplacedBy rules
          • Better metadata resolution
          • The ability to dynamically replace project dependencies with external ones, and vice versa
自己暂时用:gradle的build.gradle

转载请注明:在路上 » 【已解决】VSCode中调试Java用maven的pom.xml还是gradle的build.gradle

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.194 seconds, using 22.07MB memory