google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

version 0.40 doesn't look in generated-sources for source files #159

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create classes that undergo the maven generate-sources phase, like async 
services or lombok DTOs.
2. Use them in a module, even just passively referencing them.
3. Create a test for that module.
4. Run the maven test target.

What is the expected output? What do you see instead?
The test compiler complains about not being able to find source files for all 
the generated classes.
The gwt-test-utils should include the folder target/generated-sources in the 
source paths.

What version of the product are you using? On what operating system?
gwt-test-utils 0.40-SNAPSHOT
gwt-maven-plugin
lombok

Original issue reported on code.google.com by djjeck on 27 Aug 2012 at 11:07

GoogleCodeExporter commented 9 years ago
Are you using the lastest snapshot available ?

I commited something to fix this yesterday on github 
(https://github.com/gwt-test-utils/gwt-test-utils/commit/62669b36ef398332a5d52fb
e303ab0cbcbe4ed30)
But maybe I forgot to deploy a new snapshot. I've just uploaded one just in 
case.

The modification I made was just to add this line in the 
META-INF/gwt-test-utils.properties used internally :

target/generated-sources/gwt = src-directory

Could you please give it another try after an update to the lastest 
0.40-SNAPSHOT ?

Original comment by gael.laz...@gmail.com on 27 Aug 2012 at 12:18

GoogleCodeExporter commented 9 years ago
Sorry, I didn't notice that today I wasn't getting errors for generated service 
stubs.
Lombok, though, puts its generated sources in generated-sources/delombok by 
default.

I configured lombok to put generated files in the gwt folder, but I still get 
errors for:
* java.lang.Thread
* com.googlecode.gwt.test.GwtTestWithEasyMock
* com.googlecode.gwt.test.GwtCreateHandler
* org.apache.commons.collections.CollectionUtils
* org.easymock.EasyMock
* org.easymock.Capture<T>
* org.easymock.CaptureType
* org.junit.Assert
* some of my modules server-side only

This might make sense, since they wouldn't be available in client-side code, 
but I don't think that's the expected behavior.

Original comment by djjeck on 27 Aug 2012 at 2:19

GoogleCodeExporter commented 9 years ago
Instead of moving your generated-sources package to "generated-sources/gwt" 
(which is the default location used when generating a GWT project with the 
gwt-maven-archetype), you could have add this line in your 
META-INF/gwt-test-utils.properties file :

generated-sources/delombok = src-directory

I apology it's not (yet) documented anywhere.

By the way, the GwtTreeLogger errors you've steel got are not relevant : 
gwt-test-utils does not required java source file for classes which are not 
actually used on client side. I just don't find a smart way (yet) to filter 
those error not to be logged..
Your unit tests are expected to pass anyway. Aren't they ?

Original comment by gael.laz...@gmail.com on 27 Aug 2012 at 4:09

GoogleCodeExporter commented 9 years ago
I confirm that's a valid workaround for delomboked files, and that the rest of 
errors don't affect the execution of the tests.

(Sorry for the late reply)

Original comment by djjeck on 15 Sep 2012 at 5:55

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 15 Sep 2012 at 6:00

GoogleCodeExporter commented 9 years ago
You should update to the 0.41 release. The irrelevant error message should not 
be logged by GwtTreeLogger anymore ;)

Anyway, thank you very much for your feedback !

Original comment by gael.laz...@gmail.com on 15 Sep 2012 at 6:01