You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by "Sonar, Nishant" <ni...@wachovia.com> on 2007/10/03 16:57:03 UTC

classes not refering to test resources internally?

Hi

 

I have some XML files as test resources to work on. I have the classes
use these resources as

 

String SOAP_REQUEST_SAML2_UNSIGNED_NO_ROLES 

= "xml/SoapRequestSaml2Unsigned-NoRoles.xml";

 

String SOAP_REQUEST_SAML2_ENVELOPED_DIGITAL_SIGNATURE_NO_ROLES 

= "xml/SoapRequestSaml2EnvelopedDigitalSignature-NoRoles.xml";

 

String
SOAP_REQUEST_SAML2_ENVELOPED_DIGITAL_SIGNATURE_NO_ROLES_REFERENCE_URI 

=
"xml/SoapRequestSaml2EnvelopedDigitalSignature-NoRoles-ReferenceUri.xml"
;

 

My project structure is

 

Src/main/java/ - sources

Src/test/java -test sources

Src/test/resources - test resources like XML files in xml/file1.xml etc.

 

When I compile test the resources are into

 

Test-classes/xml/xmlfiles

 

I am getting the execpetion

java.io.FileNotFoundException:

xml\SoapRequestSaml2EnvelopedDigitalSignature-NoRoles.xml (The system
cannot find the path specified)

 

how maven provide the test resources to java test cases when the
resources are demanded

internally . like in this case

 

 

Please help 

Please reply if further clarification needed. 

 

Regards,

Nishant