create a .war file from gwt-project

前端 未结 8 1657
渐次进展
渐次进展 2020-12-14 16:11

How do I create a .war-file from my gwt-project in eclipse?

8条回答
  •  清歌不尽
    2020-12-14 16:55

    I always use Ant build file, so the project gets compiled and packaged as a war with one click.

    Add an xml-file to your project with the following content:

    
    
    
    
        
            
            
        
    
    
    
    
    
    
        
            
                
                
            
            
            
            
        
    
    
    
        
            
            
                
                
            
        
    
    
    
        
    
    
    
    

    (Edit `YourProject.EntryPointClass to the path to your EntryPoint-class)

    You would need to add gwt-user.jar and gwt-dev.jarto your projects build path(right click on your project -> Build Path -> Add External Achives).

    If you now look at your "Problems"-view you get a warning that the two files are not available on the server's class path. You can use the QuickFix to either copy it to WEB-INF/lib or hide the warning. The build file will not include those two file in the war-file.

    All you need to do to compile and create the file is to right click the xml-file and select run as Ant Build.

提交回复
热议问题