Francesco, how did you determine that forking creates the correct classpath ordering?
On Dec 3, 2007 3:16 AM, Francesco Vivoli <[EMAIL PROTECTED]> wrote: > > Hi all > > I've just posted a similar issue[*]; I'm also using war packaging and > setting <forkMode>never</forkMode> solved it. > > I still wonder what happens though... > Anyone's got an explanation? > > Cheers > Francesco > > > *: http://www.nabble.com/Failing-test-suite-with-2.0.8-tf4934941s177.html > > Damien Lecan 2 wrote: > > > > Similar problem for me when swithcing from 2.07 to 2.0.8 > > > > Despite http://jira.codehaus.org/browse/MNG-3118, config files are now > > read by surefire classloader in target/classes first, then in > > target/test-classes > > > > Try a simple getClass().getResource("/my.property") > > > > As a workaround, I configured surefire 2.3 with this : > > <forkMode>never</forkMode> > > > > Then Surefire classloader read config file in target/test-classes first. > > > > Strange thing, I had to do that only for projects with war packaging > > (but with classical unit tests). > > > > So hard to say if it's a bug with surefire, war plugin (?) or Maven > > itself. > > > > Damien Lecan > > > > 2007/11/29, Paul Benedict <[EMAIL PROTECTED]>: > >> Kev, > >> > >> I reported something similar in the user list today. The classpath that > >> Spring gets back in 2.0.8 points to classes, not test-classes, so all > my > >> testing data cannot be found. As you said, things work fine in 2.0.7 > >> > >> Paul > >> > >> On Nov 28, 2007 9:29 PM, Kev Jackson <[EMAIL PROTECTED]> wrote: > >> > >> > Hi, > >> > > >> > I've just been re-building my project with the new mvn 2.0.8 binary. > >> > > >> > Here's my experience so far. > >> > > >> > mvn clean install (jars) -> works as 2.0.7 > >> > > >> > mvn clean package -P<profile> (war) -> broken (re-tested on 2.0.7 and > >> > works) > >> > > >> > So something has changed in 2.0.8 that has affected surefire. > >> > > >> > Here is a snippet of the error > >> > > >> > Nov 29, 2007 10:09:01 AM com.seanergie.persistence.SessionsManager > >> > initialize > >> > SEVERE: Exception building Hibernate SessionFactory : > >> > Could not find datasource > >> > org.hibernate.HibernateException: Could not find datasource > >> > at > >> > org.hibernate.connection.DatasourceConnectionProvider.configure(Datas > >> > ourceConnectionProvider.java:56) > >> > at > >> > org.hibernate.connection.ConnectionProviderFactory.newConnectionProvi > >> > der(ConnectionProviderFactory.java:124) > >> > at > >> > org.hibernate.connection.ConnectionProviderFactory.newConnectionProvi > >> > > >> > For each unit test that uses Hibernate (v3 with Annotations & > >> > HibernateSearch), the same error 'Could not find datasource'. > >> > > >> > For mvn 2.0.7 the build works perfectly. > >> > > >> > I haven't changed my hibernate.cfg.xml file between builds, I haven't > >> > changed any code or config between builds, the only thing I changed > was > >> > MVN_HOME & PATH to 2.0.8. > >> > > >> > As these errors occur during the surefire:test phase of the build I'm > >> > assuming that something has changed in the Classpath management for > >> > surefire? > >> > > >> > Any help would be appreciated. > >> > > >> > Thanks, > >> > Kev > >> > > >> > --------------------------------------------------------------------- > >> > To unsubscribe, e-mail: [EMAIL PROTECTED] > >> > For additional commands, e-mail: [EMAIL PROTECTED] > >> > > >> > > >> > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/2.0.8-broken-war-build-tf4894912s177.html#a14126098 > Sent from the Maven - Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
