Running a scala application in maven project

前端 未结 4 517
遇见更好的自我
遇见更好的自我 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:18

    http://scala-tools.org/repo-releases is deprecated, here is a working pom.xml :

    
    4.0.0
    test
    test
    0.0.1-SNAPSHOT
    
    
        
            scala-tools.org
            Scala-tools Maven2 Repository
            https://oss.sonatype.org/content/groups/scala-tools/
        
    
    
    
        
            scala-tools.org
            Scala-tools Maven2 Repository
            https://oss.sonatype.org/content/groups/scala-tools/
        
    
    
    
        
            org.scala-lang
            scala-library
            2.11.4
        
        
            junit
            junit
            3.8.1
            test
        
    
    
    
        src
        
            
                
                    net.alchim31.maven
                    maven-scala-plugin
                    3.2.0
                
                
                    org.apache.maven.plugins
                    maven-compiler-plugin
                    3.1
                
            
        
        
            
                org.scala-tools
                maven-scala-plugin
                
                    
                        scala-compile-first
                        process-resources
                        
                            add-source
                            compile
                        
                    
                
            
        
    
    
    
    

    To run the application :

    run -> scala application

    • project : test
    • main class : test.hello_world

提交回复
热议问题