Run Maven builds using the ccmvn tool, which provides Maven proxy support for sandboxed environments. Use this skill when you need to run Maven commands like clean install, package, test, or compile.
The ccmvn tool enables Maven to run in restricted sandbox environments where outbound HTTPS is blocked or DNS resolution is unavailable. It works by creating a local HTTP proxy that Maven uses to access Maven Central.
clean install, package, test, compile, etc.)Before using this skill, ensure:
HTTPS_PROXY```bash npx ccmvn clean install ```
```bash
npx ccmvn package
npx ccmvn test
npx ccmvn compile
npx ccmvn clean install -DskipTests npx ccmvn clean install -X # Debug output ```
ccmvn creates a three-layer proxy chain:
``` Maven → Local Proxy → Upstream Sandbox Proxy → Maven Central (HTTP) (HTTP CONNECT) (HTTP/2 over TLS) ```
Maven → Local Proxy (localhost:8080)
Local Proxy → Upstream Proxy
Local Proxy → Maven Central
ccmvn automatically:
| Command | Purpose |
|---|---|
| `ccmvn clean` | Remove build artifacts |
| `ccmvn compile` | Compile source code |
| `ccmvn test` | Run tests |
| `ccmvn package` | Create JAR/WAR file |
| `ccmvn install` | Install to local repository |
| `ccmvn deploy` | Deploy to remote repository |
| `ccmvn clean install` | Full clean build and install |
```bash npx ccmvn clean install -DskipTests ```
```bash npx ccmvn clean install -X ```
```bash npx ccmvn clean compile test-compile ```
Maven will automatically use `~/.m2/settings.xml`. To verify or modify proxy settings, check this file after running ccmvn.
If you see proxy-related errors:
If Maven is not installed: ```bash
brew install maven # macOS apt-get install maven # Ubuntu/Debian ```
If builds timeout accessing Maven Central:
ccmvn automatically creates `~/.m2/settings.xml` if missing. If you have a custom settings file:
```bash npx ccmvn clean package -DskipTests ```
```bash npx ccmvn clean test ```
```bash npx ccmvn clean install ```
```bash npx ccmvn clean install -pl module-name ```
This is automatically used by ccmvn for sandboxed Claude Code environments. In local development, this is typically not needed.