Product SiteDocumentation Site

1.8. Referencing PicketLink from JBoss Modules

All the necessary PicketLink libraries are available in your JBoss Application Server installation from JBoss Modules. To configure them in your deployment, just 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 Federation to your deployment. -->
			<module name="org.picketlink" />
		</dependencies>
	</deployment>
</jboss-deployment-structure>
<jboss-deployment-structure>
	<deployment>
		<dependencies>
			<!-- This will enable PicketLink Authentication/Authorization and IDM dependencies to your deployment. -->
			<module name="org.picketlink.core" meta-inf="import" annotations="true"/>
			<module name="org.picketlink.core.api" meta-inf="import" annotations="true"/>
			<module name="org.picketlink.idm" meta-inf="import" annotations="true"/>
			<module name="org.picketlink.idm.api" meta-inf="import" annotations="true"/>
		</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. 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.
When using PicketLink mdules, 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>