Skip to content

Commit

Permalink
Add Eclipse project for JUnit tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkossakowski committed Jun 15, 2013
1 parent 25a8e70 commit 3494397
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/eclipse/README.md
Expand Up @@ -11,6 +11,9 @@ IMPORTANT
Preferences/General/Workspace/Linked Resources. The value should be the absolute
path to your scala checkout. All paths in project files are relative to this one,
so nothing will work before you do so.
Additionally, we start using Maven dependencies (e.g. junit) so you need to define
`classpath variable` inside Eclipse. Define `M2_REPO` in Java/Build Path/Classpath Variables
to point to your local Maven repository (e.g. $HOME/.m2/repository).

2. The Eclipse Java compiler does not allow certain calls to restricted APIs in the
JDK. The Scala library uses such APIs, so you'd see this error:
Expand Down
12 changes: 12 additions & 0 deletions src/eclipse/test-junit/.classpath
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="test-junit"/>
<classpathentry combineaccessrules="false" kind="src" path="/reflect"/>
<classpathentry combineaccessrules="false" kind="src" path="/scala-library"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/ant/ant.jar"/>
<classpathentry kind="lib" path="lib/jline.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/scala-compiler"/>
<classpathentry kind="var" path="M2_REPO/junit/junit/4.10/junit-4.10.jar"/>
<classpathentry kind="output" path="build-test-junit"/>
</classpath>
35 changes: 35 additions & 0 deletions src/eclipse/test-junit/.project
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>test-junit</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.scala-ide.sdt.core.scalabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.scala-ide.sdt.core.scalanature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>build-test-junit</name>
<type>2</type>
<locationURI>SCALA_BASEDIR/build/junit/classes</locationURI>
</link>
<link>
<name>lib</name>
<type>2</type>
<locationURI>SCALA_BASEDIR/lib</locationURI>
</link>
<link>
<name>test-junit</name>
<type>2</type>
<locationURI>SCALA_BASEDIR/test/junit</locationURI>
</link>
</linkedResources>
</projectDescription>

0 comments on commit 3494397

Please sign in to comment.