简体   繁体   中英

How to set up IntelliJ external Scala compiler for Maven projects

I'm using IntelliJ 13 community version. I have a Maven project with multiple modules. Currently, I'm using IntelliJ internal compiler. I find that every time I run maven clean XXX, I have to manually trigger Scala rebuild in IntelliJ before I run any Cucumber acceptance tests. Otherwise IntelliJ will complaints "no class file". It is annoying. It takes 2 to 3 minutes for the clean re-build.

Finally, I decide to try the external compiler. I have no idea how to do it. I does not seems as easy as enable external compiler.

Can any one please teach me how to properly set up external compiler for a multi-module maven Scala project?

Maven clean command deletes your jar and target folder. therefor you need to compile the maven project with the maven command "compile" / "install" after clean . if you want to use your command line to clean and compile you can run $ mvn clean compile . but actually since "clean" is the 1st step at maven's build life cycle you only need to run the compile command . it will run "clean" (or $ mvn compile ) as the 1st step of the build .

check out maven build life cycle here

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