EclipseProjectImportTesting
Eclipse import testing general considerations
Please check import of projects from both Europa and Ganymede.
Eclipse Project Import test projects
Azureus torrent client
- Imported and run.
- HowTo open Azureus sources in Eclipse
JBoss AS
Setup:
- svn co http://anonsvn.jboss.org/repos/jbossas/tags/JBoss_5_0_0_Beta4/ jboss_5_0_0_beta4
- run ant from the build directory in your checkout
- import jboss_5_0_0_beta4 folder into eclipse with all projects
For up-to-date guide see http://www.jboss.org/jbossas/source/
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.
ActiveMQ
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.
Setup:
- svn co http://svn.apache.org/repos/asf/activemq/tags/activemq-5.1.0
- run mvn clean install -Dmaven.test.skip=true to download binaries and mvn eclipse:eclipse to generate eclipse project files
- import checked out folder to eclipse with all projects
For up-to-date guide see http://activemq.apache.org/getting-started.html
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
Setup:
- checkout sources (password is guest): cvs -d:pserver:guest@cvs.limewire.org:/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 http://wiki.limewire.org/index.php?title=Buildcode
Setup NetBeans:
- set Workdir and VM options.
JAlbum web application
Setup:
- checkout sources cvs -d:pserver:anonymous@jalbum.cvs.sourceforge.net:/cvsroot/jalbum
JSF web application
Setup:
- 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
Setup:
- Create an Eclipse web project with unexisted web pages folder (it defined in Eclipse settings but not exist in file system)
TaskServer web application
Setup:
- Checkout 2 projects (TaskServer and TaskClient) from http://task-wiki.googlecode.com/svn/trunk
- Fix library references with correct paths to Tomcat and GWT
Features coverage
| Feature | Result | Project |
|---|---|---|
| JSF | ok | File:JSFApps EclipseProjectImportTesting.zip Sample |
| JPA | retest | File:JPAApps EclipseProjectImportTesting.zip 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 project.properties modify auxiliary.org-netbeans-modules-projectimport-eclipse-core.project and auxiliary.org-netbeans-modules-projectimport-eclipse-core.workspace 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

