11.3. Configuring the PicketLink Dependencies for your Deployment
One your JBoss Application Server is properly configured with all PicketLink libraries and their respective modules, you can add a
META-INF/jboss-deployment-structure.xml
file inside the root directory of your deployment to configure the dependencies as follows:
<jboss-deployment-structure> <deployment> <dependencies> <!-- This will enable PicketLink Authentication/Authorization and IDM dependencies to your deployment. --> <module name="org.picketlink.core" /> </dependencies> </deployment> </jboss-deployment-structure>
<jboss-deployment-structure> <deployment> <dependencies> <!-- This will enable only the IDM dependencies to your deployment. --> <module name="org.picketlink.idm" /> </dependencies> </deployment> </jboss-deployment-structure>
It is strongly recommended that you use the PicketLink libraries from your JBoss Application Server modules. When using this way, you don't need to add any additional library to your deployments and you can easily manage the PicketLink libraries without requiring changes to your deployments.
Considering that you no longer need the PicketLink libraries inside your deployment, you must change your Maven dependencies to use the PicketLink dependencies with scope
provided
:
<dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-api</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-idm-api</artifactId> <scope>provided</scope> </dependency>