Running a scala application in maven project

前端 未结 4 545
遇见更好的自我
遇见更好的自我 2021-01-14 07:30

I am trying to use maven to handle dependencies in a scala project in Eclipse. But once the project is converted to maven, the application wont run anymore.

Here is

4条回答
  •  不要未来只要你来
    2021-01-14 08:04

    Your pom.xml should contain these parts (change the versions of course):

    Repositories:

        
            
                scala-tools.org
                Scala-Tools Maven2 Repository
                http://scala-tools.org/repo-releases
            
        
    

    Plugin repositories:

    
        
            scala-tools.org
            Scala-Tools Maven2 Repository
            http://scala-tools.org/repo-releases
        
    
    

    Dependencies:

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

    Build:

    
        
            
                
                    org.scala-tools
                    maven-scala-plugin
                    2.15.2
                
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    3.1
                
            
        
        
            
                org.scala-tools
                maven-scala-plugin
                
                    
                        scala-compile-first
                        process-resources
                        
                            add-source
                            compile
                        
                    
                
            
        
    
    

提交回复
热议问题