[ 
https://issues.apache.org/jira/browse/MINDEXER-81?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15949969#comment-15949969
 ] 

Laird Nelson commented on MINDEXER-81:
--------------------------------------

I have a concrete use case that I'll elaborate here.  I am a new user of Lucene 
(no idea what I'm doing :-)) and of the Maven Indexer.  Hopefully my 
explanation below will give you insight into how a person new to this project 
approaches it.

I'd like to write an {{IndexCreator}} that, in the abstract, adds fields to the 
index that represent certain contents of {{META-INF/MANIFEST.MF}} files.  I'd 
like to let users search, for example, for artifacts containing 
{{META-INF/MANIFEST.MF}} files with {{Fred}} in their {{Class-Path}} headers.

I see no way to simply write an {{IndexCreator}} (and no other code) to do 
this.  It seems that I would (with the current architecture) have to edit 
{{ArtifactInfo}} to have some new instance variables to store this information.

It also looks like other {{IndexCreator}} implementations that work with 
{{META-INF/MANIFEST.MF}} files, like the {{OsgiArtifactIndexCreator}}, do 
exactly this: I note that {{ArtifactInfo}}, though it would seem to _want_ to 
be a generic sort of class, has fields in it like 
[{{bundleSymbolicName}}|https://github.com/apache/maven-indexer/blob/master/indexer-core/src/main/java/org/apache/maven/index/ArtifactInfo.java#L236],
 suggesting that for every indexer an edit to {{ArtifactInfo}}'s source code is 
necessary.  This shouldn't be the case.

> Make ArtifactInfo extensible
> ----------------------------
>
>                 Key: MINDEXER-81
>                 URL: https://issues.apache.org/jira/browse/MINDEXER-81
>             Project: Maven Indexer
>          Issue Type: Improvement
>            Reporter: Cservenak, Tamas
>             Fix For: 6.0
>
>
> Make ArtifactInfo extensible, a followup of MINDEXER-32



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to