[ http://jira.codehaus.org/browse/MCLOVER-3?page=comments#action_54256 ] 

Yue Ni commented on MCLOVER-3:
------------------------------

I get it. After several times experiments, I finally figure out the cause. I 
think there indeed exists some inconsistence between maven and eclipse.

If I follow the maven way:
(1) download and unzip the example.
(2) mvn test (fail)
(3) mvn clover:report (fail)
(4) create src/main/resources directory and move the 
src/main/java/.../applicationContext.xml resource file to 
src/main/resources/.../applicationContext.xml
(5) mvn test (succeed)
(6) mvn clover:report (succeed)
That's just as you described above that the example doesn't work with or 
without colver.

But if I use maven with eclipse ( Everybody use an IDE, right?):
(1) download and unzip the example.
(2) mvn eclipse:eclipse
(3) import generated project into eclipse ( I use Eclipse 3.1.1 and have "Bulid 
Automatically" switched on, then Eclipse will automatically compile and output 
all the files in src/main/java directory (regardless the file is a java file or 
not) into the target/classes)
(4) run unit test in junit using eclipse (succeed)
(5) mvn test (succeed)
(6) mvn clover:report (fail)
That's the case I described. Sorry for my carelessness, and I should follow the 
maven's best practise to put the resources in the right  place. However, if 
it's understandable there's some difference between eclipse and maven, it's 
strange that there's inconsistence between different maven plugins(maven-test 
plugin and maven-colver plugin. Maybe the mvn test goal should fail also?). 
Thank you for your answer to the issue.




> classpath error
> ---------------
>
>          Key: MCLOVER-3
>          URL: http://jira.codehaus.org/browse/MCLOVER-3
>      Project: Maven 2.x Clover Plugin
>         Type: Bug

>     Versions: 2.0-alpha-1
>  Environment: Windows XP, JDK 5.0 update 6, Maven 2.0, 
> maven-clover-plugin-2.0-alpha-1
>     Reporter: Yue Ni
>     Assignee: Vincent Massol
>      Fix For: 2.0
>  Attachments: cloverplugin-test.zip
>
>
> I used maven clover plugin to generate test report but got 
> FileNotFoundException. I employ spring in my project, so I use 
> ClassPathXmlApplicationContext in my JUnit test case to get the application 
> context. When the "clover:report" goal is executed, I got the error message 
> "Caused by: java.io.FileNotFoundException: class path resource 
> [net/sf/psm4j/applicationContext.xml] cannot be opened because it does not 
> exist"(Actually, the file exists in the right path) . When I executed the 
> "mvn test"  goal, the unit test can be run without exception. In the same 
> time, I can also run the test case in Eclipse without exception(The Eclipse 
> ".classpath" file is generated by maven "eclipse:eclipse" goal). Therefore, I 
> think there's something wrong in the maven clover plugin dealing with the 
> classpath. 

-- 
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, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to