This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 151303 - Eclipse Project Importer does not handle Eclispe Projects using User Libraries
Summary: Eclipse Project Importer does not handle Eclispe Projects using User Libraries
Status: RESOLVED DUPLICATE of bug 145145
Alias: None
Product: projects
Classification: Unclassified
Component: Eclipse project importer (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-24 17:31 UTC by desmond_kirrane
Modified: 2009-02-19 20:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description desmond_kirrane 2008-10-24 17:31:44 UTC
Any User Library added to an Eclipse project are not imported by the NetBeans Eclipse Project Importer.


Reproduce:
1. Create a new project
2. Go to Window->Preferences->Java->Build Path->User Libraries
3. Click New button. Give the user library a name.
4. Select the new library name and click the 'Add Jars' button. Add a few jars from the file system.
5. Click OK.
6. Right-click the project you created and select Build Path > Configure Build Path.
7. Click Add Library > User Library > Next.
8. Check the library you created and select Finish.
9. Import this Project into NetBeans.

Result: The Eclipse User Library name appears in the NetBeans Project's Libraries but the jars are not included.



My .classpath file:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/myJars"/>
	<classpathentry kind="output" path="bin"/>
</classpath>


<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
	<name>test</name>
	<comment></comment>
	<projects>
	</projects>
	<buildSpec>
		<buildCommand>
			<name>org.eclipse.jdt.core.javabuilder</name>
			<arguments>
			</arguments>
		</buildCommand>
	</buildSpec>
	<natures>
		<nature>org.eclipse.jdt.core.javanature</nature>
	</natures>
</projectDescription>
Comment 1 David Konecny 2008-10-27 22:40:34 UTC
Could you please check content of following file in your workspace:
  .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs
It should contain a property org.eclipse.jdt.core.userLibrary.<your library name> with a value defining your library.
Could you attach the value here for analysis? Thanks.

Also note that once a library is created in NB it is never updated again - so for example if you create an empty library
in Eclipse, import it to NB as part of a project, update content of the library in Eclipse, and import second project
using that library then NB lib will stay untouched - empty as it was during first import. Workaround is to remove
library in NB before importing second Eclipse project - that will recreate library again.
Comment 2 desmond_kirrane 2008-10-27 23:18:56 UTC
Below is the contents of the file:
 .metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs

org.eclipse.jdt.core.userLibrary.myJars=<?xml version\="1.0" encoding\="UTF-8"?>\n<userlibrary systemlibrary\="false"
version\="1">\n\t<archive path\="C\:/Program Files/apache-ant-1.6.5/lib/ant-antlr.jar"/>\n</userlibrary>\n

I will try your suggested workaround.
Comment 3 David Konecny 2008-10-28 00:10:24 UTC
Thanks. I wonder whether there might be an OS specific issue preventing path
  "C\:/Program Files/apache-ant-1.6.5/lib/ant-antlr.jar"
being interpreted correctly. Let me know please if workaround helped. Thanks.
Comment 4 desmond_kirrane 2008-10-29 18:07:20 UTC
Workaround works.

I simply deleted all the projects I imported and reimported them using the Eclipse Project Importer.
It then picks up the User Library jars.

So obviously any changes made to the Eclispe User Libraries are not resynchronised with any NetBeans Project.
Comment 5 David Konecny 2008-10-29 20:07:16 UTC
Thanks.

*** This issue has been marked as a duplicate of 145145 ***