How to specify additional source folders for GWT project with Google Eclipse plugin?

StackOverflow https://stackoverflow.com/questions/23540657

  •  18-07-2023
  •  | 
  •  

Pregunta

My GWT project has all code in the src folder. But now I have some additional generated code which goes into a new generated folder. I have configured my Eclipse to use this additional folder, which works fine. But when I start the GWT server, the generated code is not available for the GWT client.

On my older projects (without Google Plugin), I was starting GWT with a custom Eclipse launcher configuration. There I could specify additional source folders by adding an additional <runtimeClasspathEntry> to the launcher XML file.

Additional source paths are also allowed for com.google.gwt.dev.Compiler in Ant.

But how to specify additional source folders when using the Google Eclipse Plugin?

¿Fue útil?

Solución

If the GPE doesn't automatically update the launch configuration, you can still update it yourself, adding the generated folder to the classpath.

Otros consejos

Simply try to add it in source as shown below to add it in build path of the project.

click on Add Folder... to add the generated folder on build path.

If it doesn't work the go to -> Libraries -> Add Class Folder...


Add entries in your gwt.xml to make it available for client side code as shown below

<!-- Specify the paths for translatable code -->
<source path='client' />
<source path='shared' />
<!-- path related to root of GWT project similar to client and shared folder-->
<source path='generated_folder' /> 

enter image description here

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top