Netbeans: how to export libraries to other projects?

B

Bart Wakker

Hello,

I'm used to eclipse and want to give netbeans a try. I try to set up
some projects and am having problems.

Suppose I have a project A that uses some library X (as defined in the
library manager).

Now I create a second project B that depends on A. What I observe is
that the output of A (its jar file(s)) becomes available to B. But I
would also expect (like in eclipse project dependancies) that all
dependancies of A, in this case library X, becomes automatically
available to B. This seems not to be the case.

When you have lots of projects with lots of dependancies, it is very
cumbersome to have to import explicitly every dependancy in each
project. Is this automatic export/import between dependant projects
not available in netbeans, or have I missed the way to set it up
properly?

TIA,

Bart
 
H

hilz

Bart said:
Hello,

I'm used to eclipse and want to give netbeans a try. I try to set up
some projects and am having problems.

Suppose I have a project A that uses some library X (as defined in the
library manager).

Now I create a second project B that depends on A. What I observe is
that the output of A (its jar file(s)) becomes available to B. But I
would also expect (like in eclipse project dependancies) that all
dependancies of A, in this case library X, becomes automatically
available to B. This seems not to be the case.

When you have lots of projects with lots of dependancies, it is very
cumbersome to have to import explicitly every dependancy in each
project. Is this automatic export/import between dependant projects
not available in netbeans, or have I missed the way to set it up
properly?

TIA,

Bart


How are you adding the dependency? When you go to the project properties
-> libraries section, how do you add the dependency? Are you using
"Add JAR/Folder" button?
Maybe if you use the "Add Project" and add project A as a dependency in
project B, then that will carry over any libraries that A depends on.

By the way, you might get better help on the NetBeans mailing lists
which can be accessed through NNTP (news) via gmane.org

Here is the list of available groups:
http://www.netbeans.org/community/lists/top.html

check out the "Forums and Newsgroups" section here:
http://www.netbeans.org/community/lists/
for how to access it as a newsgroup.
 
B

Bart Wakker

hilz said:
How are you adding the dependency? When you go to the project
properties -> libraries section, how do you add the dependency? Are
you using "Add JAR/Folder" button?
Maybe if you use the "Add Project" and add project A as a dependency
in project B, then that will carry over any libraries that A depends
on.

Yes I'm using "add project", and it doesn't carry over any
dependencies. So even without external libraries, If A imports B and B
imports C, A does not see C :(. I seem to have to explicitly import C
into A.

I'm used from Eclipse that all dependancies are carried over,
however you can fine tune this quite well: You can select which
imported libraries are exported to other projects, and even can enter
filters based on package (positive and negative). It seems eclipse is
much more advanced in this area.
By the way, you might get better help on the NetBeans mailing lists
which can be accessed through NNTP (news) via gmane.org

Thanks, I'll try the mailing lists.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top