Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5946245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:47:44+00:00 2026-05-22T16:47:44+00:00

Maven eclipse plugin can search available dependencies from the default repositories and any additional

  • 0

Maven eclipse plugin can search available dependencies from the default repositories and any additional repositories configured, given that I know the partial group Id or partial artifact Id. This is really useful in finding the available dependencies. Is there a similar mechanism available using maven in command line.

Example: suppose I know only “mybatis”, and I intend to find the proper group id, artifact id, and version and whether type jar is available or not. I can easily do this using eclipse search dependency. But without eclipse do I really need to use the browser and go to repo2.maven.org (and now I find that directory browsing of this has been disabled).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:47:45+00:00Added an answer on May 22, 2026 at 4:47 pm

    First, you can search the sonatype repository, which covers a lot of ground. (I’m not sure how many other repo’s are mirrored though this. I guess that’s a separate question.)

    Second, nexus itself has an API that you can use to script queries against the repository. For example, you can use Ruby or Groovy and do something like (assuming groovy is installed; I’m on linux):

    $ cat foo.groovy
    #!/usr/bin/env groovy
    
    def xml = args.length < 2 ? 
                "http://repository.sonatype.org/service/local/data_index?q=" + args[0] : 
                "http://repository.sonatype.org/service/local/data_index?g=${args[0]}&a=${args[1]}&v=${args[2]}"
    
    println "Searching: " + xml
    
    def root = new XmlParser().parseText( xml.toURL().text )
    root.data.artifact.each {
      println "${it.groupId.text()}:${it.artifactId.text()}:${it.version.text()}"
    }
    

    Then,

    $ ./foo.groovy  org.mybatis mybatis  3.0.4
    Searching: http://repository.sonatype.org/service/local/data_index?g=org.mybatis&a=mybatis&v=3.0.4
    org.mybatis:mybatis:3.0.4
    org.mybatis:mybatis:3.0.4
    org.mybatis:mybatis:3.0.4
    

    Or, closer your question (output truncated),

    $ ./foo.groovy  mybatis
    Searching: http://repository.sonatype.org/service/local/data_index?q=mybatis
    org.mybatis:mybatis:3.0.1
    org.mybatis:mybatis:3.0.1
    ...
    org.mybatis.caches:mybatis-caches-parent:1.0.0-RC1
    org.mybatis.caches:mybatis-ehcache:1.0.0-RC1
    org.mybatis.caches:mybatis-ehcache:1.0.0-RC1
    ...
    org.apache.camel:camel-mybatis:2.7.0
    org.apache.servicemix.bundles:org.apache.servicemix.bundles.mybatis:3.0.2_1
    

    Note that this assumes you’re querying an existing nexus maven repo, and in addition this is just searching that single repo. (So it’s not exactly what you asked.)

    But, actually, this is the way I want it to be: my only repository used by my maven projects is a single, internal (intranet) nexus server, and it functions as a mirror (and cache) of all the 3rd party repositories that I currently need. If I decide I need to pull in other jars from another repo (e.g., googlecode or company XYZ…), then I add that repo’s url to my internal nexus configuration. Everyone on my team — netbeans/eclipse/mvn users — always point to the single internal maven repo, & everyone automatically picks up the newly available artifacts.

    Then you can still use the above script to search for an artifact. (Note: it lets you do a generic search, or a GAV (group/artifact/version) search.)

    If you’re not sure which repository a given artifact is in, I guess there’s always http://mvnrepository.com/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any where i can download the maven eclipse plugin so that i
I use the m2eclipse plugin in Eclipse so that I can import a Maven
I'm attempting to define an eclipse plugin product that includes bundles from Spring's Enterprise
I have successfully installed & configured the M2E Maven plugin for Eclipse, along with
I've looked and I can't seem to find a standalone maven plugin that one
With the maven-eclipse-plugin, using mvn eclipse:eclipse , you can specifiy eclipse project natures and
With the maven eclipse plugin, I can configure checkstyle or sonar configurations by adding
I'm having maven project on Eclipse with m2eclipse plugin. This project has some dependencies.
I have a Maven project (in Eclipse using the m2eclipse plugin) that contains code
From the command line, the maven-gae-plugin can be run by calling: mvn gae:run I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.