Solr
  1. Solr
  2. SOLR-4649

The Solr .war should not include (test-scope-only) cglib-nodep and objenesis jars

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.3
    • Component/s: Build
    • Labels:
      None

      Description

      I discovered in looking at differences between the .war's produced by the Maven and Ant builds (over on SOLR-3706) that the Ant-built .war contains cglib-nodep-*.jar and objenesis-*.jar under WEB-INF/lib/.

      mvn dependency:tree says that easymock-*.jar depends on these two jars. In the Maven build, the solr core module depends on easymock-*.jar with test scope; as a result, none of these three jars are included in the Maven-built .war, since test scope deps are automatically excluded from the .war.

      easymock-*.jar is not included in the Ant-built .war because solr/webapp/build.xml explicitly excludes it. These other two jars should get the same treatment.

      Here's a patch to remove these two jars from the .war:

      Index: solr/webapp/build.xml
      ===================================================================
      --- solr/webapp/build.xml	(revision 1461743)
      +++ solr/webapp/build.xml	(working copy)
      @@ -50,6 +50,8 @@
             <lib dir="${common-solr.dir}/core/lib" excludes="${exclude.from.war},${common.classpath.excludes}">
               <exclude name="*servlet-api*.jar" />
               <exclude name="easymock-*.jar" />
      +        <exclude name="cglib-nodep-*.jar" />
      +        <exclude name="objenesis-*.jar" />
             </lib>
             <lib dir="${common-solr.dir}/solrj/lib" excludes="${exclude.from.war},${common.classpath.excludes}"/>
             <lib dir="${lucene-libs}" excludes="${exclude.from.war},${common.classpath.excludes}" />
      

        Activity

        Hide
        Mark Miller added a comment -

        Nice catch Steve!

        Show
        Mark Miller added a comment - Nice catch Steve!
        Hide
        Steve Rowe added a comment -

        Committed to trunk and branch_4x.

        Show
        Steve Rowe added a comment - Committed to trunk and branch_4x.
        Hide
        Uwe Schindler added a comment -

        Closed after release.

        Show
        Uwe Schindler added a comment - Closed after release.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development