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

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

  •  18-07-2023
  •  | 
  •  

문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top