简体   繁体   English

intellij 中的 maven 编译器

[英]maven compiler in intellij

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.0</version>
            <configuration>
                <release>11</release>
            </configuration>
        </plugin>
    </plugins>
</build>

What is the point of using maven in intellij if it dose not work without setting the correct JDK under various intellij options?如果没有在各种 intellij 选项下设置正确的 JDK 就不能工作,那么在 intellij 中使用 maven 有什么意义? What I mean is that now with intellij I have to set the JDK in 3 different places.我的意思是现在使用 intellij 我必须在 3 个不同的地方设置 JDK。

  1. File->Setting->Build->Compiler文件->设置->构建->编译器
  2. File->Project Structure->Project文件->项目结构->项目
  3. File->Project Structure->Modules文件->项目结构->模块

While I aspect expect that when i compiler on the right side where are the maven options it works just by watching the pom file.虽然我希望当我在右侧编译时,maven 选项在哪里,它只是通过观察 pom 文件来工作。

i think that depends on what type of project you want to make but personally i find maven nice to use because you can set up several actions in the pom file (for example when compiling Less files, excluding them from the build and just using the resulting css files).我认为这取决于您想要制作什么类型的项目,但我个人觉得 maven 很好用,因为您可以在 pom 文件中设置多个操作(例如,在编译 Less 文件时,将它们从构建中排除并仅使用结果css 文件)。

another feature would be the easy way to add dependency's from the maven rep http://mvnrepository.com/另一个功能是从 maven 代表http://mvnrepository.com/添加依赖项的简单方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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