The PicketLink libraries are available from the Maven Central Repository. The dependencies can be easily configured in your Maven-based project by using the PicketLink Bill of Materials(BOM). A BOM is a very handy tool to properly manage your dependencies and their versions keeping your project in sync with the libraries supported and distributed by a specific PicketLink version.
Note
PicketLink libraries are available on JBoss Release Repository at https://repository.jboss.org/nexus/index.html#nexus-search;gav~org.picketlink~~2.6.0.CR2~~ and Maven Central at http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.picketlink%22%20AND%20v%3A%222.6.0.CR2%22.
For most applications using Java EE 6.0, the picketlink-javaee-6.0 BOM can be used to define the PicketLink and Java EE 6.0 dependencies to your project.
<properties> <!-- PicketLink dependency versions --> <version.picketlink.javaee.bom> 2.6.0.CR2</version.picketlink.javaee.bom> </properties> <dependencyManagement> <dependencies> <!-- Dependency Management for PicketLink and Java EE 6.0. --> <dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-javaee-6.0</artifactId> <version>${version.picketlink.javaee.bom}</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement>
Once the BOM is properly configured, you need to configure the PicketLink dependencies. When using a BOM you don't need to specify their versions because this is managed automatically , the version in use depends on the BOM's version. For example, the configuration above is defining a version 2.6.0.CR2 of the picketlink-javaee-6.0 BOM, which means you'll be using version 2.6.0.CR2 of the PicketLink libraries.
For a typical application, it is suggested that you include the following PicketLink dependencies:
<dependencies> <!-- Import the PicketLink API, we deploy this as library with the application, and can compile against it --> <dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-api</artifactId> </dependency> <!-- Import the PicketLink implementation, we deploy this as library with the application, but don't compile against it --> <dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-impl</artifactId> <scope>runtime</scope> </dependency> </dependencies>
PicketLink also provides a specific BOM with theApache Deltaspike(core and security modules) dependencies if you want to use it in conjunction with PicketLink.
<properties> <!-- PicketLink dependency versions --> <version.picketlink.javaee.bom> 2.6.0.CR2</version.picketlink.javaee.bom> </properties> <dependencyManagement> <dependencies> <!-- Dependency Management for PicketLink and Apache Deltaspike. --> <dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-javaee-6.0-with-deltaspike</artifactId> <version>${version.picketlink.javaee.bom}</version> <scope>import</scope> <type>pom</type> </dependency> </dependencies> </dependencyManagement>
If you want to configure the PicketLink Identity Management dependencies, then add the following dependencies:
<dependencies> <dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-idm-api</artifactId> <scope>compile</scope> </dependency> <dependency> <groupId>org.picketlink</groupId> <artifactId>picketlink-idm-impl</artifactId> <scope>runtime</scope> </dependency>
Note
We strongly recommend using a BOM to configure your project with the PicketLink dependencies. This can avoid some very common and tricky issues like keep the dependencies in sync with the versions distributed in a release.