• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Netbeans 6.7.1 + sharing code across projects

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic