Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] maven indexer - reading data from indexing context

Depending on what information you need, it may be easier to walk local
repository in your code. If you decide to use maven indexer, keep in
mind that we plan to remove it from m2e core some time in the future.
This won't happen in m2e 1.6 this year, but it will happen eventually ;-)

Also, please use m2e-dev mailing list for questions about developing m2e
and m2e extensions. Lets keep m2e-users for m2e usages discussions.


On 2015-03-24 6:15, e92-330cd@xxxxxxxxx wrote:

I have indexed local maven I need to retrieve all
informations regarding every artefacts...

do I understand it correct that I should use search query...and I will
get all gathered information from the indexingContext??

those were my indexers:

      List<IndexCreator> indexers = new ArrayList<>();
         indexers.add(plexusContainer.lookup(IndexCreator.class, "min"));
         indexers.add( plexusContainer.lookup( IndexCreator.class,
"maven-archetype" ) );
         indexers.add( plexusContainer.lookup( IndexCreator.class,
"osgi-metadatas" ) );

so now I need to create search querry?

public Map<String, Collection<ArtifactInfo>> getResultsMap( String
query )
             throws IOException, ParseException
         Map<String, Collection<ArtifactInfo>> resultsMap = new
         final Set<ArtifactInfo> artifactInfoResults =
repositoryIndexManager.getRepositoryIndex( repositoryId )
                                                                             .search( query );

         if ( !artifactInfoResults.isEmpty() )
             resultsMap.put( repositoryId, artifactInfoResults );

         return resultsMap;


m2e-users mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top