Details
-
Type: Bug
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: 3.1.2
-
Fix Version/s: None
-
Component/s: Maven Plugin
-
Labels:None
-
Environment:HideApache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
Java version: 1.6.0_04
Java home: C:\Archivos de programa\Java\jdk1.6.0_04\jre
Default locale: es_AR, platform encoding: Cp1252
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"ShowApache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700) Java version: 1.6.0_04 Java home: C:\Archivos de programa\Java\jdk1.6.0_04\jre Default locale: es_AR, platform encoding: Cp1252 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
-
Number of attachments :
Description
I want to integrate Jbehave with maven and have a lot of troubles. I attach a sample with an example. The Story pass if I run as Junit test in eclipse, but when I try with maven fail.
Is a classloader problem. The exception is:
org.springframework.beans.factory.BeanDefinitionStoreException: IOException pars
ing XML document from class path resource [applicationContext.xml]; nested excep
tion is java.io.FileNotFoundException: class path resource [applicationContext.x
ml] cannot be opened because it does not exist
But to fix this I must pass ALL dependencies to the plugin.
I hope there is a solution to this. Thanks.
The problem seems to suggest you're not adding the applicationContext.xml as a resource and therefore it never gets added to the classpath.
To verify that this is the case simply look in target/classes after you've done a Maven build and see it the file is there. If not, configure your POM resources to add it.
There are plenty of examples, e.g. a Spring security one, that may help you (http://jbehave.org/reference/stable/examples-philosophy.html).