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 79782 - Exported jars not seen from main project
Summary: Exported jars not seen from main project
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Eclipse project importer (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 88668 125869 (view as bug list)
Depends on: 137510
Blocks:
  Show dependency tree
 
Reported: 2006-07-05 15:13 UTC by ravn
Modified: 2008-06-18 14:04 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
three project workspace. In Netbeans import C (and B) but not A. (2.10 MB, application/octet-stream)
2006-07-05 15:15 UTC, ravn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ravn 2006-07-05 15:13:56 UTC
I have tried the Eclipse importer, and found that for a two-project import,
where C is the main project which uses B which in turn exports a jar A.jar, the
classes in A.jar are not available to the java classes in C.

We use this a lot as it is an easy way to package libraries with source without
needing to recompile, so this is a show stopper for using netbeans as a
supplement to Eclipse.

I have included a workspace showing the behaviour (which also includes _project_
A used to generate the a.jar file in project B).
Comment 1 ravn 2006-07-05 15:15:32 UTC
Created attachment 31654 [details]
three project workspace.  In Netbeans import C (and B) but not A.
Comment 2 Martin Krauskopf 2006-07-17 16:28:31 UTC
Simple solutions: as a workaround (solution?) you may add 'a.jar' to the
run-time classpath of the C project (C's project properties -> Libraries ->
Run). Than you may run the C project without problem from NetBeans.

Also in C project's root directory create empty manifest.mf - this will allow
appropriate distribution generation (this is little odd but it is done by
NetBeans j2se project generator automatically and I will also do so in the next
version of the Eclipse Importer). I don't know how you create final distribution
in Eclipse - I do not know too much about this facility in Eclipse (if there is
some)

Clear solution would probably be to check such dependencies and add them to the
run-time classpath of an imported NetBeans projects appropriately/automatically.
Eclipse projects have probably a little different semantics for classpath
handling. But imported projects should definitely works as much as similar to a
project in Eclipse.

Thanks for the attachment which allowed quick reproduction.

For me: except setting an appropriate run-time classpath, generate manifest.mf
in an imported project's root directory (this will allows clean dist-build - cf.
nbbuild/build-impl.xml#-do-jar-with-libraries ->
manifest.available+main.class+mkdist.available). Also keep watching similar
enhancement in general project infractructure (can't find an issue now) which
could possibly solve the same/similar things...
Comment 3 ravn 2006-08-09 21:43:20 UTC
Thank you for your suggestions, but I don't need workarounds (since we just
evaluate Netbeans for doing some of the stuff that Eclipse is weak in) but more
that the importer works correctly for our eclipse projects.

When this bug is fixed in a regular update, I'd be happy to beat some more on
this facility.
Comment 4 Martin Krauskopf 2006-11-06 18:08:30 UTC
*** Issue 88668 has been marked as a duplicate of this issue. ***
Comment 5 Lukas Hasik 2008-04-10 21:34:20 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 6 David Konecny 2008-06-16 00:58:56 UTC
*** Issue 125869 has been marked as a duplicate of this issue. ***
Comment 7 Jesse Glick 2008-06-17 03:00:17 UTC
#d1d111f081a1
Comment 8 Jesse Glick 2008-06-18 14:04:16 UTC
Apparently this was for M1.