在Maven中混用Java和Scala

主要就是在pom.xml中添加scala的三个依赖包和maven-scala插件,配置如下:



    
        bdap
        com.isoft
        1.0-SNAPSHOT
    
    4.0.0

    bdap.analysis

    
        2.11.8
    

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

    
        
            
                org.scala-tools
                maven-scala-plugin
                2.15.1
                
                    
                        compile-scala
                        
                            add-source
                            compile
                        
                    
                    
                        test-compile-scala
                        
                            add-source
                            testCompile
                        
                    
                
            
        
    


 然后运行mvn clean compile即可看到效果

你可能感兴趣的:(大数据)