You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Benson Margulies (Created) (JIRA)" <ji...@apache.org> on 2012/04/10 13:49:19 UTC

[jira] [Created] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

POM dependencies not all there yet for solr-test-framework
----------------------------------------------------------

                 Key: SOLR-3344
                 URL: https://issues.apache.org/jira/browse/SOLR-3344
             Project: Solr
          Issue Type: Bug
          Components: Build
    Affects Versions: 4.0
            Reporter: Benson Margulies


The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:

{noformat}
java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
{noformat}



--
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


[jira] [Commented] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250716#comment-13250716 ] 

Benson Margulies commented on SOLR-3344:
----------------------------------------

Here's how this plays out.

In my very own project, not in the lucene tree anywhere, I wrote a test class that uses the base class for distributed tests. So I put the test-framework in as a <scope>test</scope> dependency.

It compiles fine, but gets NoClassDefFound for Jetty when I run it. Why? Well, jetty is listed as an *optional* dependency of solr-core. So it is not transitive.

I think that it's reasonable for the test framework jar to list it as a required dependency, since tests in there depend on it. However, there is an alternative (other than nothing): list it again as an optional dependency in test-framework, just to give people a hint, and/or change the javadoc for the BaseDistributedTestCase to note this requirement. 


                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: 0001-Add-jetty-deps.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Commented] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250733#comment-13250733 ] 

Steven Rowe commented on SOLR-3344:
-----------------------------------

bq. I think that it's reasonable for the test framework jar to list it as a required dependency, since tests in there depend on it. However, there is an alternative (other than nothing): list it again as an optional dependency in test-framework, just to give people a hint, and/or change the javadoc for the BaseDistributedTestCase to note this requirement. 

I assume you're referring to {{BaseDistributed*Search*TestCase}}, which depends on solr-core's {{oas.client.solrj.embedded.JettySolrRunner}}?

I like the optional dependencies alternative better: add optional jetty dependencies to Solr test-framework, and change the javadoc for BaseDistributedSearchTestCase to note this requirement.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: 0001-Add-jetty-deps.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Commented] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Benson Margulies (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250757#comment-13250757 ] 

Benson Margulies commented on SOLR-3344:
----------------------------------------

Thank you very much.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: 0001-Add-jetty-deps.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Updated] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Rowe updated SOLR-3344:
------------------------------

    Attachment: SOLR-3344.patch

Patch, adding 3 required Jetty dependencies to the Solr test-framework POM template, and removing those dependencies from the dataimporthandler and clustering POM templates.

Tests all pass for me locally.

Committing shortly.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: 0001-Add-jetty-deps.patch, SOLR-3344.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Commented] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250649#comment-13250649 ] 

Steven Rowe commented on SOLR-3344:
-----------------------------------

Benson, where are you seeing these failures?  Why hasn't Jenkins unearthed them?

Why should Solr test-framework declare these dependencies at all?  That is, why can't modules with Jetty test dependencies simply declare the dependency there (with scope=test)?  This is already the case for the following Solr modules: solr-core, clustering, and dataimporthandler.

If it does turn out that Solr test-framework is the right place for these dependencies, it doesn't require Jetty to compile, so at a minimum, I would argue that the default compile scope you've used is inappropriate.  Maybe scope=runtime?

                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: 0001-Add-jetty-deps.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Commented] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13250753#comment-13250753 ] 

Steven Rowe commented on SOLR-3344:
-----------------------------------

bq. I like the optional dependencies alternative better: add optional jetty dependencies to Solr test-framework, and change the javadoc for BaseDistributedSearchTestCase to note this requirement.

Thinking about this more, the rationale I would ordinarily use to justify making a dependency optional involves minimizing *runtime* dependencies.  But the Solr test-framework is a test-only module, and requiring *test* dependencies that won't be used by all consumers should not cause any undue hardship.

So I've changed my mind.  I'll put up a superset of your patch, Benson, that removes the dataimporthandler and clustering POMs' jetty dependencies.  I'll leave solr-core's optional dependency as-is.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: 0001-Add-jetty-deps.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Resolved] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Rowe resolved SOLR-3344.
-------------------------------

    Resolution: Fixed

Committed compile->runtime scope changes in r1311957.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>            Assignee: Steven Rowe
>             Fix For: 4.0
>
>         Attachments: 0001-Add-jetty-deps.patch, SOLR-3344-runtime-scope.patch, SOLR-3344.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Reopened] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Rowe reopened SOLR-3344:
-------------------------------


bq. If it does turn out that Solr test-framework is the right place for these dependencies, it doesn't require Jetty to compile, so at a minimum, I would argue that the default compile scope you've used is inappropriate. Maybe scope=runtime?

I forgot to incorporate this change - reopening to change Solr test-framework's Jetty dependencies' scope from compile to runtime.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>            Assignee: Steven Rowe
>             Fix For: 4.0
>
>         Attachments: 0001-Add-jetty-deps.patch, SOLR-3344.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Updated] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Rowe updated SOLR-3344:
------------------------------

    Attachment: SOLR-3344-runtime-scope.patch

Patch switching Solr test-framework's Jetty dependencies' scope from compile to runtime.  All Solr tests pass.  Committing shortly.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>            Assignee: Steven Rowe
>             Fix For: 4.0
>
>         Attachments: 0001-Add-jetty-deps.patch, SOLR-3344-runtime-scope.patch, SOLR-3344.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Resolved] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Steven Rowe (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Steven Rowe resolved SOLR-3344.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
         Assignee: Steven Rowe

Committed to trunk: r1311905.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>            Assignee: Steven Rowe
>             Fix For: 4.0
>
>         Attachments: 0001-Add-jetty-deps.patch, SOLR-3344.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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


[jira] [Updated] (SOLR-3344) POM dependencies not all there yet for solr-test-framework

Posted by "Benson Margulies (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies updated SOLR-3344:
-----------------------------------

    Attachment: 0001-Add-jetty-deps.patch

Here's the fix.
                
> POM dependencies not all there yet for solr-test-framework
> ----------------------------------------------------------
>
>                 Key: SOLR-3344
>                 URL: https://issues.apache.org/jira/browse/SOLR-3344
>             Project: Solr
>          Issue Type: Bug
>          Components: Build
>    Affects Versions: 4.0
>            Reporter: Benson Margulies
>         Attachments: 0001-Add-jetty-deps.patch
>
>
> The pom for solr-test-framework does not mention jetty, so a test case that doesn't get jetty into it's classpath otherwise fails with:
> {noformat}
> java.lang.NoClassDefFoundError: org/eclipse/jetty/server/SessionIdManager
> {noformat}

--
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