Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
com.github.jirkafm:generic-artifactory-deploy-maven-plugin
Advanced tools
Plugin allows to upload any artifact into generic package type artifactory repository. Purpose of this plugin is to be able to upload files into generic repository throuh REST API for uploading into maven repository on artifactory please use better maven-artifactory-plugin.
Welcome to the generic-artifactory-deploy-maven-plugin plugin for Apache Maven 3.
This plugin is meant to provide an easy way to upload files into generic package type of artifactory repository.
This plugin is based on work of another plugin rest-maven-plugin. Credit to author of that plugin Carl Nygard.
For Java 8 and newer.
To use this plugin and start uploading filse into artifactory, declare the plugin and add a dependency on generic-artifactory-deploy-maven-plugin:
<packaging>jar</packaging>
....
<build>
<plugins>
<plugin>
<groupId>com.github.jirkafm</groupId>
<artifactId>generic-artifactory-deploy-maven-plugin</artifactId>
<version>1.0.1</version>
</plugin>
</plugins>
</build>
....
<dependencies>
<dependency>
<groupId>com.github.jirkafm</groupId>
<artifactId>generic-artifactory-deploy-maven-plugin</artifactId>
<version>1.0.1</version>
</dependency>
</dependencies>
Check out example configuration here
To specify the input fileset you can add the following configurations. To use a single fileset:
<configuration>
<fileset>
<directory>${project.resources[0].directory}</directory>
<includes>
<include>*.md</include>
</includes>
</fileset>
</configuration>
To use multiple filesets, just wrap the single fileset in a filesets list wrapper:
<configuration>
<filesets>
<fileset>
<directory>${project.resources[0].directory}</directory>
<includes>
<include>*.md</include>
</includes>
</fileset>
<fileset>
<....>
</fileset>
</filesets>
</configuration>
The Artifactory URL endpoint is specified via two parameters, the url and the repository. The components are separated so that mapping separate execution configurations to different repository extensions can still share the same base url setting.
<configuration>
<url>http://localhost:8081/artifactory/</url>
<repository>generic-local</repository>
</configuration>
Please note that if you only need to upload to one repository you can omit repository parameter and set it in url.
<configuration>
<url>http://localhost:8081/artifactory/generic-local</url>
</configuration>
Authentication is done through authentication header. User has several options to setup authentication header. Artifactory wiki provides mechanism to authenticate please check this link for details.
Supported authentication mechanisms:
Basic authentication:
<configuration>
<username>admin</username>
<password>password</password>
</configuration>
API Key:
<configuration>
<apiKey>your_api_key</apiKey>
</configuration>
Access token:
<configuration>
<accessToken>your_access_token</accessToken>
</configuration>
Validation of integrity of uploaded files is done through checksum headers. User can choose what kind of checksum headers will be generated for uploaded file:
There is a fileChecksums option in configuration to define checksum algorithms. Here is an example of configuration:
<configuration>
<fileChecksums>
<param>SHA1</param>
<param>SHA256</param>
<param>MD5</param>
</fileChecksums>
</configuration>
The Artifactory request URL can be further modified by adding header parameters to the request. These header parameters can be configured via the headers tag, which is a map of key/value pairs.
<configuration>
<headers>
<Content-Type>application/json</Content-Type>
</headers>
</configuration>
Please note that plugin itself creates several headers to succesfully deploy files into artifactory.
Following headers are usually created:
Please note this option was taken from rest-maven-plugin you don't need to configure this parameters.
The REST request method can be configured via the method tag. Currently only the default setting PUT is fully tested and supported. Other HTTP methods can be set however they don't make much sense.
<configuration>
<method>PUT</method>
</configuration>
Please note this option was taken from rest-maven-plugin you don't need to configure this parameters.
The REST request URL can be further modified by adding query parameters to the request. These query parameters can be configured via the queryParams tag, which is a map of key/value pairs.
For example, to add the properties n=3 and addRequired=1 to the REST request URL, the following configuration can be used:
<configuration>
<queryParams>
<n>3</n>
<addRequired>1</addRequired>
</queryParams>
</configuration>
Please note this option was taken from rest-maven-plugin you don't need to configure this parameters.
The REST request and response types can be configured via the requestType and responseType tags. Defaults for request and response types are 'text/plain' and 'application/octet-stream' respectively.
The request and response type parameters use the MediaType datatype and consequently can be configured using the tags of the MediaType object. For example:
<configuration>
<requestType>
<type>application</type>
<subtype>json</subtype>
</requestType>
<responseType>
<type>application</type>
<subtype>pdf</subtype>
</responseType>
</configuration>
FAQs
Plugin allows to upload any artifact into generic package type artifactory repository. Purpose of this plugin is to be able to upload files into generic repository throuh REST API for uploading into maven repository on artifactory please use better maven-artifactory-plugin.
We found that com.github.jirkafm:generic-artifactory-deploy-maven-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.