3 Replies Latest reply on Feb 12, 2007 10:34 AM by peterj

    Adding my own jar to portal source

    dleerob

      I am building the JBoss Portal 2.4.1 from source, so I can implement my own ldap authentication.

      I am editing identity\src\main\org\jboss\portal\identity\auth\IdentityLoginModule.java.

      Now I want to build the portal, however I obviously have to include the ldap.jar file in the build.xml files and classpath. However, I don't know which ones and where/how I should edit them?

      Anyone got an idea?

      Thanks.

        • 1. Re: Adding my own jar to portal source
          peterj

          Try this. Mimic the directory layout in third party, and add an entry to the thirdparty/libraries.ent file, mimicing one of the existing entries. Then in entity/build.xml, add your entry to the library.classpath path.

          • 2. Re: Adding my own jar to portal source
            dleerob

            Thanks. I did actually end up doing exactly that, and then read your post. Nice to see I was on the right track.
            The build now compiled successfully, but im not sure how it copies across or packages the the jar file. So at runtime (when running portal), it cant find the classes in that jar file and throws a class not found exception. I manually put the jar file in server\default\lib, which solved this problem, and then everything worked perfectly. But can I edit the build file, or what must I do, in order for the jar file to be automatically packaged and seen by portal without me having to manually stick it in the lib directory?

            • 3. Re: Adding my own jar to portal source
              peterj

              The other possible location is to place it in the jboss-portal.sar/lib directory. And yes you should modify the build to place it there.