From: <tho...@us...> - 2011-05-24 17:17:56
|
Revision: 4547 http://bigdata.svn.sourceforge.net/bigdata/?rev=4547&view=rev Author: thompsonbry Date: 2011-05-24 17:17:49 +0000 (Tue, 24 May 2011) Log Message: ----------- Resolution for [1]. Note: This change set changes the URL for the REST API from: http://hostname:port/ to http://hostname:port/sparql This commit also includes an updated version of autojar (v2.1) and an alternative way to slim down fastutils. [1] https://sourceforge.net/apps/trac/bigdata/ticket/303 (Default page for NanoSparqlServer) Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/resources/logging/log4j.properties branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm/build.xml branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm3/build.xml branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/build.xml branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/src/resources/config/config.kb.sparql branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/RESTServlet.java branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/WebAppUnassembled.java branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/TestNanoSparqlServer.java branches/QUADS_QUERY_BRANCH/bigdata-war/src/resources/WEB-INF/web.xml branches/QUADS_QUERY_BRANCH/build.xml branches/QUADS_QUERY_BRANCH/src/build/autojar/autojar.jar Added Paths: ----------- branches/QUADS_QUERY_BRANCH/bigdata-war/src/html/index.html Removed Paths: ------------- branches/QUADS_QUERY_BRANCH/bigdata-war/WEB-INF/web.xml Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/resources/logging/log4j.properties =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/resources/logging/log4j.properties 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/resources/logging/log4j.properties 2011-05-24 17:17:49 UTC (rev 4547) @@ -198,7 +198,7 @@ log4j.logger.com.bigdata.util.httpd.NanoHTTPD=DEBUG log4j.logger.com.bigdata.util.httpd.AbstractHTTPD=DEBUG -log4j.logger.com.bigdata.rdf.sail.bench.NanoSparqlServer=ALL +log4j.logger.com.bigdata.rdf.sail.webapp.NanoSparqlServer=ALL # Lehigh benchmark integration log4j.logger.edu.lehigh.swat.bench.ubt.bigdata=INFO Modified: branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm/build.xml =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm/build.xml 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm/build.xml 2011-05-24 17:17:49 UTC (rev 4547) @@ -196,7 +196,7 @@ <arg value="${bsbm.resultsDir}/benchmark_result_pc${bsbm.pc}_runs${bsbm.runs}_mt${bsbm.mt}.xml" /> <!-- The SPARQL endpoint. --> - <arg value="http://localhost:${bsbm.nanoServerPort}/" /> + <arg value="http://localhost:${bsbm.nanoServerPort}/sparql/" /> <classpath> <path refid="runtime.classpath" /> Modified: branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm3/build.xml =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm3/build.xml 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-perf/bsbm3/build.xml 2011-05-24 17:17:49 UTC (rev 4547) @@ -165,7 +165,7 @@ <target name="run-sparql-query" depends="prepare" description="Run a single query read from a file.."> <java classname="com.bigdata.rdf.sail.webapp.NanoSparqlClient" fork="true" failonerror="true"> - <arg line="-f query5-instance01-keyRangeVersion.sparql http://localhost:${bsbm.nanoServerPort}/" /> + <arg line="-f query5-instance01-keyRangeVersion.sparql http://localhost:${bsbm.nanoServerPort}/sparql/" /> <classpath> <path refid="runtime.classpath" /> </classpath> Modified: branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/build.xml =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/build.xml 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/build.xml 2011-05-24 17:17:49 UTC (rev 4547) @@ -87,7 +87,7 @@ <target name="run-load" depends="compile"> <!-- delete file if it exists so we load into a new journal. --> <delete verbose="true" file="${lubm.journalFile}" /> - <java classname="com.bigdata.rdf.store.DataLoader" fork="true" failonerror="true" dir="${build.dir}/bin"> + <java classname="com.bigdata.rdf.store.DataLoader" fork="true" failonerror="true" ><!--dir="${build.dir}/bin"--> <arg line="-closure -namespace ${lubm.namespace} ${lubm.journalPropertyFile} ${lubm.ontologyFile} ${lubm.dataDir}" /> <!-- specify/override the journal file name. --> <jvmarg line="${queryJvmArgs} -Dcom.bigdata.journal.AbstractJournal.file=${lubm.journalFile} @@ -104,7 +104,7 @@ <echo message="journalFile=${lubm.journalFile}"/> <echo message="namespace=${lubm.namespace}"/> <echo message="port=${lubm.nanoServerPort}"/> - <java classname="com.bigdata.rdf.sail.webapp.NanoSparqlServer" fork="true" failonerror="true" dir="${build.dir}/bin"> + <java classname="com.bigdata.rdf.sail.webapp.NanoSparqlServer" fork="true" failonerror="true"><!-- dir="${build.dir}/bin"--> <arg line="${lubm.nanoServerPort} ${lubm.namespace} ${lubm.journalPropertyFile}" /> <!-- specify/override the journal file name. --> <jvmarg line="${queryJvmArgs} -Dcom.bigdata.journal.AbstractJournal.file=${lubm.journalFile}" /> @@ -115,7 +115,7 @@ </target> <target name="run-query" depends="compile" description="Runs the benchmark queries against the loaded data."> - <java classname="edu.lehigh.swat.bench.ubt.Test" fork="true" failonerror="true" dir="${build.dir}/bin"> + <java classname="edu.lehigh.swat.bench.ubt.Test" fork="true" failonerror="true" ><!--dir="${build.dir}/bin"--> <jvmarg value="-Dlubm.warmUp=false" /> <jvmarg value="-Dlubm.queryTime=10" /> <jvmarg value="-Dlubm.queryParallel=1" /> @@ -129,25 +129,4 @@ </java> </target> - <target name="set-properties" depends="compile" description="Set or change properties for a kb instance. The new values are read from stdin."> - <java classname="com.bigdata.rdf.sail.BigdataSailHelper" fork="true" failonerror="true"> - <!-- -Note: You can't change the writeRetentionQueue capacity here. It is propagated to the IndexMetadata records -for the BTree instances and needs to be updated in place for each index. - -inputstring="com.bigdata.btree.writeRetentionQueue.capacity=8000" - -inputstring="com.bigdata.rdf.sail.starJoins=false" - -inputstring="com.bigdata.rdf.sail.starJoins=true\ncom.bigdata.relation.rule.eval.ProgramTask.maxParallelSubqueries=10" ---> - <!-- dir="${build.dir}/bin" --> - <arg line="${lubm.journalFile} LTS kb" /> - <jvmarg value="-Dlog4j.configuration=log4j.properties" /> - <classpath> - <path refid="runtime.classpath" /> - </classpath> - </java> - </target> - </project> Modified: branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/src/resources/config/config.kb.sparql =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/src/resources/config/config.kb.sparql 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-perf/lubm/src/resources/config/config.kb.sparql 2011-05-24 17:17:49 UTC (rev 4547) @@ -9,6 +9,6 @@ ontology=ignored data=ignored # Use the default namespace specified to NanoSparqlServer -database=http://localhost:80/ +database=http://localhost:81/sparql/ # Use a specific namespace regardless of the default specified to NanoSparqlServer -#database=http://localhost:80/namespace/LUBM_U50/ +#database=http://localhost:80/sparql/namespace/LUBM_U50/ Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/NanoSparqlServer.java 2011-05-24 17:17:49 UTC (rev 4547) @@ -23,11 +23,14 @@ */ package com.bigdata.rdf.sail.webapp; -import java.io.File; import java.util.LinkedHashMap; import java.util.Map; +import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.handler.DefaultHandler; +import org.eclipse.jetty.server.handler.HandlerList; +import org.eclipse.jetty.server.handler.ResourceHandler; import org.eclipse.jetty.servlet.ServletContextHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.openrdf.rio.RDFParser; @@ -212,31 +215,32 @@ */ namespace = args[i++]; - /* - * Property file. - */ + // Note: This is checked by the ServletContextListener. +// /* +// * Property file. +// */ final String propertyFile = args[i++]; - final File file = new File(propertyFile); - if (!file.exists()) { - throw new RuntimeException("Could not find file: " + file); - } - boolean isJini = false; - if (propertyFile.endsWith(".config")) { - // scale-out. - isJini = true; - } else if (propertyFile.endsWith(".properties")) { - // local journal. - isJini = false; - } else { - /* - * Note: This is a hack, but we are recognizing the jini - * configuration file with a .config extension and the journal - * properties file with a .properties extension. - */ - usage(1/* status */, - "File should have '.config' or '.properties' extension: " - + file); - } +// final File file = new File(propertyFile); +// if (!file.exists()) { +// throw new RuntimeException("Could not find file: " + file); +// } +// boolean isJini = false; +// if (propertyFile.endsWith(".config")) { +// // scale-out. +// isJini = true; +// } else if (propertyFile.endsWith(".properties")) { +// // local journal. +// isJini = false; +// } else { +// /* +// * Note: This is a hack, but we are recognizing the jini +// * configuration file with a .config extension and the journal +// * properties file with a .properties extension. +// */ +// usage(1/* status */, +// "File should have '.config' or '.properties' extension: " +// + file); +// } /* * Setup the ServletContext properties. @@ -290,14 +294,22 @@ static public Server newInstance(final int port, final IIndexManager indexManager, final Map<String, String> initParams) { - final ServletContextHandler context = getContext(initParams); + final ServletContextHandler context = getContextHandler(initParams); // Force the use of the caller's IIndexManager. context.setAttribute(IIndexManager.class.getName(), indexManager); + final HandlerList handlers = new HandlerList(); + + handlers.setHandlers(new Handler[] { + context,// + getResourceHandler(initParams),// +// new DefaultHandler()// + }); + final Server server = new Server(port); - server.setHandler(context); + server.setHandler(handlers); return server; @@ -322,11 +334,19 @@ static public Server newInstance(final int port, final String propertyFile, final Map<String, String> initParams) { - final ServletContextHandler context = getContext(initParams); + final ServletContextHandler context = getContextHandler(initParams); + final HandlerList handlers = new HandlerList(); + + handlers.setHandlers(new Handler[] { + context,// + getResourceHandler(initParams),// +// new DefaultHandler()// + }); + final Server server = new Server(port); - server.setHandler(context); + server.setHandler(handlers); return server; @@ -338,7 +358,7 @@ * @param initParams * The init parameters, per the web.xml definition. */ - static private ServletContextHandler getContext( + static private ServletContextHandler getContextHandler( final Map<String, String> initParams) { if (initParams == null) @@ -365,23 +385,6 @@ } - // final ResourceHandler resource_handler = new ResourceHandler(); - // - // resource_handler.setDirectoriesListed(false); // Nope! - // - // resource_handler.setWelcomeFiles(new String[] { "index.html" }); - // - // final HandlerList handlers = new HandlerList(); - // - // handlers.setHandlers(new Handler[] { resource_handler, new - // DefaultHandler() }); - // - // setHandler(handlers); - - // FIXME Set to locate the flot files as part of the CountersServlet - // setup. - // resource_handler.setResourceBase(config.resourceBase); - // Performance counters. context.addServlet(new ServletHolder(new CountersServlet()), "/counters"); @@ -390,12 +393,41 @@ context.addServlet(new ServletHolder(new StatusServlet()), "/status"); // Core RDF REST API, including SPARQL query and update. - context.addServlet(new ServletHolder(new RESTServlet()), "/"); + context.addServlet(new ServletHolder(new RESTServlet()), "/sparql"); +// context.setResourceBase("bigdata-war/src/html"); +// +// context.setWelcomeFiles(new String[]{"index.html"}); + return context; } + private static ResourceHandler getResourceHandler( + final Map<String, String> initParams) { + + if (initParams == null) + throw new IllegalArgumentException(); + + final ResourceHandler resourceHandler = new ResourceHandler(); + + resourceHandler.setDirectoriesListed(false); // Nope! + + // FIXME Set to locate the flot files as part of the CountersServlet + // setup. + // resource_handler.setResourceBase(config.resourceBase); + + // Note: FileResource or ResourceCollection. +// resourceHandler.setBaseResource(new FileResource(...)); + + resourceHandler.setResourceBase("bigdata-war/src/html"); + + resourceHandler.setWelcomeFiles(new String[]{"index.html"}); + + return resourceHandler; + + } + /** * Print the optional message on stderr, print the usage information on * stderr, and then force the program to exit with the given status code. Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/RESTServlet.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/RESTServlet.java 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/RESTServlet.java 2011-05-24 17:17:49 UTC (rev 4547) @@ -91,8 +91,9 @@ protected void doGet(final HttpServletRequest req, final HttpServletResponse resp) throws IOException { + // Note: Will report BadRequest if "?query" not present. m_queryServlet.doGet(req, resp); - + } /** Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/WebAppUnassembled.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/WebAppUnassembled.java 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/WebAppUnassembled.java 2011-05-24 17:17:49 UTC (rev 4547) @@ -58,7 +58,7 @@ * * @throws Exception */ - public static void main(String[] args) throws Exception + public static void main(final String[] args) throws Exception { // default port Modified: branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/TestNanoSparqlServer.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/TestNanoSparqlServer.java 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-sails/src/test/com/bigdata/rdf/sail/webapp/TestNanoSparqlServer.java 2011-05-24 17:17:49 UTC (rev 4547) @@ -114,7 +114,7 @@ /** * The request path for the REST API under test. */ - final private static String requestPath = "/"; + final private static String requestPath = "/sparql"; protected void setUp() throws Exception { @@ -1032,7 +1032,7 @@ assertEquals(23, countResults(doSparqlQuery(opts, requestPath))); - doDeleteWithBody("", 23, format); + doDeleteWithBody(requestPath, 23, format); // No solutions (assuming a told triple kb or quads kb w/o axioms). assertEquals(0, countResults(doSparqlQuery(opts, requestPath))); @@ -1077,9 +1077,9 @@ HttpURLConnection conn = null; try { - final URL url = new URL(m_serviceURL + "/" + servlet+"?delete"); - conn = (HttpURLConnection) url.openConnection(); - conn.setRequestMethod("POST"); + final URL url = new URL(m_serviceURL + servlet + "?delete"); + conn = (HttpURLConnection) url.openConnection(); + conn.setRequestMethod("POST"); conn.setDoOutput(true); conn.setDoInput(true); conn.setUseCaches(false); Deleted: branches/QUADS_QUERY_BRANCH/bigdata-war/WEB-INF/web.xml =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-war/WEB-INF/web.xml 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-war/WEB-INF/web.xml 2011-05-24 17:17:49 UTC (rev 4547) @@ -1,68 +0,0 @@ -<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> -<web-app> - <display-name>Bigdata</display-name> - <description>Bigdata</description> - <context-param> - <param-name>property-file</param-name> - <param-value>bigdata/RWStore.properties</param-value> - <description>The property file (for a standalone database instance) or the - jini configuration file (for a federation). The file MUST end with either - ".properties" or ".config". When deploying a web application, the bundled - property files are located in the root of the "bigdata" WAR and are located - as "bigdata/RWStore.properties", etc.</description> - </context-param> - <context-param> - <param-name>namespace</param-name> - <param-value>kb</param-value> - <description>The default bigdata namespace of for the triple or quad store - instance to be exposed.</description> - </context-param> - <context-param> - <param-name>create</param-name> - <param-value>true</param-value> - <description>When true a new triple or quads store instance will be created - if none is found at that namespace.</description> - </context-param> - <context-param> - <param-name>query-thread-pool-size</param-name> - <param-value>16</param-value> - <description>The size of the thread pool used to service SPARQL queries -OR- - ZERO (0) for an unbounded thread pool.</description> - </context-param> - <listener> - <listener-class>com.bigdata.rdf.sail.webapp.BigdataRDFServletContextListener</listener-class> - </listener> - <servlet> - <servlet-name>REST API</servlet-name> - <display-name>REST API</display-name> - <description>The REST API, including a SPARQL end point, as described at - https://sourceforge.net/apps/mediawiki/bigdata/index.php?title=NanoSparqlServer - </description> - <servlet-class>com.bigdata.rdf.sail.webapp.RESTServlet</servlet-class> - <load-on-startup>0</load-on-startup> - </servlet> - <servlet> - <servlet-name>Status</servlet-name> - <display-name>Status</display-name> - <description>A status page.</description> - <servlet-class>com.bigdata.rdf.sail.webapp.StatusServlet</servlet-class> - </servlet> - <servlet> - <servlet-name>Counters</servlet-name> - <display-name>Performance counters</display-name> - <description>Performance counters.</description> - <servlet-class>com.bigdata.rdf.sail.webapp.CountersServlet</servlet-class> - </servlet> - <servlet-mapping> - <servlet-name>REST API</servlet-name> - <url-pattern>/bigdata</url-pattern> - </servlet-mapping> - <servlet-mapping> - <servlet-name>Status</servlet-name> - <url-pattern>/bigdata/status</url-pattern> - </servlet-mapping> - <servlet-mapping> - <servlet-name>Counters</servlet-name> - <url-pattern>/bigdata/counters</url-pattern> - </servlet-mapping> -</web-app> Added: branches/QUADS_QUERY_BRANCH/bigdata-war/src/html/index.html =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-war/src/html/index.html (rev 0) +++ branches/QUADS_QUERY_BRANCH/bigdata-war/src/html/index.html 2011-05-24 17:17:49 UTC (rev 4547) @@ -0,0 +1,39 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" +"http://www.w3.org/TR/html4/loose.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html;charset=utf-8" > +<title>bigdata® NanoSpaqrlServer</title> +<!-- $Id$ --> +</head> +<body> + +<p> + +Welcome to bigdata®. Please consult the +<a href="https://sourceforge.net/apps/mediawiki/bigdata/index.php?title=NanoSparqlServer"> +documentation </a> for information on using the NanoSparqlServer's REST Api. + +</p> + +<p> +The following URLs should be active when deployed in the default configuration: +</p> +<dl> +<dt>http://hostname:port/bigdata</dt> +<dd>This page.</dd> +<dt>http://hostname:port/bigdata/sparql/</dt> +<dd>The SPARQL REST API.</dd> +<dt>http://hostname:port/bigdata/status</dt> +<dd>A status page</dd> +<dt>http://hostname:port/bigdata/counters</dt> +<dd>A performance counters page</dd> +</dl> + +<p> +Where <i>hostname</i> is the name of this host and <i>port</i> is the port at +which this page was accessed. +</p> + +</body> +</html> \ No newline at end of file Property changes on: branches/QUADS_QUERY_BRANCH/bigdata-war/src/html/index.html ___________________________________________________________________ Added: svn:keywords + Id Date Revision Author HeadURL Modified: branches/QUADS_QUERY_BRANCH/bigdata-war/src/resources/WEB-INF/web.xml =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata-war/src/resources/WEB-INF/web.xml 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/bigdata-war/src/resources/WEB-INF/web.xml 2011-05-24 17:17:49 UTC (rev 4547) @@ -62,7 +62,7 @@ </servlet> <servlet-mapping> <servlet-name>REST API</servlet-name> - <url-pattern>/</url-pattern> + <url-pattern>/sparql</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>Status</servlet-name> Modified: branches/QUADS_QUERY_BRANCH/build.xml =================================================================== --- branches/QUADS_QUERY_BRANCH/build.xml 2011-05-24 14:40:20 UTC (rev 4546) +++ branches/QUADS_QUERY_BRANCH/build.xml 2011-05-24 17:17:49 UTC (rev 4547) @@ -229,7 +229,7 @@ from colt and fastutil which are required by the proceeding jars. The main advantage of the resulting jar is that the vast majority of fastutil is not necessary, and it is a 13M jar. - --> + <target name="autojar" description="Produce an expanded version of the bigdata jar which includes the data from the dsi-util and lgpl-utils jars and only @@ -244,14 +244,23 @@ ${bigdata.dir}/bigdata/lib/lgpl-utils*.jar " /> </java> + </target> --> + <!-- java autojar.jar -vo fastutil-stripped.jar -c fastutil.jar -Y bigdata.jar --> + <target name="autojar-strip-fastutil" depends="prepare" + description="Strip unused classes from fastutil."> + <java jar="src/build/autojar/autojar.jar" fork="true" failonerror="true"> + <arg line="-o ${build.dir}/fastutil-stripped.jar + -c ${bigdata.dir}/bigdata/lib/unimi/fastutil*.jar + -- + -Y ${build.dir}/lib/${version}.jar + -Y ${bigdata.dir}/bigdata/lib/dsi-util*.jar + -Y ${bigdata.dir}/bigdata/lib/lgpl-utils*.jar + " /> + </java> </target> <!--depends="bundleJar"--> - <!-- - TODO 13M of the resulting WAR is fastutils. We need to slim down that JAR to - just the classes that we actually use before deploying it. - --> - <target name="war" depends="autojar" + <target name="war" depends="bundleJar, autojar-strip-fastutil" description="Generates a WAR artifact."> <delete file="${build.dir}/bigdata.war"/> <echo message="Building WAR"/> @@ -262,15 +271,17 @@ <fileset dir="bigdata-war/src/jsp"/> <fileset dir="bigdata-war/src/images"/> <file file="bigdata-war/src/resources/RWStore.properties"/> - <!-- bigdata jar plus some dependencies as filtered by autojar. --> - <lib file="${build.dir}/bigdataPlus.jar"/> + <!-- bigdata jar plus some dependencies as filtered by autojar. + <lib file="${build.dir}/bigdataPlus.jar"/> --> + <!-- The stripped version of fasutil. --> + <lib file="${build.dir}/fastutil-stripped.jar"/> <lib dir="${build.dir}/lib"> - <!-- jars bundled into "bigdata-plus" by autojar. --> <exclude name="fastutil*.jar"/> + <!-- jars bundled into "bigdata-plus" by autojar. <exclude name="colt*.jar"/> <exclude name="dsi-util*.jar"/> <exclude name="lgpl-utils*.jar"/> - <exclude name="bigdata*.jar"/> + <exclude name="bigdata*.jar"/>--> <!-- jars which are not currently used. --> <exclude name="iris*.jar"/> <exclude name="jgrapht*.jar"/> Modified: branches/QUADS_QUERY_BRANCH/src/build/autojar/autojar.jar =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |