slachiewicz opened a new issue, #798:
URL: https://github.com/apache/maven-indexer/issues/798

   `MavenPluginArtifactInfoIndexCreator` reads `META-INF/maven/plugin.xml` into 
a plexus-utils `Xpp3Dom` to index the goal prefix and the goal names 
(`px`/`gx`). It builds the reader with `new InputStreamReader(is)`, so the XML 
is decoded in the platform default charset rather than the encoding the 
document declares.
   
   Two ways to replace it:
   
   1. **JDK parser** (`javax.xml.parsers` or StAX). Works on the current Java 
11 baseline with no new dependency; only `goalPrefix` and `mojos/mojo/goal` are 
read, and the parser honours the declared encoding.
   2. **Maven 4 reader**: 
`org.apache.maven.plugin.descriptor.io.PluginDescriptorStaxReader` from 
`org.apache.maven:maven-support`, producing 
`org.apache.maven.api.plugin.descriptor.PluginDescriptor` from 
`maven-api-plugin`. This needs Java 17 (the classes are compiled for 17, 
indexer-core targets 11) and a Maven 4 GA release (the latest is 4.0.0-rc-7).
   
   Option 1 can land now; option 2 fits once the Java 17 baseline is in (branch 
`java-17-baseline`). This is one of three plexus-utils uses in indexer-core, 
with the POM reader (issue to follow) and `IndexCreatorSorter`'s `DAG`.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to