0 Replies Latest reply on Jan 5, 2011 12:48 PM by priyasrihari

    Sharing Seam security across different Maven projects

    priyasrihari

      Hi all


      I have an application that uses Seam(2.2) security and identity management and Maven for project management.
      The app has 3 maven projects where in one of the projects has the User and Role entity classes defined and also the components.xml has the configurations for the JpaIdentityStore and UserPermissions. The other two projects has this project defined as a dependancy in their pom and use these classes for identity management.
      However this does not seem to work, I get the exception, IdentityManagementException : @UserPrincipal not defined on field or method. If instead the User and Role classes are defined in the respective projects that use IdentityManager, it works as intended. Is this a Seam/Maven limitation.


      Also another problem that am facing is one of the Seam Maven projects has the implementation for seam security with the authenticator component defined. Is there a way to share this across another Seam Maven project. I attempted to do this by declaring the maven dependancy of the first project in the second project's pom and configuring the authenticator component from the first project in the second project's components.xml. This does not work and authentication fails. Also the second project has the login-required attribute set to true in its pages.xml, not sure how to get around this.


      Thanks in advance for any help/suggestions to get this working.
      Priya