GithubHelp home page GithubHelp logo

bom-maven-plugin's Introduction

bom-maven-plugin

Create a BOM (bill of materials) from a set of jars or tar file. The bom is formatted as a pom.

Goals

There is one goal: extract creates a bom from the jars found in a directory or tar.

The specified source is recursively searched for files ending with '.jar'. If the specified source ends with '.tar' or '.tar.gz', it is assumed to be a tar file. All files inside the tar ending with '.jar' are extracted to the temp directory.

Once the set of jars is determined, each is examined to determine its GAV (groupId,artifactId,version).

First, the jar is scanned for the existence of a 'META-INF/maven/**/pom.properties' file. If the file exists, it contains the GAV.

If pom.properties is not present, the sha1 hash of the jar is computed, and maven central is queried to determine the GAV of the jar. If multiple jars with the same hash are returned from maven central, the best match based on the name of the jar will be used.

Using the GAV of the jars, a pom.xml is generated with the jars as dependencies.

Mojo details at plugin info

Parameters

Every parameter can be set with a maven property bom.<parameter_name>. e.g. source parameter can be set from command line: -Dbom.source=image.tar

Parameter Default Description
groupId extracted The groupId for the bom
artifactId bom The artifactId for the bom
version 1.0.0-SNAPSHOT The version for the bom
bom pom.xml The output file
source The source to examine, Defaults to current directory
unknowns The directory to receive a copy of unknown jars

Requirements

  • Maven 3.5 or later
  • Java 11 or later

Typical Uses

# extract bill of materials from the jars in the current directory
mvn org.honton.chas:bom-maven-plugin:1.1.0:extract -D bom.groupId=myGroup

# extract bill of materials from image.tar
mvn org.honton.chas:bom-maven-plugin:1.1.0:extract -D bom.source=image.tar

bom-maven-plugin's People

Contributors

chonton avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.