[jbehave-dev] [jira] Commented: (JBEHAVE-424) Test run with Eclipse but no with maven

2011-04-13 Thread Jonathan Woods (JIRA)

[ 
http://jira.codehaus.org/browse/JBEHAVE-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263458#action_263458
 ] 

Jonathan Woods commented on JBEHAVE-424:


This time, I've actually downloaded your sample (apologies for not trying the 
first time). 

At first glance, it looks as though it's because Eclipse unhelpfully merges 
compile and test scope, but Maven doesn't.  So your Spring config, which is 
test scope, simply isn't visible in the Maven runtime classpath.

But I'll double-check and report back.

> Test run with Eclipse but no with maven
> ---
>
> Key: JBEHAVE-424
> URL: http://jira.codehaus.org/browse/JBEHAVE-424
> Project: JBehave
>  Issue Type: Bug
>  Components: Maven Plugin
>Affects Versions: 3.1.2
> Environment: Apache 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"
>Reporter: Gardella Juan Pablo
> Attachments: sample.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] Commented: (JBEHAVE-424) Test run with Eclipse but no with maven

2011-04-13 Thread Gardella Juan Pablo (JIRA)

[ 
http://jira.codehaus.org/browse/JBEHAVE-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263455#action_263455
 ] 

Gardella Juan Pablo commented on JBEHAVE-424:
-

Hi Jon,

Thanks for your time. Yes applicationContext.xml is in target\test-classes. You 
can download the sample and run mvn packate to reproduce the error.

Juan

> Test run with Eclipse but no with maven
> ---
>
> Key: JBEHAVE-424
> URL: http://jira.codehaus.org/browse/JBEHAVE-424
> Project: JBehave
>  Issue Type: Bug
>  Components: Maven Plugin
>Affects Versions: 3.1.2
> Environment: Apache 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"
>Reporter: Gardella Juan Pablo
> Attachments: sample.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] Commented: (JBEHAVE-424) Test run with Eclipse but no with maven

2011-04-13 Thread Jonathan Woods (JIRA)

[ 
http://jira.codehaus.org/browse/JBEHAVE-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263453#action_263453
 ] 

Jonathan Woods commented on JBEHAVE-424:


Juan -

Have you really checked that applicationContext.xml is in target/test-classes?

When this happens for me, it's because Eclipse/m2eclipse/Maven hasn't bothered 
to copy across the resource.  Sometimes, modifying then saving it is enough to 
cause the copying to take place.

Jon

> Test run with Eclipse but no with maven
> ---
>
> Key: JBEHAVE-424
> URL: http://jira.codehaus.org/browse/JBEHAVE-424
> Project: JBehave
>  Issue Type: Bug
>  Components: Maven Plugin
>Affects Versions: 3.1.2
> Environment: Apache 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"
>Reporter: Gardella Juan Pablo
> Attachments: sample.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] Commented: (JBEHAVE-424) Test run with Eclipse but no with maven

2011-04-13 Thread Gardella Juan Pablo (JIRA)

[ 
http://jira.codehaus.org/browse/JBEHAVE-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263451#action_263451
 ] 

Gardella Juan Pablo commented on JBEHAVE-424:
-

Hi Mauro,

First, thanks for your time. You can see the sample to reproduce the error. The 
file applicationContext.xml is in src/test/resources and is in classpath when 
maven run the tests. So your solution don't apply.

Juan

> Test run with Eclipse but no with maven
> ---
>
> Key: JBEHAVE-424
> URL: http://jira.codehaus.org/browse/JBEHAVE-424
> Project: JBehave
>  Issue Type: Bug
>  Components: Maven Plugin
>Affects Versions: 3.1.2
> Environment: Apache 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"
>Reporter: Gardella Juan Pablo
> Attachments: sample.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email




[jbehave-dev] [jira] Commented: (JBEHAVE-424) Test run with Eclipse but no with maven

2011-04-13 Thread Mauro Talevi (JIRA)

[ 
http://jira.codehaus.org/browse/JBEHAVE-424?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=263447#action_263447
 ] 

Mauro Talevi commented on JBEHAVE-424:
--

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). 

> Test run with Eclipse but no with maven
> ---
>
> Key: JBEHAVE-424
> URL: http://jira.codehaus.org/browse/JBEHAVE-424
> Project: JBehave
>  Issue Type: Bug
>  Components: Maven Plugin
>Affects Versions: 3.1.2
> Environment: Apache 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"
>Reporter: Gardella Juan Pablo
> Attachments: sample.zip
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



-
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email