search-m2

Search local Maven repository JAR files for Java classes and resolve dependency coordinates.

2.6k|2.2k|Updated Dec 6, 2011
One-click install
npx skills add https://github.com/Azure/azure-sdk-for-java --skill search-m2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: search-m2
Source: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/ai/.workflow_docs/search-m2
Command: npx skills add https://github.com/Azure/azure-sdk-for-java --skill search-m2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps developers quickly locate Java classes within their local Maven repository (~/.m2/repository), making it easier to identify which JAR file contains a specific class or to inspect the contents of those JARs.

Core Features & Use Cases

  • Class Location: Pinpoint the exact JAR file that contains a given Java class.
  • JAR Inspection: View the list of classes within a JAR or inspect the details of a specific class.
  • Dependency Resolution: Leverages pom.xml files in the current directory to accurately resolve dependency coordinates (groupId, artifactId, version).
  • Use Case: When you encounter a ClassNotFoundException or want to understand the origin of a class used in your project, this skill helps you find it in your local Maven cache.

Quick Start

Use the search-m2 skill to find the JAR file containing the class com.example.MyClass within your local Maven repository.

Frequently Asked Questions about search-m2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find which JAR file contains a specific Java class in my local Maven repository?

To find a Java class in your local Maven repository, this skill searches the `~/.m2/repository` directory by analyzing your `pom.xml` dependency coordinates to pinpoint the exact JAR file containing the class.

Why am I getting a ClassNotFoundException and how can I inspect my Maven dependencies?

A ClassNotFoundException often means a missing dependency; this skill resolves it by analyzing your `pom.xml` to inspect JAR contents in the local Maven cache and locate the missing Java class.

Can I list all Java classes contained within a specific JAR from my Maven cache?

Yes, you can list Java classes within a specific JAR by using this skill to inspect the contents of JAR files stored in your local `~/.m2/repository` directory.

Does finding a class in the local Maven repository require resolving dependencies from pom.xml?

Yes, resolving dependencies from `pom.xml` is required because this skill analyzes the file in your current directory to accurately locate the dependency coordinates needed to find the Java class.

What is the best way to locate the origin of a class used in a Maven Java project?

The best way to locate the origin of a class in a Maven project is to search the local `~/.m2/repository` cache, leveraging `pom.xml` files to resolve dependency coordinates and identify the source JAR.