Eclipse import testing general considerations

Please check import of projects from both Europa and Ganymede.

Eclipse Project Import test projects

Azureus torrent client

JBoss AS


For up-to-date guide see

Existing problems:

  • projectA unit tests extend/depend on projectB unit tests - in Eclipse works because source roots and test roots are not distinguished and if projectA depends on projectB it has access to all its source files
  • NetBeans does not support includes/excludes on test roots - importer ignores them.
  • project with three source roots: src, test and helper (with excludes mask "**.java"). 'helper' does not contain any unit tests and so it is considered being source root but as a result it excludes all java files from real src folder. In Eclipse excludes are per source root.


This test case is not particularly interesting as Eclipse project files are generated from Maven's pom.xml and therefore they are all the same and using IDE variables pointing to Maven repository.


For up-to-date guide see

Existing problems:

  • each project has several source roots where second source root contains just resources and comes with exclude mask "**/*.java" - current import merges all masks and result is that none of the imported projects in NB has any sources - they are all excluded
  • similar issue as JBossAS: projectA unit tests extend/depend on projectB unit tests

LimeWire application


  • checkout sources (password is guest): cvs checkout limewire
  • invoke Run Configuration and set com.limegroup.gnutella.gui.Main as Main class
  • add -Djava.library.path="${workspace_loc:limewire/lib/native/windows}" to VM Arguments
  • specify ${workspace_loc:limewire/gui} for Working Directory

For more details see

Setup NetBeans:

  • set Workdir and VM options.

JAlbum web application


  • checkout sources cvs

JSF web application


  • Select Windows->Preferences->Web and XML->JSF Libraries. Click on the New.. button to add a new library. Create new lib

and add to it JSF jars (jsf-api.jar and jsf-impl.jar)

  • Check the is JSF Implementation check box
  • Create a New Dynamic Web Application.
  • In the configuration section, select the JavaServer Faces Project v1.1
  • Create new JSP page and add JSF tag libs to it.

Web application with missed web src folder


  • Create an Eclipse web project with unexisted web pages folder (it defined in Eclipse settings but not exist in file system)

TaskServer web application


Features coverage

Feature Result Project
JSF ok File:JSFApps Sample
JPA retest File:JPAApps Sample
Spring facet import ok
Hibernate import ok
Struts ok
Run Configurations (Java project) ok
Source tree includes/excludes ok
Source tree includes/excludes for Web projects ok
Unit tests roots - imported, treated as tests ok
Resynchronize data from eclipse by button ok (**)
Resynchronize data upon opening project ok
Resynchronize from File->Import Project ok
Resynchronize whole workspace ok
Eclipse projects dependencies ok
Eclipse transitive dependencies flattened to NB dependencies ok
Europa Web Projects import ok
Ganymede Web Projects import ok
Compiler options imported ok
JDK configuration ok
External source folder links ok
Eclipse variables imported as NB variables ok
Detect unsupported configurations and list to user ok
Eclipse User define libraries ok
Javadoc/sources associated with Eclipse JARs ok
Eclipse encoding, source level, target, debug, deprecation, compiler args ok
Naked project import (project without workspace) ok
Import into Eclipse folder versus separate folder ok
Resolving broken Eclipse link (*) ok

(*) in modify and to point to non-existing folder and try to Resynchronize with Eclipse

(**) source roots synch not implemented for 6.5 - issue #139217

External source roots testing issue to be aware of

Beware of following NetBeans behaviour while testing: let say you have an Eclipse project in /home/david/eclipse01 and you import this project as /home/david/NetBeansProjects/nb-eclipse01. Later you close this project and import the same eclipse01 project as /home/david/NetBeansProjects/nb-eclipse02. From testing point of view this scenario is OK. What happens though is that NetBeans project nb-eclipse02 will not have properly configured classpath. The reason is: when nb-eclipse01 was created it marked /home/david/eclipse01/src folder as its external source root; when import is creating nb-eclipse02 and is adding classpath items for /home/david/eclipse01/src they will end up in nb-eclipse01 and not in nb-eclipse02 as you would expect.

Workaround is to restart IDE after closing nb-eclipse01. I'm not 100% positive but I would also suggest to physically delete nb-eclipse01 project anyway - I can see that opening File menu and hovering mouse over may open Recent Project List which contains nb-eclipse01 and will load it on background and you are back where you were before restart.

Or even better workaround is to copy /home/david/eclipse01 into eclipse02, eclipse03, eclipse04 and import projects 1:1

JesseGlick says: this is hardly news; the same caveat applies to the regular New Project from Existing Sources wizard. Issue #51810

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo