maven-surefire-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frederic Tuttle <ftut...@oratu.net>
Subject Junit target code dependencies are unresolved
Date Mon, 16 Feb 2009 15:27:09 GMT
I've written a junit test case against a class that has dependencies (log4j
for instance). I've declared those dependencies in my pom.xml. I've declared
junit 3.8.1 as a test scoped dependency.

When I run mvn test I get errors on each test indicating that junit is not
resolving the references to the dependencies in the target code.  From the
surefire-reports--

   <error type="java.lang.Error" message="Unresolved compilation problems:
       The import org.apache cannot be resolved
       The import javax.xml.bind cannot be resolved
       The import javax.xml.bind cannot be resolved
       The import javax.xml.bind cannot be resolved
       Logger cannot be resolved to a type
       Logger cannot be resolved
       Logger cannot be resolved to a type
       Logger cannot be resolved to a type
       Logger cannot be resolved to a type
       Logger cannot be resolved to a type
       JAXBContext cannot be resolved to a type
       JAXBContext cannot be resolved
       Marshaller cannot be resolved to a type
       Marshaller cannot be resolved
       Logger cannot be resolved to a type
       Logger cannot be resolved to a type
       JAXBContext cannot be resolved to a type
       JAXBContext cannot be resolved
       Unmarshaller cannot be resolved to a type
       Logger cannot be resolved to a type
       Logger cannot be resolved to a type
       Logger cannot be resolved to a type
...

This is a very simple case and there is nothing special about it.  I tried
changing the dependency scopes and explicitly adding jars to the surefire
config and nothing worked.

Anyone else have this problem ?
I'd be gratefull for some pointers.
Thanks.

 -FT

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message