Clover problem with context.xml in multiple packages

Hi,

I have a project that I'm trying to set up with clover. All the tests pass without clover but not with clover. The error is that test context files in other packages cannot be found:

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [loaders-commons/testContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [loaders-commons/testContext.xml] cannot be opened because it does not exist

This is the Junit part that configures the context:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {
"classpath:loaders-commons/testContext.xml",
"classpath:loaders-persistence/testContext.xml",
"classpath:loaders-persistence/applicationContext.xml"
})

As mentioned this all works when not running clover, ie mvn install. These are my specs:

java version "1.7.0_25"

Apache Maven 3.0.5

<artifactId>maven-clover2-plugin</artifactId>
<version>3.1.12</version>

<org.springframework.version>3.0.7.RELEASE</org.springframework.version>

Any suggestions would be appreciated.

1 answer

0 vote

Hi Martin,

Few questions:

  • are you using clover2:instr?
  • in case you use clover2:instr -> do you have any artifacts produced in your project which have a classifier (e.g. 'com.acme:mymodule:1.0:myclassifier')?
  • in case you have classifiers -> is there any chance that these resource files are stored in them?

If all answers are "yes", then I suggest replacing clover2:instr by clover2:setup.

Cheers
Marek

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 3 hours ago in Hipchat

Moving from Hipchat to Stride? Here’s what you’ll love

Heya, Hipchat friends! We’re so happy you’re checking out   Stride. Whether you know it or not, you have been instrumental in making Stride come to life. Every feature, design, and functionality...

15 views 0 1
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you