2 Replies Latest reply on Feb 9, 2012 2:42 AM by Ondrej Zizka

    Modules definition - how to?

    ftom2 Newbie

      Hi,

       

      When defining a module - lets say for a MySql driver, how do i know what are the dependencies it needs?

       

      for example:

       

       

      <module xmlns="urn:jboss:module:1.0" name="com.mysql">
      <resources>
      <resource-root path="mysql-connector-java-5.1.17-bin.jar"/>
      </resources>
      <dependencies>
      <module name="javax.api"/>
      <module name="javax.transaction.api"/>
      </dependencies>
      </module>
      
      

       

      how do i know these are the required dependencies?

        • 1. Re: Modules definition - how to?
          Wolf-Dieter Fink Master

          sometimes you know it, here you need to have the api and transaction for Connector and Transaction stuff.

          In case of self build applications you should also know what you need.

          In case of third party libs the vendor should declare the dependencies.

           

          Also you will run into ClassNotFound Exceptions if a dependency is not declared.

          • 2. Re: Modules definition - how to?
            Ondrej Zizka Master

            Sometimes it's written in given libs docs.

            Good way might be to check given project's maven artifact's pom.xml. Although these sometimes include optional sttuff without note.

            Also, you can check includes in java files.

            Fixing cnfex is always the last but certain fallback :)