How to exclude JUnit test files to be converted to javascript inside /src/test/java/ folder when the Project is using Maven.

Skip to first unread message


Aug 31, 2011, 2:46:44 PM8/31/11
to Google Web Toolkit

/src/test/java/ and /src/main/java/ folders are created by maven when
you mavenised the GWT project. I also have <source path="client"/>
statement in my gwt module XML file.

I have package name as com.mycompany.project.client.activity inside /
src/test/java/ folder which has files to test my activity classes.

I get source code not found error when the module is loaded in running
an app Development mode.

I am thinking since I have "client" name as a package in my test
folder GWT is shouting.

Why would GWT should even try to convert my JUnit test files into
javascript? And what is the solution to fix this?

Jason Pack

Aug 31, 2011, 5:35:39 PM8/31/11
In your gwt.xml file, you can use <include> or <exclude> tags under your <source> paths. Like so:

<source path='client' />
<source path='service' />
<source path='dto'>
<exclude name='**/*' />
<exclude name='**/Mock*.java' />

Andrew Hughes

Sep 1, 2011, 4:31:24 AM9/1/11

Maven should not even allow you project to compile if that is the case. Dev mode might still run. Try mvn install .

If that fails you prob have an import/reference to a test in you main src code.

Post results back.

> --
> You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
> To view this discussion on the web visit
> To post to this group, send email to
> To unsubscribe from this group, send email to
> For more options, visit this group at
Reply all
Reply to author
0 new messages