# Send maven-central-publish to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "maven-central-publish",
    "name": "maven-central-publish",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/MISAKIGA/maven-central-publish",
    "canonicalUrl": "https://clawhub.ai/MISAKIGA/maven-central-publish",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/maven-central-publish",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=maven-central-publish",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "templates/pom-plugins.xml",
      "templates/settings.xml"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/maven-central-publish"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/maven-central-publish",
    "downloadUrl": "https://openagent3.xyz/downloads/maven-central-publish",
    "agentUrl": "https://openagent3.xyz/skills/maven-central-publish/agent",
    "manifestUrl": "https://openagent3.xyz/skills/maven-central-publish/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/maven-central-publish/agent.md"
  }
}
```
## Documentation

### Maven Central Publish Skill

This skill provides a standardized workflow for publishing Java/Kotlin libraries to the Maven Central Repository using the modern Central Portal (via central-publishing-maven-plugin).

### 📋 Prerequisites

Central Portal Account: Sign up at central.sonatype.com.
Namespace Verified: You must have verified your groupId (e.g., io.github.username or com.yourdomain) in the portal.
User Token: Generated from the Central Portal (My Account -> Generate User Token).

### 1. Install Tools

Ensure maven, gnupg, and openjdk-17+ are installed.

# Ubuntu/Debian
apt-get install -y maven gnupg openjdk-17-jdk

### 2. GPG Configuration (Critical)

Maven requires GPG signing. For automated/headless environments, Loopback Pinentry is required.

# 1. Generate Key (if none exists)
gpg --gen-key

# 2. Configure Loopback (Prevent UI prompts)
mkdir -p ~/.gnupg
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf
gpg-connect-agent reloadagent /bye

# 3. Publish Key
gpg --list-keys # Get your Key ID (last 8 chars or full hex)
gpg --keyserver keyserver.ubuntu.com --send-keys <KEY_ID>

### 3. Maven Settings (~/.m2/settings.xml)

Configure your Central Portal credentials.

<settings>
  <servers>
    <server>
      <id>central</id>
      <username>USER_TOKEN_USERNAME</username>
      <password>USER_TOKEN_PASSWORD</password>
    </server>
  </servers>
  <profiles>
    <profile>
      <id>release</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
        <gpg.executable>gpg</gpg.executable>
        <gpg.passphrase>YOUR_GPG_PASSPHRASE</gpg.passphrase>
      </properties>
    </profile>
  </profiles>
</settings>

### 📦 Project Configuration (pom.xml)

Your project MUST meet the Quality Requirements:

Coordinates: groupId, artifactId, version.
Metadata: name, description, url, licenses, developers, scm.
Plugins: Javadoc, Source, GPG, and Central Publishing.

### Recommended Plugin Configuration

Add this to your <build><plugins> section:

<!-- 1. Source Plugin -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-source-plugin</artifactId>
    <version>3.3.0</version>
    <executions>
        <execution>
            <id>attach-sources</id>
            <goals><goal>jar-no-fork</goal></goals>
        </execution>
    </executions>
</plugin>

<!-- 2. Javadoc Plugin -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-javadoc-plugin</artifactId>
    <version>3.6.3</version>
    <configuration>
        <doclint>none</doclint> <!-- Prevent strict checks failing build -->
        <failOnError>false</failOnError>
    </configuration>
    <executions>
        <execution>
            <id>attach-javadocs</id>
            <goals><goal>jar</goal></goals>
        </execution>
    </executions>
</plugin>

<!-- 3. GPG Plugin (Best Practice: wrap in 'release' profile) -->
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-gpg-plugin</artifactId>
    <version>3.1.0</version>
    <configuration>
        <gpgArguments>
            <arg>--pinentry-mode</arg>
            <arg>loopback</arg>
        </gpgArguments>
    </configuration>
    <executions>
        <execution>
            <id>sign-artifacts</id>
            <phase>verify</phase>
            <goals><goal>sign</goal></goals>
        </execution>
    </executions>
</plugin>

<!-- 4. Central Publishing Plugin (The Magic Sauce) -->
<plugin>
    <groupId>org.sonatype.central</groupId>
    <artifactId>central-publishing-maven-plugin</artifactId>
    <version>0.7.0</version>
    <extensions>true</extensions>
    <configuration>
        <publishingServerId>central</publishingServerId>
        <!-- autoPublish: set to true to skip manual button click in portal -->
        <autoPublish>false</autoPublish> 
    </configuration>
</plugin>

### 🚀 Deployment

Run the deploy command with the release profile active:

mvn clean deploy -P release

Success Indicators:

[INFO] Uploaded bundle successfully...
[INFO] Deployment ... has been validated.

If autoPublish is false (recommended for first time), log in to central.sonatype.com, review the deployment, and click Publish.

### ❓ Troubleshooting

ErrorCauseFix401 UnauthorizedInvalid User Token in settings.xmlGenerate new token in Central Portal. Ensure server ID matches.GPG signing failedNo pinentry / wrong passphraseUse pinentry-mode loopback config; Check gpg-agent.Javadoc generation failedStrict HTML checksAdd <doclint>none</doclint> to javadoc plugin config.Invalid coordinatesGroupId mismatchEnsure pom.xml groupId matches verified namespace in Portal.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: MISAKIGA
- Version: 1.0.0
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-05-07T17:22:31.273Z
- Expires at: 2026-05-14T17:22:31.273Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/maven-central-publish)
- [Send to Agent page](https://openagent3.xyz/skills/maven-central-publish/agent)
- [JSON manifest](https://openagent3.xyz/skills/maven-central-publish/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/maven-central-publish/agent.md)
- [Download page](https://openagent3.xyz/downloads/maven-central-publish)