Package reposearch

Class MavenArtifactSearch


  • public class MavenArtifactSearch
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.maven.index.context.IndexingContext createIndexingContext​(org.codehaus.plexus.PlexusContainer plexus, java.io.File cachedir, java.io.File indexdir, java.lang.String id, java.lang.String repoid, java.lang.String repourl)  
      static org.codehaus.plexus.PlexusContainer createPlexus()  
      static void main​(java.lang.String[] args)
      Initialize maven and aether repository system.
      static void searchAndDump​(org.apache.maven.index.NexusIndexer indexer, java.lang.String descr, org.apache.lucene.search.Query q)  
      static void searchGroupedAndDump​(org.apache.maven.index.NexusIndexer indexer, java.lang.String descr, org.apache.lucene.search.Query q, org.apache.maven.index.Grouping g)  
      static void updateIndex​(org.codehaus.plexus.PlexusContainer plexus, org.apache.maven.index.context.IndexingContext context)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MavenArtifactSearch

        public MavenArtifactSearch()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Initialize maven and aether repository system. From: https://github.com/cstamas/maven-indexer-examples/blob/master/indexer-example-01/src/main/java/org/apache/maven/indexer/example/App.java
        Throws:
        java.lang.Exception
      • searchAndDump

        public static void searchAndDump​(org.apache.maven.index.NexusIndexer indexer,
                                         java.lang.String descr,
                                         org.apache.lucene.search.Query q)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • searchGroupedAndDump

        public static void searchGroupedAndDump​(org.apache.maven.index.NexusIndexer indexer,
                                                java.lang.String descr,
                                                org.apache.lucene.search.Query q,
                                                org.apache.maven.index.Grouping g)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • createPlexus

        public static org.codehaus.plexus.PlexusContainer createPlexus()
      • createIndexingContext

        public static org.apache.maven.index.context.IndexingContext createIndexingContext​(org.codehaus.plexus.PlexusContainer plexus,
                                                                                           java.io.File cachedir,
                                                                                           java.io.File indexdir,
                                                                                           java.lang.String id,
                                                                                           java.lang.String repoid,
                                                                                           java.lang.String repourl)
      • updateIndex

        public static void updateIndex​(org.codehaus.plexus.PlexusContainer plexus,
                                       org.apache.maven.index.context.IndexingContext context)