Skip to main content

MSPS - Maven Settings Profile Switcher

PyPI - Version PyPI - Python Version PyPI - License Sonar Coverage Sonar Quality Gate

MSPS is a user-friendly tool that simplifies switching between various Maven settings profiles.

The problem

Profiles let you set up repositories or servers for each project or environment, streamlining your workflow and keeping your workspace clean. You can set up different settings for personal coding, testing new tools, and work. However, there are a few settings, like mirror configurations, that can't be tucked away in profiles.

This means if you need to switch between a private mirror in one environment and the Maven Central in another, you'll need to make those adjustments directly in the settings.xml file itself, or you might need to replace the entire file. This can be cumbersome, especially when managing many profiles and switching between them frequently.

🔨 Requirements

  • Python 3.13 or later

💾 Installation

pip install msps

⚙️ Configuration

Maven settings profiles

The tool expects the Maven settings profiles to be stored in the Maven home directory.

MSPS first checks the M2_HOME environment variable to identify the Maven home directory. If this variable is not set, it searches for the .m2 directory within the user's home directory.

The profiles should be named in the following format:

settings__profile_name.xml

🔧 Usage

msps <command> [profile]

Commands

  • switch - Switch to the next available profile or the specified profile.
  • list - List available profiles.

Profile

  • The name of the profile to switch to.

👨‍🔧 Examples

Unspecified profile switch

The tool will automatically switch to the next available profile.

msps switch
╭──────────── Maven Settings Profile Switcher ────────────╮
│                                                         │
│  Profile changed from current_profile to next_profile.  │
│                                                         │
╰─────────────────────────────────────────────────────────╯

Switch to profile

The specified profile will be activated.

msps switch work
╭───────────── Maven Settings Profile Switcher ──────────────╮
│                                                            │
│  M2_HOME: /home/testuser/.m2/                              │
│  Available settings profiles:                              │
│    - personal (/home/testuser/.m2/settings__personal.xml)  │
│    - work (/home/testuser/.m2/settings__work.xml)          │
│  Profile changed from personal to work.            │
│                                                            │
╰────────────────────────────────────────────────────────────╯

Switch to non-existent profile

No changes will be made if the specified profile is not found.

msps switch target_profile
╭───────────── Maven Settings Profile Switcher ──────────────╮
│                                                            │
│  Missing profile: target_profile                           │
│                                                            │
│  M2_HOME: /home/testuser/.m2/                              │
│  Available settings profiles:                              │
│    - personal (/home/testuser/.m2/settings__personal.xml)  │
│    - work (/home/testuser/.m2/settings__work.xml)          │
│  No changes were made.                                     │
│                                                            │
╰────────────────────────────────────────────────────────────╯

List available profiles

msps list
╭───────────── Maven Settings Profile Switcher ──────────────╮
│                                                            │
│  Available settings profiles:                              │
│    - personal (/home/testuser/.m2/settings__personal.xml)  │
│    - work (/home/testuser/.m2/settings__work.xml)          │
│                                                            │
╰────────────────────────────────────────────────────────────╯

Metadata

Release files for msps 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for msps 1.0.4
File Size Uploaded Provenance Actions
msps-1.0.4.tar.gz 8.4 kB With provenance Details for msps-1.0.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for msps 1.0.4
File Interpreter ABI Platform Actions
msps-1.0.4-py3-none-any.whl Python 3 none any Details for msps-1.0.4-py3-none-any.whl

Total release size: 15.2 kB

Release files / msps-1.0.4.tar.gz

Download URL msps-1.0.4.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7ae762462ecf6e3d858a3e60899d376f41aae7e07d31058baf4287be61595a81
BLAKE2b-256 checksum
How to use checksums
83629aebebd96c0fefab0bfd63ccd5a9b253aac909005543ae1aad867a50b8e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

Release files / msps-1.0.4-py3-none-any.whl

Download URL msps-1.0.4-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
110b3d2f1dad197d988ab1fc35972ebf8f14fdad90322a1c33c8dbc191a1ba3a
BLAKE2b-256 checksum
How to use checksums
eb2eee816b8cd3bb6e678d3a36f47625e376d5a3c5df94694ddc4ba20b708623
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

Security for msps 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for msps-1.0.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 8, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page