When to use this skill
ALWAYS use this skill when the user mentions:
- Searching for Maven dependencies or components
- Finding Maven coordinates (groupId, artifactId, version)
- Checking component versions or version history
- Retrieving Maven artifacts (JAR, POM, sources, Javadoc)
- Verifying Maven dependency coordinates
- Analyzing dependency trees or transitive dependencies
- Working with Maven Central Repository
- Any request related to Maven components, libraries, or dependencies
Trigger phrases include:
- "查找 Maven 依赖" (find Maven dependency), "搜索 Maven 组件" (search Maven component)
- "Maven 坐标" (Maven coordinates), "groupId" (groupId), "artifactId" (artifactId)
- "Maven 版本" (Maven version), "最新版本" (latest version), "版本历史" (version history)
- "Maven Central" (Maven Central), "Maven 仓库" (Maven repository)
- "下载 Maven 依赖" (download Maven dependency), "获取 POM 文件" (get POM file)
- "依赖树" (dependency tree), "传递依赖" (transitive dependencies)
- Any mention of "Maven", "dependency", "artifact", "repository", "coordinates"
How to use this skill
CRITICAL: This skill should be triggered when the user needs to search, retrieve, or work with Maven components from Maven Central Repository.
Trigger this skill when you see:
- User says "查找 Maven 依赖" (find Maven dependency), "搜索 Maven 组件" (search Maven component)
- User needs Maven coordinates (groupId, artifactId, version)
- User wants to check component versions or retrieve artifacts
- User mentions Maven Central Repository or Maven dependencies
- User needs to analyze dependencies or verify coordinates
To search for Maven components:
Identify the search type from the user's request:
- Search by name → Use Maven Central Search API
- Get specific version → Use direct repository URL
- Check latest version → Query maven-metadata.xml
- Analyze dependencies → Parse POM file
- Download artifact → Use direct download URL
Load the appropriate example file from the examples/ directory:
examples/search-by-name.md - Search components by name or keywords
examples/search-by-coordinates.md - Search by groupId and artifactId
examples/get-version-info.md - Get version information and history
examples/download-artifact.md - Download JAR, POM, sources, or Javadoc
examples/analyze-dependencies.md - Analyze dependency tree
examples/verify-coordinates.md - Verify Maven coordinates validity
Follow the specific instructions in that example file for API endpoints, parameters, and best practices
Use Maven Central Repository API:
Search API (https://search.maven.org/solrsearch/select):
- Query parameter:
q - Search query (e.g., g:com.google.guava AND a:guava)
- Rows parameter:
rows - Number of results (default: 20, max: 200)
- Start parameter:
start - Pagination offset
- Core parameter:
core - Search core (default: gav)
Direct Repository Access (https://repo1.maven.org/maven2/):
- Path format:
{groupId}/{artifactId}/{version}/{artifactId}-{version}.{extension}
- GroupId path: Replace dots with slashes (e.g.,
com.google.guava → com/google/guava)
- Metadata:
maven-metadata.xml for version information
- POM file:
{artifactId}-{version}.pom
- JAR file:
{artifactId}-{version}.jar
- Sources:
{artifactId}-{version}-sources.jar
- Javadoc:
{artifactId}-{version}-javadoc.jar
Construct the appropriate URL:
Search Example:
https://search.maven.org/solrsearch/select?q=g:com.google.guava+AND+a:guava&rows=20&wt=json
Direct Access Example:
https://repo1.maven.org/maven2/com/google/guava/guava/maven-metadata.xml
https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.pom
https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.jar
Parse and format the results:
- Extract relevant information (groupId, artifactId, version, description)
- Format coordinates in standard Maven format:
groupId:artifactId:version
- Present results in a clear, structured format
- Include download links and metadata when relevant
Validate coordinates:
- Verify groupId format (should be reverse domain notation)
- Check artifactId format (should be lowercase, hyphen-separated)
- Validate version format (semantic versioning preferred)
- Confirm artifact exists before providing download links
Output Format Requirements:
- Always provide Maven coordinates in standard format:
groupId:artifactId:version
- Include direct download URLs when relevant
- Format search results in a clear, structured table or list
- Provide metadata information (description, repository, last updated) when available
- Include version information and release dates when querying versions
Maven Central Repository Structure
Repository Base URL
Path Structure
{groupId}/{artifactId}/{version}/{artifactId}-{version}.{extension}
Example:
com/google/guava/guava/33.0.0/guava-33.0.0.jar
Available Artifacts
- POM:
{artifactId}-{version}.pom - Project Object Model file
- JAR:
{artifactId}-{version}.jar - Compiled Java classes
- Sources:
{artifactId}-{version}-sources.jar - Source code
- Javadoc:
{artifactId}-{version}-javadoc.jar - API documentation
- Metadata:
maven-metadata.xml - Version and release information
Search API Parameters
Query Syntax
- GroupId search:
g:com.google.guava
- ArtifactId search:
a:guava
- Version search:
v:33.0.0
- Combined search:
g:com.google.guava AND a:guava
- Text search:
guava (searches in groupId, artifactId, and description)
Response Format
- JSON:
wt=json (default)
- XML:
wt=xml
- Java properties:
wt=javabin
Pagination
- rows: Number of results per page (default: 20, max: 200)
- start: Offset for pagination (default: 0)
Best Practices
- Always verify coordinates: Check that groupId, artifactId, and version exist before use
- Use latest stable versions: Prefer RELEASE versions over SNAPSHOT versions
- Check version metadata: Query
maven-metadata.xml for latest version information
- Validate before download: Verify artifact exists before providing download links
- Include checksums: When available, provide SHA-1 and MD5 checksums for verification
- Format coordinates correctly: Always use standard Maven format
groupId:artifactId:version
- Provide context: Include description, repository information, and last updated date when available
Common Tasks
Task 1: Search by Name
Use the Search API with text query to find components by name or keywords.
Example:
GET https://search.maven.org/solrsearch/select?q=guava&rows=20&wt=json
Task 2: Search by Coordinates
Use the Search API with groupId and artifactId to find specific components.
Example:
GET https://search.maven.org/solrsearch/select?q=g:com.google.guava+AND+a:guava&rows=20&wt=json
Task 3: Get Version Information
Query maven-metadata.xml to get all available versions and latest version.
Example:
GET https://repo1.maven.org/maven2/com/google/guava/guava/maven-metadata.xml
Task 4: Download Artifact
Construct direct download URL for specific artifact.
Example:
GET https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.jar
Task 5: Analyze Dependencies
Download and parse POM file to extract dependency information.
Example:
GET https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.pom
Keywords
English keywords:
maven, maven central, maven repository, maven dependency, maven artifact, maven component, groupId, artifactId, version, coordinates, pom, jar, dependency, repository, search, retrieve, download, metadata, transitive dependencies, dependency tree, maven coordinates, maven search
Chinese keywords (中文关键词):
Maven, Maven 中央仓库, Maven 仓库, Maven 依赖, Maven 组件, Maven 坐标, groupId, artifactId, version, 版本, 坐标, POM, JAR, 依赖, 仓库, 搜索, 检索, 下载, 元数据, 传递依赖, 依赖树, 查找依赖, 搜索组件, 获取版本, 下载依赖
Resources
能力边界
✅ 适用场景
- 当你需要使用此技能对应的技术栈时
- 当项目需要遵循最佳实践时
- 当需要快速上手或深入理解核心概念时
⚠️ 需要注意
- 复杂业务逻辑需要结合具体场景调整
- 性能优化需要根据实际数据量评估
❌ 不适用场景
常见陷阱 (Gotchas)
- 版本兼容性:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异
- 配置文件格式:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查
- 环境变量:确保所有必要的环境变量已正确设置,敏感信息不要硬编码
- 依赖冲突:多版本共存时注意依赖冲突,使用 lock 文件锁定版本
- 性能陷阱:大数据量场景下注意性能优化,避免 N+1 查询等常见问题
使用流程
Step 1: 环境准备
确保开发环境已安装必要的依赖和工具。
Step 2: 配置初始化
根据项目需求进行基础配置。
Step 3: 核心功能使用
按照示例代码实现核心功能。
Step 4: 测试验证
运行测试确保功能正常。
Step 5: 部署上线
完成开发后进行部署和监控。
1---2name: maven-search3description: Provides comprehensive guidance for searching and retrieving Maven components from Maven Central Repository (https://repo1.maven.org/maven2/). This skill enables searching by groupId, artifactId, version, and other coordinates, retrieving component metadata (POM files, JARs, sources, Javadoc), querying version history, and analyzing dependencies. Use when the user needs to find, verify, or retrieve Maven dependencies, check component versions, analyze dependency trees, or work with Maven coordinates.4license: Complete terms in LICENSE.txt5---67## When to use this skill89**ALWAYS use this skill when the user mentions:**10- Searching for Maven dependencies or components11- Finding Maven coordinates (groupId, artifactId, version)12- Checking component versions or version history13- Retrieving Maven artifacts (JAR, POM, sources, Javadoc)14- Verifying Maven dependency coordinates15- Analyzing dependency trees or transitive dependencies16- Working with Maven Central Repository17- Any request related to Maven components, libraries, or dependencies1819**Trigger phrases include:**20- "查找 Maven 依赖" (find Maven dependency), "搜索 Maven 组件" (search Maven component)21- "Maven 坐标" (Maven coordinates), "groupId" (groupId), "artifactId" (artifactId)22- "Maven 版本" (Maven version), "最新版本" (latest version), "版本历史" (version history)23- "Maven Central" (Maven Central), "Maven 仓库" (Maven repository)24- "下载 Maven 依赖" (download Maven dependency), "获取 POM 文件" (get POM file)25- "依赖树" (dependency tree), "传递依赖" (transitive dependencies)26- Any mention of "Maven", "dependency", "artifact", "repository", "coordinates"2728## How to use this skill2930**CRITICAL: This skill should be triggered when the user needs to search, retrieve, or work with Maven components from Maven Central Repository.**3132**Trigger this skill when you see:**33- User says "查找 Maven 依赖" (find Maven dependency), "搜索 Maven 组件" (search Maven component)34- User needs Maven coordinates (groupId, artifactId, version)35- User wants to check component versions or retrieve artifacts36- User mentions Maven Central Repository or Maven dependencies37- User needs to analyze dependencies or verify coordinates3839To search for Maven components:40411. **Identify the search type** from the user's request:42 - Search by name → Use Maven Central Search API43 - Get specific version → Use direct repository URL44 - Check latest version → Query maven-metadata.xml45 - Analyze dependencies → Parse POM file46 - Download artifact → Use direct download URL47482. **Load the appropriate example file** from the `examples/` directory:49 - `examples/search-by-name.md` - Search components by name or keywords50 - `examples/search-by-coordinates.md` - Search by groupId and artifactId51 - `examples/get-version-info.md` - Get version information and history52 - `examples/download-artifact.md` - Download JAR, POM, sources, or Javadoc53 - `examples/analyze-dependencies.md` - Analyze dependency tree54 - `examples/verify-coordinates.md` - Verify Maven coordinates validity55563. **Follow the specific instructions** in that example file for API endpoints, parameters, and best practices57584. **Use Maven Central Repository API**:59 60 **Search API** (https://search.maven.org/solrsearch/select):61 - Query parameter: `q` - Search query (e.g., `g:com.google.guava AND a:guava`)62 - Rows parameter: `rows` - Number of results (default: 20, max: 200)63 - Start parameter: `start` - Pagination offset64 - Core parameter: `core` - Search core (default: `gav`)65 66 **Direct Repository Access** (https://repo1.maven.org/maven2/):67 - Path format: `{groupId}/{artifactId}/{version}/{artifactId}-{version}.{extension}`68 - GroupId path: Replace dots with slashes (e.g., `com.google.guava` → `com/google/guava`)69 - Metadata: `maven-metadata.xml` for version information70 - POM file: `{artifactId}-{version}.pom`71 - JAR file: `{artifactId}-{version}.jar`72 - Sources: `{artifactId}-{version}-sources.jar`73 - Javadoc: `{artifactId}-{version}-javadoc.jar`74755. **Construct the appropriate URL**:76 77 **Search Example**:78 ```79 https://search.maven.org/solrsearch/select?q=g:com.google.guava+AND+a:guava&rows=20&wt=json80 ```81 82 **Direct Access Example**:83 ```84 https://repo1.maven.org/maven2/com/google/guava/guava/maven-metadata.xml85 https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.pom86 https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.jar87 ```88896. **Parse and format the results**:90 - Extract relevant information (groupId, artifactId, version, description)91 - Format coordinates in standard Maven format: `groupId:artifactId:version`92 - Present results in a clear, structured format93 - Include download links and metadata when relevant94957. **Validate coordinates**:96 - Verify groupId format (should be reverse domain notation)97 - Check artifactId format (should be lowercase, hyphen-separated)98 - Validate version format (semantic versioning preferred)99 - Confirm artifact exists before providing download links100101**Output Format Requirements**:102- Always provide Maven coordinates in standard format: `groupId:artifactId:version`103- Include direct download URLs when relevant104- Format search results in a clear, structured table or list105- Provide metadata information (description, repository, last updated) when available106- Include version information and release dates when querying versions107108## Maven Central Repository Structure109110### Repository Base URL111- **Primary**: https://repo1.maven.org/maven2/112- **Search API**: https://search.maven.org/solrsearch/select113- **Alternative mirrors**: Available for different regions114115### Path Structure116```117{groupId}/{artifactId}/{version}/{artifactId}-{version}.{extension}118```119120**Example**:121```122com/google/guava/guava/33.0.0/guava-33.0.0.jar123```124125### Available Artifacts126- **POM**: `{artifactId}-{version}.pom` - Project Object Model file127- **JAR**: `{artifactId}-{version}.jar` - Compiled Java classes128- **Sources**: `{artifactId}-{version}-sources.jar` - Source code129- **Javadoc**: `{artifactId}-{version}-javadoc.jar` - API documentation130- **Metadata**: `maven-metadata.xml` - Version and release information131132## Search API Parameters133134### Query Syntax135- **GroupId search**: `g:com.google.guava`136- **ArtifactId search**: `a:guava`137- **Version search**: `v:33.0.0`138- **Combined search**: `g:com.google.guava AND a:guava`139- **Text search**: `guava` (searches in groupId, artifactId, and description)140141### Response Format142- **JSON**: `wt=json` (default)143- **XML**: `wt=xml`144- **Java properties**: `wt=javabin`145146### Pagination147- **rows**: Number of results per page (default: 20, max: 200)148- **start**: Offset for pagination (default: 0)149150## Best Practices1511521. **Always verify coordinates**: Check that groupId, artifactId, and version exist before use1532. **Use latest stable versions**: Prefer RELEASE versions over SNAPSHOT versions1543. **Check version metadata**: Query `maven-metadata.xml` for latest version information1554. **Validate before download**: Verify artifact exists before providing download links1565. **Include checksums**: When available, provide SHA-1 and MD5 checksums for verification1576. **Format coordinates correctly**: Always use standard Maven format `groupId:artifactId:version`1587. **Provide context**: Include description, repository information, and last updated date when available159160## Common Tasks161162### Task 1: Search by Name163Use the Search API with text query to find components by name or keywords.164165**Example**:166```167GET https://search.maven.org/solrsearch/select?q=guava&rows=20&wt=json168```169170### Task 2: Search by Coordinates171Use the Search API with groupId and artifactId to find specific components.172173**Example**:174```175GET https://search.maven.org/solrsearch/select?q=g:com.google.guava+AND+a:guava&rows=20&wt=json176```177178### Task 3: Get Version Information179Query `maven-metadata.xml` to get all available versions and latest version.180181**Example**:182```183GET https://repo1.maven.org/maven2/com/google/guava/guava/maven-metadata.xml184```185186### Task 4: Download Artifact187Construct direct download URL for specific artifact.188189**Example**:190```191GET https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.jar192```193194### Task 5: Analyze Dependencies195Download and parse POM file to extract dependency information.196197**Example**:198```199GET https://repo1.maven.org/maven2/com/google/guava/guava/33.0.0/guava-33.0.0.pom200```201202## Keywords203204**English keywords:**205maven, maven central, maven repository, maven dependency, maven artifact, maven component, groupId, artifactId, version, coordinates, pom, jar, dependency, repository, search, retrieve, download, metadata, transitive dependencies, dependency tree, maven coordinates, maven search206207**Chinese keywords (中文关键词):**208Maven, Maven 中央仓库, Maven 仓库, Maven 依赖, Maven 组件, Maven 坐标, groupId, artifactId, version, 版本, 坐标, POM, JAR, 依赖, 仓库, 搜索, 检索, 下载, 元数据, 传递依赖, 依赖树, 查找依赖, 搜索组件, 获取版本, 下载依赖209210## Resources211212- **Maven Central Repository**: https://repo1.maven.org/maven2/213- **Maven Central Search**: https://search.maven.org/214- **Maven Central Search API Documentation**: https://central.sonatype.com/search-api/215- **Maven Coordinates Guide**: https://maven.apache.org/guides/mini/guide-naming-conventions.html216217## 能力边界218219### ✅ 适用场景220- 当你需要使用此技能对应的技术栈时221- 当项目需要遵循最佳实践时222- 当需要快速上手或深入理解核心概念时223224### ⚠️ 需要注意225- 复杂业务逻辑需要结合具体场景调整226- 性能优化需要根据实际数据量评估227228### ❌ 不适用场景229- 不相关的技术栈或框架230- 需要完全自定义的特殊场景231232## 常见陷阱 (Gotchas)2332341. **版本兼容性**:注意框架版本与依赖库的兼容性,不同版本 API 可能有差异2352. **配置文件格式**:配置文件格式错误是最常见的问题,建议使用编辑器的语法检查2363. **环境变量**:确保所有必要的环境变量已正确设置,敏感信息不要硬编码2374. **依赖冲突**:多版本共存时注意依赖冲突,使用 lock 文件锁定版本2385. **性能陷阱**:大数据量场景下注意性能优化,避免 N+1 查询等常见问题239240## 使用流程241242### Step 1: 环境准备243确保开发环境已安装必要的依赖和工具。244245### Step 2: 配置初始化246根据项目需求进行基础配置。247248### Step 3: 核心功能使用249按照示例代码实现核心功能。250251### Step 4: 测试验证252运行测试确保功能正常。253254### Step 5: 部署上线255完成开发后进行部署和监控。