简体   繁体   中英

Eclipse build automatically vs (Ant/Maven/Gradle)

Eclipse自动构建与构建工具(Ant / Maven / Gradle)之间有什么区别?

Build automatically means incrementally compile Java code on save by Eclipse own Java compiler, whereas a full Ant/Maven/Gradle build usually uses javac to compile the code and also does other things, eg creating of a JAR.

In Eclipse it's not versus , but an interplay of both:

  1. You specify the dependencies in the pom.xml or build.gradle file
  2. Maven/Gradle (embedded and triggered by Eclipse) resolves the dependencies and downloads the missing JARs into a local repository (Ant does not support this)
  3. Eclipse incremental compiles the code (the required classpath is computed from the pom.xml / build.gradle file)
    • → Problems and quick fixes are displayed
    • → Code can be instantly executed
  4. To create artifacts to deploy, run Ant/Maven/Gradle build
    • → Same artifacts independent where it has been built

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM