lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-3204) solr-commons-csv must not use the org.apache.commons.csv package
Date Tue, 06 Mar 2012 15:39:57 GMT

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

Sebb commented on SOLR-3204:
----------------------------

This is a classpath issue - a class can be loaded only once in a given classpath.
It's vitally important to ensure that each class has only a single definition in a classpath,
otherwise all sorts of failures can occur. These failures can be extremely difficult to debug.

Maven uses the groupId/artifactId to resolve multiple references to the same jar.
It picks one copy of the most recent version. 

This only works properly if the Maven ids are unique for each package.
It does not read the package names within the jar; it assumes that the POM is correct for
the associated jar.

In this case, the Solr pom uses its own unique groupId/artifactId, but the package names used
within the jar (and indeed the pom inside the jar) are for an entirely different package.
This is totally contrary to the way Maven is supposed to be used.

The consequence is that Maven does not know that the renamed "solr" commons-csv jar uses the
same package as the "real" commons-csv, so it cannot prevent duplicate classes on the classpath.
                
> solr-commons-csv must not use the org.apache.commons.csv package
> ----------------------------------------------------------------
>
>                 Key: SOLR-3204
>                 URL: https://issues.apache.org/jira/browse/SOLR-3204
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 3.5
>            Reporter: Emmanuel Bourg
>            Priority: Blocker
>             Fix For: 3.6
>
>         Attachments: solr-csv.patch
>
>
> The solr-commons-csv artifact reused the code from the Apache Commons CSV project but
the package wasn't changed to something else than org.apache.commons.csv in the process. This
creates a compatibility issue as the Apache Commons team works toward an official release
of Commons CSV. It prevents Commons CSV from using its own org.apache.commons.csv package,
or forces the renaming of all the classes to avoid a classpath conflict.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message