Apache Nutch is an extensible and scalable web crawler
simplify compilation process
Sami Siren7145567dfc78
diff --git a/contrib/web2/README.txt b/contrib/web2/README.txtindex f4c691da3..d4550badf 100644--- a/contrib/web2/README.txt+++ b/contrib/web2/README.txt@@ -23,34 +23,13 @@ WebApp extension can contain ui logic (in forms of tilescontrollers and pojos, jar libraries), ui markup(in form of html, jsp), ui resources css, javascript.-Before compiling core nutch plugins you must edit the-core nutch plugin 'nutch-extensionpoints' plugin.xml-and add following snippet into it:--<extension-point- id="org.apache.nutch.webapp.extension.UIExtensionPoint"- name="UI extension"/>--<extension-point- id="org.apache.nutch.webapp.extension.PreSearchExtensionPoint"- name="Pre search extension"/>--<extension-point- id="org.apache.nutch.webapp.extension.PostSearchExtensionPoint"- name="Post search extension"/>--<extension-point- id="org.apache.nutch.webapp.extension.SearchExtensionPoint"- name="Search Extension"/>--To compile you need to fist build your nutch (core and plugins)-after that run ant war to generate war.-To compile web2 plugins you must issue commandant compile-pluginsAfter compiling you must enable plugins, please refer to nutch-documentation+documentation++To build deployable .war issue command ant war.The nutch plugins are not included in the generated war and youneed to properly configure where your plugins are. This is achieved@@ -125,23 +104,21 @@ Referencing jsp resources inside nutch warabsolute path, must start with /WEB-INF- <definition name="searchPage" extends=".layout"- controllerClass="org.apache.nutch.webapp.controller.CachingSearchController">- <put name="title" value="cached search"/>- <put name="pageBody" value="/WEB-INF/jsp/search.jsp" />- </definition>+<definition name="searchPage" extends=".layout"+ controllerClass="org.apache.nutch.webapp.controller.CachingSearchController">+ <put name="title" value="cached search"/>+ <put name="pageBody" value="/WEB-INF/jsp/search.jsp" />+</definition>Referencing jsp resources inside pluginsabsolute path, must start with /plugin/-- <definition name="searchPage" extends=".layout"- controllerClass="org.apache.nutch.webapp.controller.CachingSearchController">- <put name="title" value="cached search"/>- <put name="pageBody" value="/plugin/search.jsp" />- </definition>-+<definition name="searchPage" extends=".layout"+ controllerClass="org.apache.nutch.webapp.controller.CachingSearchController">+ <put name="title" value="cached search"/>+ <put name="pageBody" value="/plugin/search.jsp" />+</definition>Static resourcesdiff --git a/contrib/web2/build.xml b/contrib/web2/build.xmlindex 611be2d08..e827ee689 100644--- a/contrib/web2/build.xml+++ b/contrib/web2/build.xml@@ -79,7 +79,7 @@<!--Compile Java files-->- <target name="compile" depends="init">+ <target name="compile" depends="nutch-jar, nutch-plugins, init"><echo message="Compiling ${name}" /><javac encoding="${build.encoding}" srcdir="${src.dir}"includes="**/*.java" destdir="${build.classes}"@@ -106,6 +106,19 @@</jar></target>+ <!--+ compile nutch+ -->+ <target name="nutch-jar">+ <ant dir="${nutch.root}" target="jar" inheritAll="false" />++ </target>+ <target name="nutch-plugins">+ <ant antfile="${nutch.root}/build.xml" dir="${nutch.root}"+ target="compile-plugins" />++ </target>+<!--generate the nutch.xml (servlet context) file-->@@ -127,7 +140,8 @@<ant dir="plugins" target="deploy" inheritAll="false" /></target>- <target name="war" depends="generate-context, generate-pages, jar">+ <target name="war"+ depends="generate-context, generate-pages, jar"><war destfile="${build.dir}/${web.final.name}.war"webxml="src/main/webapp/WEB-INF/web.xml"><fileset dir="${web.src.dir}" excludes="WEB-INF/web.xml" />