Skip to main content

This is the pulp_maven Plugin for Pulp Project 3.0+. This plugin let’s users use Pulp as a pull-through cache for Maven repositories.

All REST API examples bellow use httpie to perform the requests. The httpie commands below assume that the user executing the commands has a .netrc file in the home directory. The .netrc should have the following configuration:

machine localhost
login admin
password admin

If you configured the admin user with a different password, adjust the configuration accordingly. If you prefer to specify the username and password with each request, please see httpie documentation on how to do that.

This documentation makes use of the jq library to parse the json received from requests, in order to get the unique urls generated when objects are created. To follow this documentation as-is please install the jq library with:

$ sudo dnf install jq

Install pulpcore

Follow the installation instructions provided with pulpcore.

Users should install from either PyPI or source.

Install pulp-maven from source

sudo -u pulp -i
source ~/pulpvenv/bin/activate
git clone https://github.com/pulp/pulp_maven.git
cd pulp_maven
pip install -e .

Install pulp-maven From PyPI

sudo -u pulp -i
source ~/pulpvenv/bin/activate
pip install pulp-maven

Make and Run Migrations

export DJANGO_SETTINGS_MODULE=pulpcore.app.settings
django-admin makemigrations maven
django-admin migrate maven

Run Services

django-admin runserver 24817
gunicorn pulpcore.content:server --bind 'localhost:24816' --worker-class 'aiohttp.GunicornWebWorker' -w 2
sudo systemctl restart pulpcore-resource-manager
sudo systemctl restart pulpcore-worker@1
sudo systemctl restart pulpcore-worker@2

Create a new Maven remote bar

$ http POST http://localhost:24817/pulp/api/v3/remotes/maven/maven/ name='bar' url='https://repo1.maven.org/maven2/'

{
    "pulp_href": "/pulp/api/v3/remotes/maven/maven/2668a20c-3908-4767-b134-531e5145d7b7/",
    ...
}

$ export REMOTE_HREF=$(http :24817/pulp/api/v3/remotes/maven/maven/ | jq -r '.results[] | select(.name == "bar") | .pulp_href')

Create a Maven Distribution for the Maven Remote

$ http POST http://localhost:24817/pulp/api/v3/distributions/maven/maven/ name='baz' base_path='my/local/maven' remote=$REMOTE_HREF

{
    "pulp_href": "/pulp/api/v3/distributions/67baa17e-0a9f-4302-b04a-dbf324d139de/",
   ...
}

Add Pulp as mirror for Maven

<settings>
  <mirrors>
    <mirror>
      <id>pulp-maven-central</id>
      <name>Local Maven Central mirror </name>
      <url>http://localhost:24816/pulp/content/my/local/maven</url>
      <mirrorOf>central</mirrorOf>
    </mirror>
  </mirrors>
</settings>

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulp_maven-0.25.0.tar.gz (64.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulp_maven-0.25.0-py3-none-any.whl (74.7 kB view details)

Uploaded Python 3

File details

Details for the file pulp_maven-0.25.0.tar.gz.

File metadata

  • Download URL: pulp_maven-0.25.0.tar.gz
  • Upload date:
  • Size: 64.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pulp_maven-0.25.0.tar.gz
Algorithm Hash digest
SHA256 794c02cc85db6d129537b0e54b2fe04eb31d4042886e4e6fd12a4d415e2eb29d
MD5 98e023fe4ff28a4a4bc3ec4ab6a6d87e
BLAKE2b-256 980095f81cf80d3f02dd7baea221fc01802a873d84dd11de0615fea31e147433

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_maven-0.25.0.tar.gz:

Publisher: publish.yml on pulp/pulp_maven

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pulp_maven-0.25.0-py3-none-any.whl.

File metadata

  • Download URL: pulp_maven-0.25.0-py3-none-any.whl
  • Upload date:
  • Size: 74.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pulp_maven-0.25.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52373394e53d7e5628b206972d5f8c4e56eeffb795c0276bfef89b2a56a1292c
MD5 0654681986b5421d7ac536a673501468
BLAKE2b-256 df7221efdbe5f6dfa0e43677a5102ef023423a0664c413522d7f2cc1d4e6d323

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_maven-0.25.0-py3-none-any.whl:

Publisher: publish.yml on pulp/pulp_maven

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page