Skip to main content
Version: 1.9.x

Maven

Collects Maven artifacts.

Details

Transfer Tag

hoppr.core_plugins.collect_maven_plugin

Supported PURLs

maven

System Dependencies

Transfer File Example

---
schemaVersion: v1
kind: transfer

stages:
collect:
plugins:
- name: "hoppr.core_plugins.collect_maven_plugin"
config:
maven_opts:
- -Dhttp.proxyHost=proxy.mycompany.com
- -Dhttp.proxyPort=80
- -Dhttps.proxyHost=proxy.mycompany.com
- -Dhttps.proxyPort=80
- -Dhttp.nonProxyHosts=*.mycompany.com

max_processes: 3

Configuration Options​

OptionDetails
maven_commandString. Defaults to mvn. Command to be used to execute mvn commands. May be overridden with another command that uses the same syntax, or a fully qualified path if mvn is not on the default $PATH.
maven_optsArray of Strings. Additional options to be passed to the mvn command
process_timeoutNumber of seconds to attempt collect before timeout. Default: 60

Proxy and Certificate Configuration​

To configure proxies, edit the settings.xml file for your Maven setup, as specified in [https://maven.apache.org/guides/mini/guide-proxies.html].

<settings>
.
.
<proxies>
<proxy>
<id>example-proxy</id>
<active>true</active>
<protocol>http</protocol>
<host>proxy.example.com</host>
<port>8080</port>
<username>proxyuser</username>
<password>somepassword</password>
<nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
</proxy>
</proxies>
.
.
</settings>

For configuring certificates for Maven, see: [https://maven.apache.org/guides/mini/guide-repository-ssl.html].

Credentials Configuration​

To specify credentials, you need a credentials file.

Sample credentials file:

---
schemaVersion: v1
kind: Credentials

metadata:
name: Registry Credentials
version: v1
description: Sample credentials file

credential_required_services:
- url: registry.gitlab.com
user_env: CI_REGISTRY_USER
pass_env: CI_REGISTRY_PASSWORD

SBOM Generation Tools​

note

For more tools visit the CycloneDX Tool Center