Thanks for the advice, unfortunately those things did not cure the problem. I 
must admit, I'm very puzzled. More experienced maven users seem to have run out 
of ideas as well, so I may have to look at a different solution for running my 
tests, which is very unfortunate.

Thanks,
Ken


On Sep 27, 2010, at 9:12 AM, Nayan Hajratwala wrote:

> On Sep 26, 2010, at 3:47 PM, Kenneth McDonald wrote:
> 
>> 
>> Now for a run of mvn test:
>> 
>> mvn -X test
>> .
>> .
>> .
>> [INFO] Surefire report directory: 
>> /Users/Ken/mvn_projects/rex/target/surefire-reports
>> Forking command line: /bin/sh -c cd /Users/Ken/mvn_projects/rex && 
>> /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java 
>> -jar 
>> /var/folders/J6/J6Md7QzoH-apMu-1gFqvaE+++TM/-Tmp-/surefirebooter1692256912894030002.jar
>>  
>> /var/folders/J6/J6Md7QzoH-apMu-1gFqvaE+++TM/-Tmp-/surefire9017473591909367701tmp
>>  
>> /var/folders/J6/J6Md7QzoH-apMu-1gFqvaE+++TM/-Tmp-/surefire6246108229640345050tmp
>> org.apache.maven.surefire.booter.SurefireExecutionException: 
>> scala/ScalaObject; nested exception is java.lang.NoClassDefFoundError: 
>> scala/ScalaObject
>> java.lang.NoClassDefFoundError: scala/ScalaObject
>>       at java.lang.ClassLoader.defineClass1(Native Method)
>> .
>> .
>> .
>> 
>> The point here is that scala-library is nowhere to be seen. I don't know if 
>> maven puts into one of the tmp directories (that would seem odd), but my 
>> guess is that there should be some mention of scala-library on the command 
>> line, but there isn't.
> 
> I ran mine with -X as well, and the scala-library does not show up on the 
> classpath, so that's not your problem.
> 
>> 
>> And here's my pom.xml file. AFAIK (I'm just learning maven), this should 
>> mean that scala-library is a dependency across all phases:
>> 
>> <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/maven-v4_0_0.xsd";>
>> 
> 
> [snip...]
> 
>> <pluginRepositories>
>>   <pluginRepository>
>>     <id>snapshots.scala-tools.org</id>
>>     <name>Scala-Tools Maven2 Repository - Snapshots</name>
>>     <url>http://scala-tools.org/repo-snapshots</url>
>>   </pluginRepository>
>> </pluginRepositories>
> 
> Why are pointing at the snapshot repo for plugins? Since you're new to maven, 
> you may or may not be aware that SNAPSHOT means the current development 
> release, i.e. trunk. In general, you'll want to use release versions of third 
> party libraries.
> 
>> <build>
>>   <sourceDirectory>src/main/scala</sourceDirectory>
>>   <testSourceDirectory>src/test/scala</testSourceDirectory>
>>   <plugins>
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-dependency-plugin</artifactId>
>>         <version>2.1</version>
>>       </plugin>
>>     <plugin>
>>       <groupId>org.scala-tools</groupId>
>>       <artifactId>maven-scala-plugin</artifactId>
>>       <version>2.14.2-SNAPSHOT</version>
> 
> Why are you using the SNAPSHOT versions of the plugins? You should be using 
> the latest release, which is currently 2.14.1. This *might* be your problem.
> 
>>     <plugin>
>>       <groupId>org.apache.maven.plugins</groupId>
>>       <artifactId>maven-surefire-plugin</artifactId>
>>       <version>2.6</version>
>>       <configuration>
>>         <includes>
>>           <include>**/*Test.*</include>
>>           <include>**/*Suite.*</include>
>>         </includes>
>>       </configuration>
>>     </plugin>
>>   </plugins>
>> </build>
>> <reporting>
>>   <plugins>
>>     <plugin>
>>       <groupId>org.scala-tools</groupId>
>>       <artifactId>maven-scala-plugin</artifactId>
>>       <version>2.14.2-SNAPSHOT</version>
>>     </plugin>
>>       <plugin>
>>         <groupId>org.apache.maven.plugins</groupId>
>>         <artifactId>maven-dependency-plugin</artifactId>
>>         <version>2.1</version>
>>       </plugin>
>>   </plugins>
> 
> You probably don't need anything in the reporting section.
> 
>> </reporting>
>> </project>
>> 
>> 
> 
> 
> ---
> Nayan Hajratwala
> http://agileshrugged.com
> http://twitter.com/nhajratw
> 734.658.6032
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to