jira-importer commented on issue #539:
URL: https://github.com/apache/maven-indexer/issues/539#issuecomment-2965149841

   **[Laird 
Nelson](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=ljnelson)** 
commented
   
   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.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to