how to specify maven compiler plugin order

前端 未结 4 851
故里飘歌
故里飘歌 2021-02-10 17:29

I\'m working on a mixed java and kotlin project by using maven.

The problem I\'m facing right now is, maven-compiler-plugin runs before compiling kotl

4条回答
  •  悲&欢浪女
    2021-02-10 18:07

    The Kotlin documentation on Using Maven suggests explicitly binding the kotlin-maven-plugin execution to the process-sources phase. Since maven-compiler-plugin is bound to the compile phase, binding kotlin-maven-plugin to the process-sources phase makes it run first.

    
        kotlin-maven-plugin
        org.jetbrains.kotlin
        ${kotlin.version}
    
        
            
                compile
                process-sources
                 compile 
            
    
            
                test-compile
                process-test-sources
                 test-compile 
            
        
    
    

提交回复
热议问题