GeeCON Prague 2014*
The moose likes IDEs, Version Control and other tools and the fly likes Netbeans 6.7.1 + sharing code across projects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Netbeans 6.7.1 + sharing code across projects" Watch "Netbeans 6.7.1 + sharing code across projects" New topic
Author

Netbeans 6.7.1 + sharing code across projects

Kathy Rogers
Ranch Hand

Joined: Aug 04, 2000
Posts: 103
Hi,

I have a Netbeans project that contains much shared code and many libraries - database handling stuff, that sort of thing, which is common to all my projects.

In Netbeans 5.0, I created a "shared" library that referenced the build/web/WEB-INF/classes directory of my shared project and the jar files within the lib directory of the shared project. I would add this library to other projects as necessary. On building these other projects, Netbeans copied class files to the build/web/WEB-INF/classes subdirectories of the project being built and the jar files to the build/web/WEB-INF/lib directory. Essentially the code and lib files were integrated into the structure of the new project.

I have tried and failed to replicate this behaviour in Netbeans 6.7.1. I have tried creating a library - if I include the build/web/WEB-INF/classes directory from my shared project, when the new project is built, the build/web/WEB-INF/classes directory is copied to the build/web/WEB-INF/lib directory - not the desired behaviour. I could add lib/build/web/WEB-INF/classes to my classpath but I'm not happy about the idea of class files in my lib directory. I can make it work by adding a project, rather than a library - shared.jar is copied into WEB-INF/lib. I can also get it to work if I create a (local?) library containing shared.jar. However, what I ideally want is the package directory and class files of the shared project integrated into the package directory structure of the new project.

Any suggestions on how to achieve this very gratefully received.

Thanks,

Kathy
 
GeeCON Prague 2014
 
subject: Netbeans 6.7.1 + sharing code across projects