> I haven't been using maven to run my tests in the past (because I don't
want them package into the war and increasing the size of the war) now I'm
struggling to get maven to build and run my tests at all. They're in a
separate folder outside of src.

I guess I don't understand this part - if maven doesn't know about the test
sources, it makes a certain amount of sense that mvn emma:emma does
nothing. Additionally, if those sources are reported to maven as test
sources, they should never make it to the compiled war.

The standard maven project setup for a war project looks a little like
this, give or take (with added bits for GWT), including a single test class:
project/
  pom.xml
  src/
    main/
      webapp/
        index.html
        WEB-INF/...
      java/
        com/company/project/
          Project.gwt.xml
          server/...
          client/...
          shared/...
    test/
      java/
        com/company/project/client/MyTest.java

The important details here are that the test sources are not in the
src/main/java tree at all, so maven should never be building them into the
war file. Its possible your IDE (esp if that IDE is eclipse...) is cheating
a bit, but no maven process will make that mistake.

With this standard setup, the emma:emma goal seems to behave on maven 2.2
or so. Can you clarify on how you are setting your project up, and perhaps
make/share a sample project? I'll see if I can find/share a sample on
github that demonstrates working emma coverage, given these basic setup
details.



On Wed, Mar 13, 2013 at 10:57 AM, darkling <darkling...@aol.com> wrote:

> Do you mean you're using the surefire test goal or the gwt:test goal?
>
> I've spent a few days trying to get either working without much luck. I
> haven't been using maven to run my tests in the past (because I don't want
> them package into the war and increasing the size of the war) now I'm
> struggling to get maven to build and run my tests at all. They're in a
> separate folder outside of src.
>
> Which maven goal approach did you take to running emma?
> Thanks
>
>
> On Friday, March 8, 2013 6:13:11 PM UTC-5, Colin Alworth wrote:
>>
>> We've been using the Maven2 emma:emma goal, with no modifications at all
>> - seems to behave correctly with htmlunit in dev mode, both for traditional
>> junit tests and GWTTestCases. No changes to the pom, just executing
>> emma:emma with maven 2.2.1 on our project.
>>
>> On Thursday, March 7, 2013 11:01:37 AM UTC-6, darkling wrote:
>>>
>>> Does anyone have any recent experience working with a code coverage tool
>>> and GWT? I heard that emma worked so I downloaded the eclipse emma plugin
>>> and gave it a whirl. The problem is it only seems to tell me that no line
>>> of mine was ever touched. I tried running it on my nonGWT code and it seems
>>> to work fine. But GWT gives me no answers. I read a post saying that the
>>> emma approach doesn't work with the latest version of GWT (I am using 2.4)
>>> can anyone confirm or deny this?
>>> Thanks
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to