Intellij Project Make和Maven Compile之间的区别? [英] Difference between intellij Project make and Maven Compile?

查看:2992
本文介绍了Intellij Project Make和Maven Compile之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



在intellij中创建 - > Make Project和Maven Projects - > Root pom - >编译阶段有什么区别?调用maven?
他们都将源编译到同一个地方吗?
他们都复制资源文件吗?
为什么我们需要这两个选项?
intellij自动下载依赖项,我们可以调用项目make,而不使用maven编译?



解决方案

在执行任务方面类似,它是默认使用javax.tools.JavaCompiler编译项目的源和测试路径。



是否intellij调用maven?



没有默认值。请记住,这只是IntelliJ内置的Java编译器,一些Java项目不使用maven。



它们都将源编译到同一个地方吗?



是的,他们使用相同的源文件进行编译,如果这是您在这里要求的。



他们是否复制资源文件?



是的,他们都将资源文件复制到不同的位置。



为什么我们需要这两个选项?



我们不需要这两个选项。 Maven编译命令检查源代码是否有效地涵盖了IntelliJ的make选项所完成的任何语法错误。



intellij会自动下载依赖项,调用项目make,而不使用maven编译?



Intellij的编译器可以被认为是语法编译器,这就是为什么你需要maven来处理项目的依赖关系。


When working in maven module, what's the difference between doing in intellij build -> Make Project and Maven Projects -> Root pom -> Compile phase.

Does intellij calls maven? Does both of them compile the sources to the same place? Do they both copy resources files? Why do we need both options? Does intellij download the dependencies automatically and we can just call project make, without using maven compile?

解决方案

They are actually quite similar in terms of the task they perform which is to compile the source and test paths of the project with javax.tools.JavaCompiler by default.

Does intellij call maven?

No it doesn't by default. Remember that this is just IntelliJ's built in Java compiler and some Java projects don't use maven.

Does both of them compile the sources to the same place?

Yes, they use the same source files to compile if that's what you are asking here.

Do they both copy resources files?

Yes they both copy the resource files to different locations though.

Why do we need both options?

We don't need both options. Maven compile command checks the source code against any syntactical errors which effectively covers the work done by IntelliJ's make option.

Does intellij download the dependencies automatically and we can just call project make, without using maven compile?

Intellij's compiler can be considered as syntax compiler which is why you need maven to handle your project's dependencies.

这篇关于Intellij Project Make和Maven Compile之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆