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

75 views
Skip to first unread message

BM

unread,
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

unread,
Aug 31, 2011, 5:35:39 PM8/31/11
to google-we...@googlegroups.com
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='**/*Test.java' />
<exclude name='**/Mock*.java' />
</source>

Andrew Hughes

unread,
Sep 1, 2011, 4:31:24 AM9/1/11
to google-we...@googlegroups.com

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 https://groups.google.com/d/msg/google-web-toolkit/-/MEyD2dm4PFgJ.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
>
Reply all
Reply to author
Forward
0 new messages