Obviously the "0 class(es) instrumented" part is a problem; if nothing
gets instrumented, you'll certainly get no coverage info. Some things
that stand out to me:

1. There were no classes compiled in the output below. Presumably this
is because they were all already up-to-date, but I'd like to see the
output from "clean test" or "clean site" to be sure.

2. Probably completely unrelated, but I'm not sure that
checkstyle-jjguidelines.xml file should show up in the classes
directory.

Since you're set up to run Emma from the command line, you could just
try the following command which should be what the Emma plugin is
running:

emma instr -instrpath "D:\tmp\sandbox\my-app\target\classes" -outdir
"D:\tmp\sandbox\my-app\target\emma-classes" -outfile
"D:\tmp\sandbox\my-app\target\emma-classes\coverage.em"

Maybe you can figure out where the problem is that way. The soure code
for the Emma plugin is very basic, so feel free to inspect it. If you
find it is a real problem, whether you resolve it or not, please file an
issue in JIRA, preferably with your patch or an attached project showing
the problem.

Chris

> -----Original Message-----
> From: Xavier Outhier [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 26 October, 2006 03:00
> To: Maven Users List
> Subject: Re: [m2] Running Emma: how to get HTML report?
> 
> Hi,
> 
> 1) I have a report in the site but unfortunately, the report 
> is empty, I got this page target/site/coverage/index.html:
> No coverage information available
> 
> 2) The trace when running test is:
> 
> [INFO]Scanning for projects...
> [INFO]--------------------------------------------------------
> --------------------
> [INFO]Building My project name
> [INFO]   task-segment: [test]
> [INFO]--------------------------------------------------------
> --------------------
> project-execute
> [resources:resources]
> [INFO]Using default encoding to copy filtered resources.
> [compiler:compile]
> [INFO]Nothing to compile - all classes are up to date 
> [emma:instr {execution: default}] [INFO][emma-plugin:instr] 
> [INFO]Emma instrument path: D:\tmp\sandbox\my-app\target\classes
> [INFO]Emma output Directory: D:\tmp\sandbox\my-app\target\emma-classes
> EMMA: processing instrumentation path ...
> EMMA: instrumentation path processed in 30 ms
> EMMA: [0 class(es) instrumented, 0 resource(s) copied]
> EMMA: no output created: metadata is empty
> 
> 3) Also a partial tree view of my target directory:
> +---classes
> |   |   checkstyle-jjguidelines.xml
> |   |  
> |   \---com
> |       \---mycompany
> |           \---app
> |                   App$FizzyDrink.class
> |                   App.class
> |                  
> +---emma-classes
> |   |   coverage.em
> |   |   emma.properties
> |   |  
> |   \---com
> |       \---mycompany
> |           \---app
> |                   App$FizzyDrink.class
> |                   App.class
> 
> 4) content of emma.properties:
> coverage.out.file=D:\\tmp\\sandbox\\my-app\\target\\emma-class
> es\\coverage.ec
> coverage.out.merge=false
> 
> 5) What is wrong? Should I run a specific task in a certain order?
> 
> Greetings,
> 
> Xavier.
> Chris Hilton wrote:
> > There's an emma-maven-plugin in the Codehaus sandbox and 
> available at 
> > the Codehaus snapshots repository you might want to use.
> >
> > http://mojo.codehaus.org/using-sandbox-plugins.html
> >
> > You'll need to specify something like this for the build 
> configuration:
> >
> >   <build>
> >     <plugins>     
> >       <plugin>      
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>emma-maven-plugin</artifactId>
> >         <version>1.0-SNAPSHOT</version>
> >         <inherited>true</inherited>          
> >         <executions>
> >           <execution>                
> >             <goals>
> >               <goal>instr</goal>
> >             </goals>
> >           </execution>
> >         </executions>
> >       </plugin>
> >       <plugin>
> >         <groupId>org.apache.maven.plugins</groupId>
> >         <artifactId>maven-surefire-plugin</artifactId>
> >         <inherited>true</inherited>
> >         <configuration>
> >           <forkMode>once</forkMode>
> >           <reportFormat>xml</reportFormat>
> >  
> > 
> <classesDirectory>${project.build.directory}/emma-classes</classesDire
> > ct
> > ory>    
> >         </configuration>        
> >       </plugin>
> >     </plugins>
> >   </build>
> >
> > And then something like this in the reporting section:
> >
> >   <reporting>    
> >     <plugins>  
> >       <plugin>      
> >         <groupId>org.codehaus.mojo</groupId>
> >         <artifactId>emma-maven-plugin</artifactId>
> >         <version>1.0-SNAPSHOT</version>
> >           <inherited>true</inherited>          
> >       </plugin>
> >       <plugin> 
> >         <groupId>org.codehaus.mojo</groupId> 
> >         <artifactId>surefire-report-maven-plugin</artifactId> 
> >         <inherited>true</inherited>
> >       </plugin>       
> >     </plugins>      
> >   </reporting>
> >
> > Chris
> >
> >   
> >> -----Original Message-----
> >> From: Xavier Outhier [mailto:[EMAIL PROTECTED]
> >> Sent: Monday, 23 October, 2006 06:56
> >> To: Maven Users List
> >> Subject: [m2] Running Emma: how to get HTML report?
> >>
> >> Hi all,
> >>
> >> I'm trying to use Emma. I've seen a relatively old post:
> >> http://www.mail-archive.com/[email protected]/msg42682.html
> >>
> >> I also have instrumented classes. Well at least, I see there is a 
> >> file target\emma\metadata.emma.
> >>
> >> How could I have an HTML report built in the site?
> >>
> >> Greetings,
> >>
> >> Xavier.
> >>     
> 
> 
> 
> ---------------------------------------------------------------------
> 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]

Reply via email to