有没有办法在 IntelliJ IDEA 中打开项目时自动激活 Maven 配置文件?
对于 Eclipse,这可以通过使用属性 m2e.version 进行激活来完成,我认为 IDEA 可能有类似的东西。
<profiles>
<profile>
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<directory>${project.basedir}/eclipse-target</directory>
</build>
</profile>
</profiles>
我基本上想要的是为 IDEA 提供一个单独的构建目录。这对于在命令行上运行 mvn 命令而不会弄乱 IDE 很有用。