JPM is a Java CLI tool that adds Maven dependencies to pom.xml using simple aliases.
jpm add postgres
jpm add lombok
jpm add web- Parses terminal commands
- Detects
pom.xml - Resolves aliases to Maven coordinates
- Fetches the latest version from Maven Central
- Updates
pom.xmlusing DOM XML parsing - Prevents duplicate direct dependencies
- Saves the modified file safely
Use the automated installer:
curl -sSL https://raw.githubusercontent.com/israelglory/jpm/main/install-jpm.sh | bash -s -- v1.0.3Or specify latest:
curl -sSL https://raw.githubusercontent.com/israelglory/jpm/main/install-jpm.sh | bash -s -- latestsrc/main/java/com/jpm/
├── Main.java
├── Dependency.java
├── DependencyResolver.java
├── MavenCentralClient.java
└── PomEditor.java
Main.java– CLI entrypoint, command parsing, and user-facing messagesDependency.java– immutable dependency modelDependencyResolver.java– maps aliases to real Maven coordinates and asks Maven Central for the latest versionMavenCentralClient.java– performs the HTTP request to Maven CentralPomEditor.java– reads and updatespom.xmlwith DOM APIs
- Java 17+
- Maven 3.9+
cd /Users/user/Documents/Backend/jpm
mvn clean packageFrom the directory that contains your Maven project pom.xml:
java -jar target/jpm-1.0.0.jar add postgresOr use the local launcher:
./bin/jpm add postgresOr run directly from compiled classes:
mvn -q compile
java -cp target/classes Main add lombokmvn clean packageThe JAR will be at target/jpm-1.0.3.jar.
brew tap your-org/jpm https://github.com/israelglory/homebrew-jpm
brew install your-org/jpm/jpm-
Update
CHANGELOG.mdwith new version and changes. -
Update
pom.xmlversion (e.g.,1.0.0for releases,1.0.1-SNAPSHOTfor dev). -
Commit and push:
git add CHANGELOG.md pom.xml git commit -m "Release v1.0.0" git tag -a v1.0.0 -m "JPM v1.0.0" git push origin main git push origin v1.0.0
-
GitHub Actions automatically:
- Builds the JAR
- Generates checksums
- Creates a GitHub Release with JAR and checksums attached
-
Verify the release on GitHub Releases.
Check the version:
jpm --version
# or
jpm version- Report issues on GitHub Issues
- See CONTRIBUTING.md for contribution guidelines
- See CHANGELOG.md for release history
The JAR will be created in target/ and contains a manifest that points to Main.
Success:
✔ Dependency added successfully
Duplicate:
✔ Dependency already exists
Missing pom.xml:
✘ No pom.xml found