You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tamás Cservenák (Jira)" <ji...@apache.org> on 2022/07/19 15:34:00 UTC

[jira] [Commented] (MINDEXER-107) Shaded-lucene indexer-core should have its own POM

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

Tamás Cservenák commented on MINDEXER-107:
------------------------------------------

Am unsure about the "worthiness" of this shaded JAR to be frank. In my experience, shading to make it "fit" into some project is better done on project side, as it is not only Lucene that may clash (that IS shaded), but also slf4j or whatever else. For that reason, I'd actually drop this shading altogether, and I think this should be done by projects consuming indexer AND having issues with clashing things on classpath instead.

> Shaded-lucene indexer-core should have its own POM
> --------------------------------------------------
>
>                 Key: MINDEXER-107
>                 URL: https://issues.apache.org/jira/browse/MINDEXER-107
>             Project: Maven Indexer
>          Issue Type: Improvement
>    Affects Versions: 6.0.0
>            Reporter: Andreas Sewe
>            Priority: Minor
>             Fix For: 7.0.0
>
>
> While I like the idea that {{indexer-core}} is also available with a {{shaded-lucene}} classifier (given the likelihood of clashes with another, incompatible Lucene already on the classpath), the current, classifier-based implementation is not ideal:
> The {{shaded-lucene}} JAR shares its POM with the primary {{indexer-core}} JAR, i.e., there is no *dependency-reduced* POM available for easy consumption by clients. Thus, every user of the {{shaded-lucene}} JAR needs a lengthy {{<exclusions>}} list – which needs to be kept in-sync with {{lucene-core}}’s {{maven-shade-plugin}} configuration:
> {noformat}
>         <dependency>
>             <groupId>org.apache.maven.indexer</groupId>
>             <artifactId>indexer-core</artifactId>
>             <classifier>shaded-lucene</classifier>
>             <version>6.0-SNAPSHOT</version>
>             <exclusions>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-core</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-queryparser</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-queries</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-sandbox</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-analyzers-common</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-backward-codecs</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-highlighter</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-join</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.lucene</groupId>
>                     <artifactId>lucene-memory</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.apache.commons</groupId>
>                     <artifactId>commons-compress</artifactId>
>                 </exclusion>
>                 <exclusion>
>                     <groupId>org.bouncycastle</groupId>
>                     <artifactId>bcprov-jdk16</artifactId>
>                 </exclusion>
>             </exclusions>
>         </dependency>
> {noformat}
> IMHO, it would be better to have a separate {{indexer-core-standalone}} project whose dependency-reduced POM is deployed and thus available for easy consumption by clients



--
This message was sent by Atlassian Jira
(v8.20.10#820010)