idea 下通过maven 打包scala项目运行:

idea 通过maven 打包scala项目运行:


    
        3.1.3
        2.10.7
    

    
        
            org.scala-lang
            scala-library
            ${scala.version}
        
        
            org.scala-lang
            scala-compiler
            ${scala.version}
        
    




    
        

            
                org.apache.maven.plugins
                maven-assembly-plugin
                2.5.5
                
                    
                        
                            com.demo.Hello
                        
                    
                    
                        jar-with-dependencies
                    
                
                
                    
                        make-assembly
                        package
                        
                            single
                        
                    
                
            

            
                org.scala-tools
                maven-scala-plugin
                2.15.2
                
                    
                        
                            compile
                            testCompile
                        
                    
                
            
        
    


package com.demo

object Hello {

  def main(args: Array[String]): Unit = {

    println("=========================")
    println("=========================")
    println("Hello World and scala")
    println("=========================")
    println("=========================")
  }
}

打包运行:java -jar Demo.jar


idea 下通过maven 打包scala项目运行:_第1张图片
image

你可能感兴趣的:(idea 下通过maven 打包scala项目运行:)