Solr
  1. Solr
  2. SOLR-2835

Compilation problem with maven - package org.apache.solr.core does not exist

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 4.0-ALPHA
    • Fix Version/s: None
    • Component/s: Build
    • Labels:

      Description

      maven compilation fails.

      Steps to reproduce are;

      • svn update
      • ant get-maven-poms
      • mvn -N -Pbootstrap install
      • mvn -DskipTests install

      Build works until solrj test compilation Here's the start of the errors.

      [INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ solr-solrj ---
      [INFO] Compiling 157 source files to /users/ukyo/lucene-solr/solr/build/solr-solrj/classes/test
      [INFO] -------------------------------------------------------------
      [ERROR] COMPILATION ERROR : 
      [INFO] -------------------------------------------------------------
      [ERROR] /users/ukyo/lucene-solr/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/MergeIndexesEmbeddedTest.java:[24,27] package org.apache.solr.core does not exist
      [ERROR] /users/ukyo/lucene-solr/solr/solrj/src/test/org/apache/solr/client/solrj/MergeIndexesExampleTestBase.java:[28,27] package org.apache.solr.core does not exist
      [ERROR] /users/ukyo/lucene-solr/solr/solrj/src/test/org/apache/solr/client/solrj/MergeIndexesExampleTestBase.java:[29,27] package org.apache.solr.core does not exist
      [ERROR] /users/ukyo/lucene-solr/solr/solrj/src/test/org/apache/solr/client/solrj/MergeIndexesExampleTestBase.java:[30,27] package org.apache.solr.util does not exist
      [ERROR] /users/ukyo/lucene-solr/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java:[21,27] package org.apache.solr.util does not exist
      [ERROR] /users/ukyo/lucene-solr/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java:[31,50] cannot find symbol
      

      All following errors are the same package not found.

        Activity

        Hide
        Steve Rowe added a comment -

        Hi Ukyo,

        I don't see the problems you report when I build trunk under Maven v2.2.1. What version of Maven are you using? Are you running mvn test in the solr/ directory?

        FYI, under maven, the solrj test sources don't get compiled or run as part of the solrj module. Instead, they are compiled and run with the solr core module, because Maven's dependency system can't directly handle the unusual dependencies between solrj, solr core, and the solr test framework. (solr core has a non-test dependency on solrj; solr test framework has a non-test dependency on solr core; and both solr core and solrj have a test dependency on the solr test framework.)

        Another FYI: the maven build is run nightly under Jenkins - see http://wiki.apache.org/solr/NightlyBuilds.

        In the future, this kind of issue is best discussed on the solr-user mailing list before making a JIRA issue.

        Show
        Steve Rowe added a comment - Hi Ukyo, I don't see the problems you report when I build trunk under Maven v2.2.1. What version of Maven are you using? Are you running mvn test in the solr/ directory? FYI, under maven, the solrj test sources don't get compiled or run as part of the solrj module. Instead, they are compiled and run with the solr core module, because Maven's dependency system can't directly handle the unusual dependencies between solrj, solr core, and the solr test framework. (solr core has a non-test dependency on solrj; solr test framework has a non-test dependency on solr core; and both solr core and solrj have a test dependency on the solr test framework.) Another FYI: the maven build is run nightly under Jenkins - see http://wiki.apache.org/solr/NightlyBuilds . In the future, this kind of issue is best discussed on the solr-user mailing list before making a JIRA issue.
        Hide
        Ukyo Virgden added a comment -

        Agreed.

        Show
        Ukyo Virgden added a comment - Agreed.

          People

          • Assignee:
            Steve Rowe
            Reporter:
            Ukyo Virgden
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development