Product SiteDocumentation Site

1.6. Maven Dependencies

The PicketLink libraries are available from 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.
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.CR5</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.CR5 of the picketlink-javaee-6.0 BOM, which means you'll be using version 2.6.0.CR5 of PicketLink libraries.
For a typical application, it is suggested that you include the following PicketLink dependency:
<dependencies>
    <!--
        PicketLink Uber Dependency. It provides all PicketLink dependencies from a single JAR. You still can define each module separately, if you want to.
    -->
  <dependency>
    <groupId>org.picketlink</groupId>
    <artifactId>picketlink</artifactId>
  </dependency>
</dependencies>
The org.picketlink:picketlink dependency above is a uber jar containing the most common PicketLink modules and their dependencies.
  • picketlink-api - API for PicketLink's Base module.
  • picketlink-impl - Internal implementation classes for the Base API.
  • picketlink-idm-api - API for PicketLink's IDM module.
  • picketlink-idm-impl - Internal implementation classes for the IDM API.
  • picketlink-deltaspike - API for authorization, providing some built-in annotations. This module is based on Apache DeltaSpike Security.
This is by far the most easy way to configure PicketLink in your project. The org.picketlink:picketlink dependency avoids you to specify each module separately.It provides to your project all Authentication, Authorization and Identity Management features provided by PicketLink.
However, you may not use the org.picketlink:picketlink dependency at all and define each module in your project's pom.xml. The minimal dependencies required to enable PicketLink in your project are:
<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 can't compile against it -->
  <dependency>
    <groupId>org.picketlink</groupId>
    <artifactId>picketlink-impl</artifactId>
    <scope>runtime</scope>
  </dependency>
	
</dependencies>
The dependencies above provide to your project all Authentication and Identity Management features provided by PicketLink.
If you also want to enable Authorization to your project, you can define the org.picketlink:picketlink-deltaspike dependency as follows:
<dependencies>
  <dependency>
    <groupId>org.picketlink</groupId>
    <artifactId>picketlink-deltaspike</artifactId>
  </dependency>
</dependencies>

Note

The authorization features provided by PicketLink are based on Apache DeltaSpike. When you configure the org.picketlink:picketlink-deltaspike dependency to your project, Deltaspike's dependencies are added to your project's classpath and shipped within your application.
If you want to configure the PicketLink Identity Management dependencies, then add the following to your project's pom.xml:
<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.