[Scala] Maven Plugin for Eclipse

博客首页 » Scala Maven Plugin for Eclipse

发布于 16 Jan 2016 11:46
标签 blog
eclipse 配置maven和scala插件踩到一个坑,是scala ide + maven必须要装上scala-ide With M2Eclipse才能用。
http://www.xuebuyuan.com/1581782.html

还是用scala原生的sbt方便。

m2eclipse-scala
https://www.assembla.com/wiki/show/scala-ide/With_M2Eclipse
http://alchim31.free.fr/m2e-scala/update-site/

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>net.sf.orassist</groupId>
  <artifactId>mysparkdemo</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>MySparkDemo</name>
  <properties>  
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  
    <org.scala-tools.version>2.15.2</org.scala-tools.version>  
    <scala.library.version>2.10.6</scala.library.version>  
  </properties> 
  <dependencies>  
    <dependency>  
      <groupId>org.scala-lang</groupId>  
      <artifactId>scala-library</artifactId>  
      <version>2.10.6</version>  
    </dependency>
    <dependency>  
      <groupId>junit</groupId>  
      <artifactId>junit</artifactId>  
      <version>4.10</version>  
      <scope>test</scope>  
    </dependency>  
  </dependencies> 
 
  <build>
    <plugins>
      <plugin>  
        <groupId>org.scala-tools</groupId>  
        <artifactId>maven-scala-plugin</artifactId>
        <version>${org.scala-tools.version}</version>  
        <executions>  
          <execution>
            <phase>compile</phase>
            <goals>  
              <goal>compile</goal>  
              <goal>testCompile</goal>  
            </goals>  
          </execution>  
        </executions>  
        <configuration>  
          <sourceDir>src/main/scala</sourceDir>  
          <jvmArgs>  
            <jvmArg>-Xms64m</jvmArg>  
            <jvmArg>-Xmx1024m</jvmArg>  
          </jvmArgs>  
        </configuration>  
      </plugin>
      <!--   
      <sourceDirectory>src/main/scala</sourceDirectory>
      <testSourceDirectory>src/test/scala</testSourceDirectory>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.3</version>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
      -->
    </plugins>
  </build>
</project>

本页面的文字允许在知识共享 署名-相同方式共享 3.0协议和GNU自由文档许可证下修改和再使用,仅有一个特殊要求,请用链接方式注明文章引用出处及作者。请协助维护作者合法权益。


系列文章

文章列表

  • Scala Maven Plugin for Eclipse

这篇文章对你有帮助吗,投个票吧?

rating: 0+x

留下你的评论

Add a New Comment