Results 1 to 11 of 11
  1. #1
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default Netbeans Platform and Module Dependencies

    Hello everyone,

    I've just begun to use the Netbeans Platform, and I have to say it's amazing. However, I have a question regarding module dependencies.

    For one of my projects I'm using several external libraries. Over the course of the next year or so, I plan on writing at least several modules, each of which is in some way dependent upon the external libraries. It seems inefficient to add the external libraries (in the form of JAR files) to each module. Does anyone know of a way I could add the libraries to just one module, and add that module as a dependency for all of the other modules? I've tried creating a "core" module with all of the jars added to its classpath, and then adding that single module as a module dependency for all of the others, but I can't seem to access the code in the core module.

    Any help would be tremendously appreciated.

    Joe

  2. #2
    levent Guest

    Default

    Hi Joe,

    As far i understand you are looking for "Library Wrapper Module Project". Select File -> New Project -> Netbeans Plug-in Modules. You should see that project type at the right panel. Follow the instructions to add your jar files to that project. And once that project is created, add dependency of it to your other modules.

  3. #3
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default

    Thanks very much. It looks like that's what I was looking for. :)

    Joe

  4. #4
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default

    I'm sorry, I have one last question: Two of the libraries by default share the same code name base (e.g. xalan and xerces share org.apache). Should I wrap them in the same module, or should I change the code name base on one of them? (Will changing the code name base mess up the internal imports?).


    Thanks!

    Joe

  5. #5
    levent Guest

    Default

    Hi again Joe,

    I dont have enough experience on this but i think changing names space should not be a good idea for long term maintainability of the project.

    By the way, as far as i remember there should already be a xerces module available inside netbeans. You might use that too. I have the Netbeans RCP book. I remember that they already have a Apache library included and i guess that was Xerces. I can check it if you can not find relevant information..

  6. #6
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default

    Ok. Thanks for the tip. I'll try to work around it.

    Joe

  7. #7
    levent Guest

    Default

    Let us know your decision if possible..

  8. #8
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default

    Will do!

    Joe

  9. #9
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default

    I've discovered that wrapping two jars that share the same namespace into one module wrapper doesn't appear cause problems, and seems to be working. I've yet to see how this will affect maintainability. If you add any Netbeans module that shares a namespace it causes the same problem. :(

    Joe

  10. #10
    levent Guest

    Default

    But don't those libraries has their own namespace (e.g. org.apache.xerces and org.apache.xalan)?

  11. #11
    Join Date
    Aug 2007
    Posts
    25
    Rep Power
    0

    Default

    Gah. They do, but the problem doesn't become apparent until you try to use the module. Sorry, I was mistaken.

    I'm going to try to add them as libraries to an empty module, and then see if I can access them through that one.

    Joe

Similar Threads

  1. JDeveloper Dependencies
    By pringle in forum New To Java
    Replies: 0
    Last Post: 01-09-2008, 01:44 AM
  2. Calling A Session Bean Using A Web Module
    By JavaForums in forum NetBeans
    Replies: 0
    Last Post: 07-31-2007, 12:13 AM
  3. Netbeans platform - JDBC module
    By sara in forum NetBeans
    Replies: 2
    Last Post: 07-10-2007, 02:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •