You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-users@maven.apache.org by Frederic Tuttle <ft...@oratu.net> on 2009/02/16 16:27:09 UTC
Junit target code dependencies are unresolved
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