Recent site activity

Home‎ > ‎Maven‎ > ‎IDE Import‎ > ‎

Eclipse


Required

Importing Maven projects

There are a few ways to import a maven project into eclipse. 

M2E Egit Import

  • My favorite way to import a project is through the Git Repository Explorer. I like to right click on 'Working Directory' and select Import Maven projects. Then follow the steps of the Package Explorer Import.

Package Explorer Import 

  • Right click on a package explorer 'working set' and choose import.


  • Filter the maven choices by typing in maven. then choose Existing Maven Projects.


  • Click on Browser and select the Maven project for import. Look for the directory with pom.xml.


  • Once the directory with pom.xml is selected, it will show up like this. I always like to add my projects to a 'working set' which helps me manage many projects.


  • The next step will let you know about the Eclipse plugin maps the goals. If you get red, you can ignore them and let maven command line deal with the issue. Click on finish.


  • Once the import is done, you'll find it gets moved to the 'working set' after the project is built. 


  • I like to go into the project and close all other projects I'm working on. This will turn off any validation on the projects you are not using. 


  • Once you enter the project, the folder with up arrow in the package explorer view can be used to return to the working sets.


  • The next thing I like to do is double check and be sure the GWT plugin was setup correctly. If it isn't setup correctly the debug runner will fail to load. 



  • This is how my GWT plugin setup looks.


  • This is how Google App Engine plugin setup looks.


  • And the last thing I always like to do before messing around with the code is try the development mode and see if the project loads. 


FAQ

Heap Space & Memory

  • For large projects I'd add something like this to the jvm arguments. This should get rid of out of memory or heap space exceptions. 
    • -Xss1024k -Xmx1024M -XX:MaxPermSize=128m

GPE Plugin Update

  • Activating the 'Maven Update Project' will update the GPE plugin. This is one of my favorites because it resets the plugin on pom.xml configuration changes.

GWTP Archetype Import

Since the entry-point module is in a sub module and inherited in GWTP module, Google Eclipse Plugin doesn't see the entry-point and has to be added manually to the GPE plugin

1. Right click on project > Google > Web Toolkit Settings > Entry point modules > Add
2. Add the entry point module.
  • Manually Add the Module to Google Eclipse Plugin plugin.



Comments