Plugin Documentation

Goals available for this plugin:

Goal Description
spdx:createSPDX NOTE: Currently this is a prototype plugin for supporting SPDX in a Maven build.

Goal which creates a new SPDX file for the package being built. Will replace any existing SPDX file.

All SPDX document and SPDX package properties are supported as parameters to the plugin.

File level data supports default parameters which are applied to all files. Future versions of this plugin will support file specific parameters.

The treatment of licenses for Maven is somewhat involved. Where possible, SPDX standard licenses ID's should be used. If no SPDX standard license is available, a nonStandardLicense must be declared as a parameter including a unique license ID and the verbatim license text.

The following SPDX fields are populated from the POM project information:

  • package name: project name or artifactId if the project name is not provided
  • package description: project description
  • package shortDescription: project description
  • package downloadUrl: distributionManager url
  • package homePage: project url
  • package supplier: project organization
  • package versionInfo: project version
  • files for analysis: build source files + project resource files

Additional SPDX fields are supplied as configuration parameters to this plugin.

spdx:help Display help information on spdx-maven-plugin.
Call mvn spdx:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 3.8.5
JDK 11

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.spdx</groupId>
          <artifactId>spdx-maven-plugin</artifactId>
          <version>0.7.4</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.spdx</groupId>
        <artifactId>spdx-maven-plugin</artifactId>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"