Lance Norskog commented on Improvement SOLR-3664

Here is another way: repacking dependent jars into all contrib dist/ jars. I've done an experiment with analysis-extras, and it takes 4 seconds to repack the classes from the dependent jars into apache-solr-analysis-extras-5.0-SNAPSHOT.jar.

Add this to solr/contrib/analysis-extras/build.xml:

<target name="addjars">
    <zip destfile="../../dist/apache-solr-analysis-extras-4.0-SNAPSHOT.jar" update="true">
	<zipfileset src="" class="code-quote">"../../build/contrib/solr-analysis-extras/lucene-libs/lucene-analyzers-icu-4.0-SNAPSHOT.jar" excludes="META-INF/MANIFEST.MF" />
	<zipfileset src="" class="code-quote">"../../build/contrib/solr-analysis-extras/lucene-libs/lucene-analyzers-morfologik-4.0-SNAPSHOT.jar" excludes="META-INF/MANIFEST.MF" />
	<zipfileset src="" class="code-quote">"../../build/contrib/solr-analysis-extras/lucene-libs/lucene-analyzers-smartcn-4.0-SNAPSHOT.jar" excludes="META-INF/MANIFEST.MF" />
	<zipfileset src="" class="code-quote">"../../build/contrib/solr-analysis-extras/lucene-libs/lucene-analyzers-stempel-4.0-SNAPSHOT.jar" excludes="META-INF/MANIFEST.MF" />

	<zipfileset src="" class="code-quote">"lib/icu4j-49.1.jar" excludes="META-INF/MANIFEST.MF" />
	<zipfileset src="" class="code-quote">"lib/morfologik-fsa-1.5.3.jar" excludes="META-INF/MANIFEST.MF" />
	<zipfileset src="" class="code-quote">"lib/morfologik-polish-1.5.3.jar" excludes="META-INF/MANIFEST.MF" />
	<zipfileset src="" class="code-quote">"lib/morfologik-stemming-1.5.3.jar" excludes="META-INF/MANIFEST.MF" />
    </zip>
</target>

Run 'ant dist addjars'. The dist jar goes from 20k to 15M. But, it's 15M in one deployable file. I don't know what to do about META-INF files in the absorbed libraries. This approach just preserves the manifest file.

This approach needs a little rearranging of the order of the build steps. There is no place visible to the contrib build.xml where the solr/build dist jar is finished, but not yet copied to dist/.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

Reply via email to