前辈的Linux学习心得
2015-08-05 09:34
726 查看
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-eclipse-plugin</artifactId> <configuration> <downloadSources>true</downloadSources> <buildcommands> <buildcommand>org.scala-ide.sdt.core.scalabuilder</buildcommand> </buildcommands> <projectnatures> <projectnature>org.scala-ide.sdt.core.scalanature</projectnature> <projectnature>org.eclipse.jdt.core.javanature</projectnature> </projectnatures> <classpathContainers> <classpathContainer>org.eclipse.jdt.launching.JRE_CONTAINER </classpathContainer> <classpathContainer>org.scala-ide.sdt.launching.SCALA_CONTAINER </classpathContainer> </classpathContainers> <sourceIncludes> <sourceInclude>**/*.scala</sourceInclude> <sourceInclude>**/*.java</sourceInclude> </sourceIncludes> </configuration> </plugin> <plugin> <groupId>org.scala-tools</groupId> <artifactId>maven-scala-plugin</artifactId> <executions> <execution> <goals> <goal>compile</goal> <goal>testCompile</goal> </goals> <configuration> <args> <arg>-encoding</arg> <arg>GBK</arg> </args> <includes> <!-- Don't have the scala compiler consider *.java files. --> <include>**/*.scala</include> </includes> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>1.7</version> <executions> <execution> <id>add-source</id> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>src/main/scala</source> </sources> </configuration> </execution> <execution> <id>add-test-source</id> <phase>generate-sources</phase> <goals> <goal>add-test-source</goal> </goals> <configuration> <sources> <source>src/test/scala</source> </sources> </configuration> </execution> </executions> </plugin>
同时增加对scala-library的依赖:
<dependency> <groupId>org.scala-lang</groupId> <artifactId>scala-library</artifactId> <version>2.9.2-SNAPSHOT</version> </dependency>
接着创建src/main/scala和src/test/scala目录即可。
如果你的工程使用GBK编码的,记住一定要加上上面红色表示的配置,否则会报如下错误:
[ERROR] error: IO error while decoding ... with UTF-8
相关文章推荐
- 批量修改文件和文件夹权限
- Edison Ubilinux Access Point
- Linux内核驱动之GPIO子系统(一)GPIO的使用
- linux下fastboot烧录的方法
- Linux应用笔记:Linux下设置和查看环境变量
- 如何分析Linux日志
- 如何分析Linux日志
- Linux系统下将电脑配置成路由器
- Linux学习笔记1_用户和权限
- 嵌入式系统(Linux&Android)学习路线
- centos postfix 邮箱安装记录
- Linux下网卡开机自动加载
- #每日Linux小练习#02 tr命令的使用
- Linux下单节点伪分布式Hadoop的配置
- CentOS 6.5安装图形界面
- Linux makefile 教程 非常详细 易懂
- 给Linux系统管理员准备的Nmap命令的29个实用范例
- CentOS、Ubuntu、Debian三个linux比较异同
- 积累linux常用命令大全
- 你必须了解的Linux世界中的五位大英雄