<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4804832886308402838</id><updated>2019-07-02T05:59:54.654-06:00</updated><category term="Apache Solr"/><category term="Apache Maven"/><category term="Velocity template"/><category term="XInclude"/><category term="Apache"/><category term="Hadoop"/><category term="Java"/><category term="Maven"/><category term="apache http server"/><category term="ActionScript"/><category term="Apache Nutch"/><category term="Apache Solr 3.3"/><category term="Apache Spark"/><category term="Debug Java Web App"/><category term="FreeMarker"/><category term="Gradle"/><category term="JAXB"/><category term="JAXP"/><category term="Jamon template engine"/><category term="Java API for XML Processing"/><category term="Lucene"/><category term="Nutch"/><category term="Solr Search UI"/><category term="Validate XML against XSD Schema"/><category term="W3C Schema"/><category term="Web server"/><category term="XML validation"/><category term="machine learning"/><category term="maven pom"/><category term="open source search engine"/><category term="open source template engines in Java"/><category term="open source web crawler"/><category term="unit testing"/><category term="#include"/><category term="#parse"/><category term="AMF"/><category term="Adobe Flex"/><category term="Apache JMeter"/><category term="Apache Mahout"/><category term="Apache Tiles"/><category term="Apache Tomcat"/><category term="Bamboo"/><category term="Build Automation"/><category term="Build Management"/><category term="Business Rule"/><category term="Cascading"/><category term="Cassandra"/><category term="Commerce Search Engine"/><category term="Continuous Integration"/><category term="CruiseConteol"/><category term="Custom Solr Search Component"/><category term="Customized Solr Browser for Nutch"/><category term="DNS Flusher"/><category term="DOM"/><category term="DOM Parser"/><category term="Document Object Model"/><category term="EclEmma"/><category term="Eclipse"/><category term="Eclipse Plugin"/><category term="Eclipse Plugin for Gradle"/><category term="ElementType.METHOD"/><category term="FireBug"/><category term="Firefox Addons"/><category term="FirefoxDriver"/><category term="FreeMarker tutorial"/><category term="Fulltext search"/><category term="HBase"/><category term="HDFS"/><category term="Hosting"/><category term="Hudson"/><category term="Information retrieval"/><category term="JAXB Unmarshaller"/><category term="JAXB marshaller/unmarshaller"/><category term="JDOM"/><category term="JMeter"/><category term="JMeter Plugins"/><category term="JQuery"/><category term="Java (programming language)"/><category term="Java Annotation"/><category term="Java Annotation code example"/><category term="Java Architecture for XML Binding"/><category term="Java ClassLoader"/><category term="Java template engine"/><category term="JavaBean"/><category term="Jenkins"/><category term="Jetty maven plugin"/><category term="Jupyter"/><category term="Languages"/><category term="Linux"/><category term="Log4J"/><category term="Mac OS"/><category term="Mac system preferences"/><category term="Maven Assembly Plugin"/><category term="Maven Dependency Plugin"/><category term="Maven Jar Plugin"/><category term="Maven Repository Manager"/><category term="MyAnnotatedClass"/><category term="MyAnnotation"/><category term="Nutch 1.3"/><category term="Nutch 1.6"/><category term="Nutch Solr integration"/><category term="Open source"/><category term="PHP"/><category term="POM"/><category term="Pig"/><category term="Price Facet"/><category term="Programming"/><category term="RDD"/><category term="RESTClient"/><category term="Redirect url"/><category term="RetentionPolicy.RUNTIME"/><category term="SAX"/><category term="SAX Parser"/><category term="SAXParserFactory"/><category term="Sample Recommender"/><category term="Selenium"/><category term="Selenium IDE"/><category term="Selenium RC"/><category term="Selenium Server"/><category term="Simple API for XML"/><category term="Solr Admin"/><category term="Solr Browser for Nutch"/><category term="Sonatype Nexus Open Source"/><category term="StopFilterFactory"/><category term="TCPMon"/><category term="TamperData"/><category term="UserAgentSwitcher"/><category term="VM_global_library.vm"/><category term="Velocity Include another template file"/><category term="Velocity Logging"/><category term="We Developer"/><category term="Web Design and Development"/><category term="Web Driver"/><category term="Web hosting service"/><category term="Web search engine"/><category term="WebDriver"/><category term="XPointer"/><category term="XSD Schema Validation"/><category term="Xerces Impl"/><category term="XercesImpl"/><category term="apache access permission"/><category term="archetype"/><category term="build Nutch from source distribution"/><category term="build-helper maven plugin"/><category term="build-helper plugin"/><category term="classification"/><category term="cluster computing"/><category term="clustering engine"/><category term="commit code"/><category term="create project"/><category term="dismax"/><category term="dozer"/><category term="dozer-mapping"/><category term="edismax"/><category term="emma"/><category term="exclude test classes from coverage report"/><category term="findpark"/><category term="flex"/><category term="free Java code coverage tool"/><category term="git"/><category term="github"/><category term="infinite scrolling"/><category term="ipython"/><category term="ipython notebook"/><category term="jamon-maven-plugin"/><category term="java reflection"/><category term="jaxb2-maven-plugin"/><category term="m2e plugin"/><category term="maven classworlds launcher"/><category term="maven template"/><category term="mod_jk"/><category term="monitor data on TCP connection"/><category term="multiple doucment roots"/><category term="multiple web sites"/><category term="open source Java mapper"/><category term="open source project"/><category term="open source template engine"/><category term="org.openqa.selenium.firefox.NotConnectedException"/><category term="password-less SSH Login"/><category term="public key"/><category term="python"/><category term="recommendation engine"/><category term="record tests"/><category term="search UI pagination"/><category term="selenium-maven-plugin"/><category term="solr"/><category term="solr schema.xml"/><category term="solrconfig.xml"/><category term="ssh-copy-id"/><category term="ssh-keygen"/><category term="stop words"/><category term="strField"/><category term="sun jaxb impl"/><category term="test automation"/><category term="tomcat"/><category term="velocity.properties"/><category term="velocity/browse.vm"/><category term="web development"/><category term="web mining"/><title type='text'>IntelliDiscovery Blog - Intelli(gent) (Knowledge) Discovery</title><subtitle type='html'>Blogs about Search Engine, Big Data and Machine Learning.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>47</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-8537747084482194805</id><published>2015-09-20T23:13:00.004-06:00</published><updated>2015-09-22T13:46:12.366-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Spark"/><category scheme="http://www.blogger.com/atom/ns#" term="findpark"/><category scheme="http://www.blogger.com/atom/ns#" term="ipython"/><category scheme="http://www.blogger.com/atom/ns#" term="ipython notebook"/><category scheme="http://www.blogger.com/atom/ns#" term="Jupyter"/><category scheme="http://www.blogger.com/atom/ns#" term="python"/><title type='text'>Set up PySpark with IPython/Jupyter Notebook on Ubuntu 14.04</title><content type='html'>&lt;a href=&quot;http://ipython.org/&quot;&gt;IPython&lt;/a&gt; is a great tool to do interactive data analysis for Big Data.&lt;br /&gt;&lt;a href=&quot;http://spark.apache.org/&quot;&gt;Apache Spark&lt;/a&gt; is a very fast, open source cluster computing framework which supports in-memory cluster computing.&lt;br /&gt;&lt;a href=&quot;http://spark.apache.org/docs/latest/api/python/&quot;&gt;PySpark&lt;/a&gt; is the Spark Python API which exposes the Spark programming model to Python.&lt;br /&gt;&lt;br /&gt;This post is about how to set up PySpark with ipython/Jupyter Notebook on Ubuntu 14.04.&lt;br /&gt;&lt;div&gt;&lt;ul&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;li&gt;Install Python 3.4&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;Install &lt;a href=&quot;http://continuum.io/downloads#py34&quot;&gt;Anaconda&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;Or&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;#sudo apt-get update&lt;br /&gt;sudo apt-get install python3.4&lt;br /&gt;&lt;br /&gt;# Find out where&amp;nbsp; python is installed if python2 is installed already by the command: `which python`, for example, `/usr/bin/python` &lt;br /&gt;&lt;br /&gt;# In this case, we can run the command:&lt;br /&gt;sudo unlink /usr/bin/python&lt;br /&gt;sudo ln -s /usr/bin/python3.4 /usr/bin/python&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;Run the following command,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;python --version&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;The response should be Python 3.4.0&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;ul&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;li&gt;Install ipython&amp;nbsp;&lt;/li&gt;&lt;/span&gt;&lt;/ul&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;Install pip if not done yet. &lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;sudo apt-get install python3-pip&lt;br /&gt;sudo apt-get install python-pip&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;Install ipython: &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;br /&gt;sudo pip install &quot;ipython[notebook]&quot; --upgrade&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;/span&gt;&lt;div&gt;&lt;/div&gt;&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 14.8500003814697px; line-height: 20.7900009155273px;&quot;&gt;&lt;div&gt;&lt;br /&gt;ipython --version&lt;/div&gt;&lt;div&gt;4.0.0&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Install findspark&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;br /&gt;git clone https://github.com/minrk/findspark&lt;br /&gt;cd&amp;nbsp; findspark&lt;br /&gt;sudo pip install -e .&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;ul&gt;&lt;li&gt;Start a notebook&lt;/li&gt;&lt;/ul&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;br /&gt;jupyter notebook&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the notebook, the following python code will create sparkContext:&lt;br /&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;import os&lt;br /&gt;spark_home = os.environ.get(&#39;SPARK_HOME&#39;, None)&lt;br /&gt;print(spark_home)&lt;br /&gt;&lt;br /&gt;import findspark&lt;br /&gt;findspark.init(spark_home) &lt;br /&gt;import pyspark&lt;br /&gt;try:&lt;br /&gt;&amp;nbsp; sc&lt;br /&gt;except NameError:&lt;br /&gt;&amp;nbsp; sc = pyspark.SparkContext()&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;I can create a virtualbox if anyone needs it. </content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/8537747084482194805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2015/09/set-up-pyspark-with-ipythonjupyter.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8537747084482194805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8537747084482194805'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2015/09/set-up-pyspark-with-ipythonjupyter.html' title='Set up PySpark with IPython/Jupyter Notebook on Ubuntu 14.04'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-8279633895703882866</id><published>2014-11-23T01:12:00.003-07:00</published><updated>2014-11-23T01:12:33.480-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Spark"/><category scheme="http://www.blogger.com/atom/ns#" term="cluster computing"/><category scheme="http://www.blogger.com/atom/ns#" term="HDFS"/><category scheme="http://www.blogger.com/atom/ns#" term="machine learning"/><category scheme="http://www.blogger.com/atom/ns#" term="RDD"/><title type='text'>Apache Spark 1.1.0 setup</title><content type='html'>&lt;a href=&quot;https://spark.apache.org/&quot;&gt;Apache Spark&lt;/a&gt; is an open source cluster computing framework with the following features:&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;b&gt;Resilient Distributed Datasets (RDDs)&lt;/b&gt;: A fault-tolerant collection of elements that can be operated on in parallel.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt; Users may also ask Spark to &lt;i&gt;persist&lt;/i&gt; an RDD in memory, allowing  it to be reused efficiently across parallel operations. Finally, RDDs  automatically recover from node failures. &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;&lt;i&gt;Shared Variables&lt;/i&gt;&lt;/b&gt;: They can be used in parallel operations. Spark supports two types of shared variables: &lt;i&gt;broadcast variables&lt;/i&gt;, which can be used to cache a value in memory on all nodes, and &lt;i&gt;accumulators&lt;/i&gt;, which are variables that are only “added” to, such as counters and sums.&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/span&gt;Below are related projects:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://spark.apache.org/sql/&quot;&gt;Spark SQL&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://spark.apache.org/streaming/&quot;&gt;Spark Streaming&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://spark.apache.org/mllib/&quot;&gt;&lt;b&gt;MLlib&lt;/b&gt;&lt;/a&gt; is Apache Spark&#39;s scalable machine learning library.&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://spark.apache.org/graphx/&quot;&gt;GraphX&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;Below are steps to setup Spark with two nodes: &lt;br /&gt;&lt;ol&gt;&lt;li&gt;Download Spark from &lt;a href=&quot;https://spark.apache.org/downloads.html&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://thetechietutorials.blogspot.com/2014/10/setup-password-less-ssh-login.html&quot;&gt;Setup password-less SSH Login&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Setting up a cluster &lt;/li&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;cp $SPARK_HOME/conf/spark.env.templates $SPARK_HOME/conf/spark.env&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;Setup the configurations in $SPARK_HOME/conf/spark.env, for example: &lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;br /&gt;SPARK_MASTER_WEBUI_PORT=4020&lt;br /&gt;SPARK_MASTER_PORT=4021&lt;br /&gt;SPARK_WORKER_WEBUI_PORT=4022&lt;br /&gt;SPARK_WORKER_PORT=4023&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;Add the two nodes (either machine name or ip address) on $SPARK_HOME/conf/slaves:  &lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;server1&lt;br /&gt;server2&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;li&gt;Start spark&lt;/li&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;$SPARK_HOME/sbin/start-all.sh&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;li&gt;Submit spark job &lt;/li&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;$SPARK_HOME/bin/spark-submit.sh &lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;li&gt;Stop spark&lt;/li&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;$SPARK_HOME/sbin/stop-all.sh&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/ol&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/8279633895703882866/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2014/11/apache-spark-110-setup.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8279633895703882866'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8279633895703882866'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2014/11/apache-spark-110-setup.html' title='Apache Spark 1.1.0 setup'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-6260080434716096126</id><published>2014-11-22T15:18:00.001-07:00</published><updated>2014-11-22T15:25:51.074-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="commit code"/><category scheme="http://www.blogger.com/atom/ns#" term="create project"/><category scheme="http://www.blogger.com/atom/ns#" term="git"/><category scheme="http://www.blogger.com/atom/ns#" term="github"/><title type='text'>How to Add a New Project to Github</title><content type='html'>&lt;h2&gt;On https://github.com/&lt;/h2&gt;&lt;h3&gt;&amp;nbsp;&lt;/h3&gt;&lt;h3&gt;Setting Up an Account on GitHub&lt;/h3&gt;&lt;pre class=&quot;ng-scope&quot;&gt;You need to setup an account on GitHub if you haven&#39;t done so by visiting &lt;a href=&quot;https://github.com/&quot; target=&quot;_blank&quot;&gt;github&lt;/a&gt;.&lt;/pre&gt;&lt;h3&gt;Creating a New Project on Github&lt;/h3&gt;&lt;pre class=&quot;ng-scope&quot;&gt;&lt;a href=&quot;https://github.com/new&quot;&gt;https://github.com/new&lt;/a&gt;&lt;/pre&gt; &lt;h2&gt;&amp;nbsp;&lt;/h2&gt;&lt;h2&gt;On Your Local Machine&lt;/h2&gt;&lt;h3 class=&quot;ng-scope&quot;&gt;Creating Your Local Repository on your local machine&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;git init&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h3 class=&quot;ng-scope&quot;&gt;Configure user name and email for HitHub &lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;git config --global user.name &quot;Your Name Here&quot;&lt;br /&gt;git config --global user.email &quot;your_email@youremail.com&quot;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h3 class=&quot;ng-scope&quot;&gt;Committing Your Project to Local Repository&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;git add &amp;lt;files&amp;gt;&lt;br /&gt;git commit -a -m &quot;Initial checkin&quot;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;Or you can wait until you pull all the changes from your Guthub project.  &lt;br /&gt;&lt;h3&gt;Add Remote Github Project to the Local Repository&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;git remote add origin https://github.com/&amp;lt;user&amp;gt;/&amp;lt;project&amp;gt;.git&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;Make sure to append &lt;i&gt;&lt;b&gt;.git&lt;/b&gt;&lt;/i&gt;. If you forget to append .git, you can reset the url by the command below: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;git remote set-url origin // https://github.com/&amp;lt;user&amp;gt;/&amp;lt;project&amp;gt;.git&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h3&gt;Pull Changes from Github&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;git pull origin master&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;h3&gt;Push Committed Changes to Github&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;git push origin master &lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/6260080434716096126/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2014/11/how-to-add-new-project-to-github_22.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/6260080434716096126'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/6260080434716096126'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2014/11/how-to-add-new-project-to-github_22.html' title='How to Add a New Project to Github'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-6996981069196701199</id><published>2014-10-20T23:13:00.005-06:00</published><updated>2014-10-25T14:51:47.610-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="password-less SSH Login"/><category scheme="http://www.blogger.com/atom/ns#" term="public key"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh-copy-id"/><category scheme="http://www.blogger.com/atom/ns#" term="ssh-keygen"/><title type='text'>Setup a Password-less SSH Login</title><content type='html'>&lt;div dir=&quot;ltr&quot; id=&quot;docs-internal-guid-5d18e4ae-3102-92e3-f168-3638c7d0e33d&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;This is a great way to speed up connections to regularly accessed remote machines. You can setup passwordless SSH login with the following steps:&lt;/span&gt;&lt;/div&gt;&lt;ol style=&quot;margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Execute ssh-keygen&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Press Enter key till you get the prompt&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;Copy your public key to a remote machine&#39;s authorized_keys with the following command:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;ssh-copy-id -i user@remote_ip (It will once ask for the password of the host system)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;OR with the following command if &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;ssh-copy-id does not exist in a system (for example OS X):&lt;/span&gt;&lt;/div&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;cat ~/.ssh/id_rsa.pub | ssh user@&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;remote_ip&lt;/span&gt; &#39;cat &amp;gt;&amp;gt; .ssh/authorized_keys&#39;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;li&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;Now you can run the following command: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;ssh &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;user@&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;remote_ip&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&lt;div dir=&quot;ltr&quot; style=&quot;line-height: 1.15; margin-bottom: 0pt; margin-top: 0pt;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;to login without any password.&lt;/span&gt;&lt;/div&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/6996981069196701199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2014/10/setup-password-less-ssh-login.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/6996981069196701199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/6996981069196701199'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2014/10/setup-password-less-ssh-login.html' title='Setup a Password-less SSH Login'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-8253577616278967968</id><published>2013-03-12T18:39:00.003-06:00</published><updated>2013-03-12T18:39:49.738-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Cascading"/><category scheme="http://www.blogger.com/atom/ns#" term="Gradle"/><category scheme="http://www.blogger.com/atom/ns#" term="Hadoop"/><category scheme="http://www.blogger.com/atom/ns#" term="m2e plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven Dependency Plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven Jar Plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="POM"/><category scheme="http://www.blogger.com/atom/ns#" term="Sample Recommender"/><title type='text'>Setup Maven for building sample recommender in Cascading</title><content type='html'>&lt;a href=&quot;http://www.cascading.org/&quot; target=&quot;_blank&quot;&gt;Cascading&lt;/a&gt; is a java framework for developing applications on Apache Hadoop. Currently it is only using &lt;a href=&quot;http://www.gradle.org/&quot; target=&quot;_blank&quot;&gt;Gradle &lt;/a&gt; to build the framework and sample applications, however Gradle is not well supported in Eclipse, for example, debugging etc.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;I built a Maven pom file for &lt;a href=&quot;https://github.com/Cascading/SampleRecommender&quot; target=&quot;_blank&quot;&gt;SampleRecommender&lt;/a&gt;, which come with Casacading package (Under Cascading-2.1-SDK-*/source/SampleRecommender) so that we can use Maven m2e plugin to generate eclipse configurations and debug within Eclipse.&lt;br /&gt;I did the following in the pom file:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Setup project dependencies&lt;/li&gt;&lt;li&gt;Add the dependent jar files into the final artifact (jar) using dependency plugin&lt;/li&gt;&lt;li&gt;Setup main class in the jar file using jar plugin &lt;/li&gt;&lt;/ul&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.37833876343098793&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;modelVersion&amp;gt;4.0.0&amp;lt;/modelVersion&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;cascading&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;SampleRecommender&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;packaging&amp;gt;jar&amp;lt;/packaging&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;version&amp;gt;1.0-SNAPSHOT&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;name&amp;gt;Cascading SampleRecommender&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;url&amp;gt;http://maven.apache.org&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp; &amp;lt;repositories&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;repository&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;conjars.org&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;url&amp;gt;http://conjars.org/repo&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/repository&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/repositories&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp; &amp;lt;properties&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;targetJdk&amp;gt;1.6&amp;lt;/targetJdk&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;slf4j.log4j12.version&amp;gt;1.6.2&amp;lt;/slf4j.log4j12.version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;junit.version&amp;gt;4.8.2&amp;lt;/junit.version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;maven-jar-plugin-version&amp;gt;2.3.1&amp;lt;/maven-jar-plugin-version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;cascading.version&amp;gt;2.1.4&amp;lt;/cascading.version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/properties&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;dependencies&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;cascading&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;cascading-core&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;${cascading.version}&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;type&amp;gt;jar&amp;lt;/type&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;cascading&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;cascading-local&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;${cascading.version}&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;cascading&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;cascading-hadoop&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;${cascading.version}&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;slf4j-api&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;${slf4j.log4j12.version}&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.slf4j&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;slf4j-log4j12&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;${slf4j.log4j12.version}&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp; &amp;lt;/dependencies&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp; &amp;lt;build&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;finalName&amp;gt;${project.artifactId}&amp;lt;/finalName&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;maven-compiler-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;2.3.2&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;encoding&amp;gt;UTF-8&amp;lt;/encoding&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;source&amp;gt;${targetJdk}&amp;lt;/source&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;target&amp;gt;${targetJdk}&amp;lt;/target&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;optimize&amp;gt;true&amp;lt;/optimize&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;maven-dependency-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;phase&amp;gt;prepare-package&amp;lt;/phase&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;goal&amp;gt;copy-dependencies&amp;lt;/goal&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;outputDirectory&amp;gt;${project.build.directory}/classes/lib&amp;lt;/outputDirectory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;overWriteReleases&amp;gt;false&amp;lt;/overWriteReleases&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;overWriteSnapshots&amp;gt;false&amp;lt;/overWriteSnapshots&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;overWriteIfNewer&amp;gt;true&amp;lt;/overWriteIfNewer&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;groupId&amp;gt;org.apache.maven.plugins&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;artifactId&amp;gt;maven-jar-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;version&amp;gt;${maven-jar-plugin-version}&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;archive&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;manifest&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;mainClass&amp;gt;sample.recommender.Main&amp;lt;/mainClass&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/manifest&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/archive&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp; &amp;lt;/build&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;/project&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Run the following command to generate the jar file (target/SampleRecommender.jar): &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;maven clean package&lt;/pre&gt;&lt;br /&gt;Then you can run the following command: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;hadoop jar ./target/SampleRecommender.jar data/en.stop data/tweets output/token output/similarity&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/8253577616278967968/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2013/03/setup-maven-for-building-sample.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8253577616278967968'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8253577616278967968'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2013/03/setup-maven-for-building-sample.html' title='Setup Maven for building sample recommender in Cascading'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-4616967444532890638</id><published>2013-03-10T14:53:00.000-06:00</published><updated>2013-03-10T14:53:18.508-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Build Automation"/><category scheme="http://www.blogger.com/atom/ns#" term="Eclipse Plugin for Gradle"/><category scheme="http://www.blogger.com/atom/ns#" term="Gradle"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven"/><title type='text'>How to setup a Gradle app on Eclipse</title><content type='html'>&lt;a href=&quot;http://www.gradle.org/&quot; target=&quot;_blank&quot;&gt;Gradle&lt;/a&gt; is another tool for build automation like Maven, but it&#39;s easier to import a project which contains pom.xml into Eclipse than a project having build.gradle because of&amp;nbsp; existing Eclipse Maven plugins, for example, m2e etc. Here is how to setup the &lt;a href=&quot;http://www.gradle.org/docs/current/userguide/eclipse_plugin.html&quot; target=&quot;_blank&quot;&gt;Eclipse Plugin for Gradle&lt;/a&gt; (by adding the following section to a .gradle file):&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;apply plugin: &#39;eclipse&#39;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Then, you can run the following command to generate all Eclipse configuration files once you setup Eclipse Plugin for Gradle:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;gradle eclipse&lt;br /&gt;&lt;/pre&gt;Then you can import an existing application to Eclipse directly. </content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/4616967444532890638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2013/03/how-to-setup-gradle-app-on-eclipse.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/4616967444532890638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/4616967444532890638'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2013/03/how-to-setup-gradle-app-on-eclipse.html' title='How to setup a Gradle app on Eclipse'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-5468281371934286829</id><published>2013-02-27T20:59:00.001-07:00</published><updated>2013-02-27T20:59:49.819-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Maven Repository Manager"/><category scheme="http://www.blogger.com/atom/ns#" term="Sonatype Nexus Open Source"/><title type='text'>Setup Maven Repository with Sonatype Nexus Open Source</title><content type='html'>&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;a href=&quot;http://www.sonatype.org/nexus&quot; target=&quot;_blank&quot;&gt;Nexus&lt;/a&gt; Open Source from Sonatype is a free Maven repository manager under the Eclipse Public  License (EPL Version 1&lt;b&gt;)&lt;/b&gt;. It could be very useful even your company always has a centralized maven repository, because sometimes the centralized maven repository might not cover all of artifacts you need, and you don&#39;t have permission to add a new repository to &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;the centralized maven repository. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Below are the steps how to setup Nexus Open Source: &lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Download the latest Nexus Open Source distribution from&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.sonatype.org/nexus/go&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://www.sonatype.org/nexus/go&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Unzip or untar the file. It will create two directories: nexus-oss-webapp-&amp;lt;version&amp;gt; and sonatype-work, which is the workspace for Nexus.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Start &lt;/span&gt;nexus by running: &lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;nexus-oss-webapp-&amp;lt;version&amp;gt;/bin/jsw/linux-x86-64/nexus start&lt;/pre&gt;if you are using Linux 64 bit OS&lt;span style=&quot;font-family: Arial;&quot;&gt;, otherwise you can find the directory you need from:&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;nexus-oss-webapp-&amp;lt;version&amp;gt;/bin/jsw/linux-x86-64/nexus&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;You should be able to access the following url if nexus started successfully (By default, Nexus is running on port 8081): &lt;a href=&quot;http://localhost:8081/nexus/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://localhost:8081/nexus/&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Repository Configuration&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;The default login/&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;password&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; is &lt;/span&gt;&lt;b&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: italic; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;admin&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;/admin123&lt;/span&gt;&lt;/b&gt; for Nexus admin console.&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/span&gt;You can add repositories as needed. &lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;For example, adding a proxy repository&lt;/span&gt; &lt;br /&gt;&lt;a href=&quot;http://conjars.org/repo/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://conjars.org/repo/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: #1155cc; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; vertical-align: baseline;&quot;&gt; &lt;/span&gt;so that we can have &lt;a href=&quot;http://www.cascading.org/&quot; target=&quot;_blank&quot;&gt;cascading&lt;/a&gt; artifacts.&lt;/li&gt;&lt;li&gt;Setup setting.xml&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/span&gt;Below is the an example you can put in your settings.xml under ~/.m2/ or ${MAVEN_HOME}/conf:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;mirrors&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mirror&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;mysnapshot-mirror&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mirrorOf&amp;gt;public-snapshots&amp;lt;/mirrorOf&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;url&amp;gt;http://localhost:8081/nexus/content/groups/public-snapshots&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/mirror&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mirror&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;my-mirror&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;mirrorOf&amp;gt;*&amp;lt;/mirrorOf&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;url&amp;gt;http://localhost:8081/nexus/content/groups/public&amp;lt;/url&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/mirror&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;/mirrors&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ol&gt;Now you should be able to run maven. Have fun with your Maven Repository Manager!&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/5468281371934286829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2013/02/setup-maven-repository-with-sonatype.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5468281371934286829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5468281371934286829'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2013/02/setup-maven-repository-with-sonatype.html' title='Setup Maven Repository with Sonatype Nexus Open Source'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-5576161472818220792</id><published>2013-02-21T22:06:00.001-07:00</published><updated>2013-02-26T00:17:38.751-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Nutch"/><category scheme="http://www.blogger.com/atom/ns#" term="Apache Solr"/><category scheme="http://www.blogger.com/atom/ns#" term="Hadoop"/><category scheme="http://www.blogger.com/atom/ns#" term="Nutch"/><category scheme="http://www.blogger.com/atom/ns#" term="Nutch 1.6"/><category scheme="http://www.blogger.com/atom/ns#" term="open source web crawler"/><category scheme="http://www.blogger.com/atom/ns#" term="web mining"/><title type='text'>Setup Nutch 1.6 to run on Hadoop cluster and integrate Solr for search</title><content type='html'>&lt;br /&gt;Nutch is an open source web crawler written in Java.&amp;nbsp; I had a previous post talking about &lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/06/solr-and-nutch-integration.html&quot; target=&quot;_blank&quot;&gt;Solr and Nutch integration&lt;/a&gt;, which mainly covered how you setup Nutch to run on local mode (without Hadoop) and integrate with Apache Solr for search. Today I am going to cover how we can run Nutch 1.6 on top of Hadoop. &lt;br /&gt;&lt;h2 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;1. &lt;/span&gt;&lt;span style=&quot;background-color: transparent; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; vertical-align: baseline;&quot;&gt;Setup Apache Nutch 1.6&lt;/span&gt;&lt;/h2&gt;&lt;h2 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;1.1a Setup Nutch from binary distribution:&lt;/span&gt;&lt;/h2&gt;&lt;div dir=&quot;ltr&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-style: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;This is no longer an option because the binary distribution by default in 1.6 is running on local mode.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;1.1b Setup Nutch from source distribution:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Download Nutch 1.6 source from&lt;/span&gt;&lt;a href=&quot;http://www.apache.org/dyn/closer.cgi/nutch/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://www.apache.org/dyn/closer.cgi/nutch/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;. &lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Unzip it and put the directory as $HOME/apache-nutch-1.6&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;cd $HOME/apache-nutch-1.6&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Add your spider name as http.agent.name in conf/nutch-default.xml, for example:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;property&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;name&amp;gt;http.agent.name&amp;lt;/name&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;value&amp;gt;My Nutch Spider&amp;lt;/value&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;/property&amp;gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;run “ant” command.&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;It should generate a directory called $HOME/&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;apache-nutch-1.6&lt;/span&gt;/runtime.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;From now on, I am going to use ${NUTCH_RUNTIME_HOME} to refer to the current directory. &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;1.2 Verify Nutch installation&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;run the following command:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;cd&lt;/span&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; ${NUTCH_RUNTIME_HOME}&lt;/span&gt;/deploy&amp;nbsp; &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;bin/nutch&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;You are good to go if you are seeing the following:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #d9d2e9; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Usage: nutch [-core] COMMAND&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #d9d2e9; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;....&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Troubleshooting tips:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;1. Run the following command if you are seeing &quot;Permission denied&quot;:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;chmod +x bin/nutch&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;2. Setup JAVA_HOME if you are seeing JAVA_HOME not set.On Mac, you can run the following command or add it to ~/.bashrc:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home&lt;/span&gt;&lt;br /&gt;&lt;h2 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;2. Setup Solr 3.6 or 4.1 for search&lt;/span&gt;&lt;/h2&gt;&lt;h3 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;2.1a Setup Solr 3.6 from source distribution&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;You can setup Solr from source distribution with Maven. The link below shows how to do that:&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/06/how-to-build-and-start-apache-solr.html&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://thetechietutorials.blogspot.com/2011/06/how-to-build-and-start-apache-solr.html&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;. &lt;/span&gt;&lt;br /&gt;&lt;h3 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;2.1b Setup Solr 3.6 from binary distribution&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;1. Download binary file from &lt;/span&gt;&lt;a href=&quot;http://www.apache.org/dyn/closer.cgi/lucene/solr/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://www.apache.org/dyn/closer.cgi/lucene/solr/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;2. unzip apache-solr-3.6.2.zip &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;3. cd apache-solr-3.6.2/example&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;4. java -jar start.jar&lt;/span&gt;&lt;br /&gt;&lt;h3 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 14pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;2.2 Verify Solr installation&lt;/span&gt;&lt;/h3&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;After you started Solr admin console, you should be able to access the following links:&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://localhost:8983/solr/admin/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://localhost:8983/solr/admin/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://localhost:8983/solr/admin/stats.jsp&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://localhost:8983/solr/admin/stats.jsp&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;h2 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;3. Setup Hadoop&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;You can skip this if you already setup Hadoop, otherwise, follow the instructions &lt;a href=&quot;http://wiki.apache.org/hadoop/GettingStartedWithHadoop&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/h2&gt;&lt;h2 dir=&quot;ltr&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;4. Integrate Solr with Nutch&lt;/span&gt;&lt;/h2&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;We have both Nutch, Solr and Hadoop installed and setup correctly. &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Below are the steps to make hyperlinks to be searchable:&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;For Solr 3.*: Run the command:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;cp ${NUTCH_RUNTIME_HOME}/conf/schema.xml ${APACHE_SOLR_HOME}/example/solr/conf/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;For Solr 4.*: Run the command below:&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;cp ${NUTCH_RUNTIME_HOME}/conf/schema-solr4.xml ${APACHE_SOLR_HOME}/example/solr/conf/&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;and add &quot;_version_&quot; to schema.xml for concurrency control as below: &lt;/pre&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;code&gt;&amp;lt;field name=&quot;_version_&quot; type=&quot;long&quot; indexed=&quot;true&quot; stored =&quot;true&quot;/&amp;gt;&lt;/code&gt; &lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: #d5a6bd;&quot;&gt;&lt;span style=&quot;color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;restart Solr with the command “&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: bold; text-decoration: underline; vertical-align: baseline;&quot;&gt;java -jar start.jar&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;” under &lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;${APACHE_SOLR_HOME}&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;/example&lt;/span&gt;&lt;/li&gt;&lt;li style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; list-style-type: decimal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Now we are ready to access &lt;/span&gt;&lt;a href=&quot;http://localhost:8983/solr/admin/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://localhost:8983/solr/admin/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;. &lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 18pt; font-style: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;&quot;&gt;5. Crawl your first website&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;1.&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; cd $HOME/&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;apache-nutch-1.6&lt;/span&gt;/runtime/deploy&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;2. mkdir -p firstSite/urls&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;3. create a file nutch under firstSite/urls with the following content:&lt;/span&gt;&lt;br /&gt;&lt;a href=&quot;http://tutorial.waycoolsearch.com/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://tutorial.waycoolsearch.com/&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;or any site you want Nutch to crawl.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;4. Put the firstSite directory&lt;/span&gt; to HDFS.&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.18460414697524008&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;hadoop fs -put firstSite firstSite&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;5.1 Run one of the following command if you don&#39;t want to send results to Solr yet:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.18460414697524008&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;hadoop jar apache-nutch-1.6.job org.apache.nutch.crawl.Crawl firstSite/urls -dir urls -depth 1 -topN 5&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;OR:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.18460414697524008&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;bin/nutch crawl firstSite/urls -dir urls -depth 1 -topN 5&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;5.2 Run the following command, which will crawl the sites and send results to Solr for searching:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.18460414697524008&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;bin/nutch crawl firstSite/urls -dir urls -depth 1 -topN 5 -solr http://localhost:8983/solr/&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;6. Now we are ready to search with &lt;/span&gt;&lt;a href=&quot;http://localhost:8983/solr/admin/&quot;&gt;&lt;span style=&quot;background-color: transparent; color: #000099; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: underline; vertical-align: baseline;&quot;&gt;http://localhost:8983/solr/admin/&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Note: You must miss 1.1b 4-5 if you are seeing the following error:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: #b4a7d6; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.18460414697524008&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 15px; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;ERROR fetcher.Fetcher: Fetcher: No agents listed in &#39;http.agent.name&#39; property.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/5576161472818220792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2013/02/setup-nutch-16-to-run-on-hadoop-cluster.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5576161472818220792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5576161472818220792'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2013/02/setup-nutch-16-to-run-on-hadoop-cluster.html' title='Setup Nutch 1.6 to run on Hadoop cluster and integrate Solr for search'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-694180918996157291</id><published>2012-06-18T20:00:00.001-06:00</published><updated>2012-06-18T20:00:48.278-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Mahout"/><category scheme="http://www.blogger.com/atom/ns#" term="Cassandra"/><category scheme="http://www.blogger.com/atom/ns#" term="classification"/><category scheme="http://www.blogger.com/atom/ns#" term="clustering engine"/><category scheme="http://www.blogger.com/atom/ns#" term="Hadoop"/><category scheme="http://www.blogger.com/atom/ns#" term="HBase"/><category scheme="http://www.blogger.com/atom/ns#" term="machine learning"/><category scheme="http://www.blogger.com/atom/ns#" term="open source project"/><category scheme="http://www.blogger.com/atom/ns#" term="Pig"/><category scheme="http://www.blogger.com/atom/ns#" term="recommendation engine"/><title type='text'>Mahout - A machine learning library from Apache</title><content type='html'>&lt;a href=&quot;http://mahout.apache.org/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Mahout&lt;/a&gt; is an open source machine learning library from Apache, which contains lots of algorithms in the following key areas: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Recommendation Engine&lt;/li&gt;Recommend items/users not yet seen as candidates someone might be interested in, for example, social networking sites recommend people not yet connected to be potential friends, and e-commerce sites recommend products to users to improve sales.&amp;nbsp; &lt;li&gt;Clustering&lt;/li&gt;Group similar items into clusters based on their attributes, for example, cluster news into different groups by logic story, etc. &amp;nbsp; &lt;li&gt;Classification&lt;/li&gt;Typically it helps to decide whether a new input matches a identified pattern or not, for example, fraud detection. &lt;/ul&gt;Mahout can run on top of Apache &lt;a href=&quot;http://hadoop.apache.org/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Hadoop&lt;/a&gt; so that we can generate better results from large amount of data, for example, hundreds millions of ratings, clicks and tags etc. Without Hadoop, it&#39;s almost impossible to achieve meaningful results via machine learning. In the next couple weeks, I will be covering Hadoop, Pig, Cassandra, HBase, and Mahout specially some techniques to make recommendation engine and clustering engine.&lt;br /&gt;&lt;br /&gt;Here is the &lt;a href=&quot;https://cwiki.apache.org/confluence/display/MAHOUT/Quickstart&quot;&gt;quick start page&lt;/a&gt; for Apache Mahout.  &lt;br /&gt;Below is the best book available for now. Hopefully we can have more good books coming out soon. &lt;br /&gt;&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=techitutor-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=1935182684&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/694180918996157291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2012/06/mahout-machine-learning-library-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/694180918996157291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/694180918996157291'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2012/06/mahout-machine-learning-library-from.html' title='Mahout - A machine learning library from Apache'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-6402987411710265715</id><published>2012-03-27T18:28:00.000-06:00</published><updated>2012-03-27T18:28:42.151-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DOM Parser"/><category scheme="http://www.blogger.com/atom/ns#" term="SAX Parser"/><category scheme="http://www.blogger.com/atom/ns#" term="Validate XML against XSD Schema"/><category scheme="http://www.blogger.com/atom/ns#" term="W3C Schema"/><category scheme="http://www.blogger.com/atom/ns#" term="XInclude"/><category scheme="http://www.blogger.com/atom/ns#" term="XML validation"/><title type='text'>Validate XML against XSD Schema (Part 3- Support XInclude using SAX Parser)</title><content type='html'>I covered &quot;&lt;a href=&quot;http://thetechietutorials.blogspot.com/2012/03/validate-xml-against-xsd-schema-1.html&quot;&gt;basic XML schema validation (Part 1)&lt;/a&gt;&quot; and &quot;&lt;a href=&quot;http://thetechietutorials.blogspot.com/2012/03/validate-xml-against-xsd-schema-part-2.html&quot; target=&quot;_blank&quot;&gt;Validate XML against XSD Schema (Part 2- Support XInclude using JDOM)&quot;&lt;/a&gt; on the last couple days. Hopefully they are useful to you. Today I am going to cover &lt;b&gt;how to use SAX Parser instead of DOM Parser to validate XML against XSD with &lt;i&gt;XInclude&lt;/i&gt; support&lt;/b&gt;. Here is a link to &quot;&lt;a href=&quot;http://www.w3.org/TR/xinclude/&quot; target=&quot;_blank&quot;&gt;XInclude&lt;/a&gt;&quot; if you are not familiar with XInclude. Just in case you are not familiar with SAX and SAX Parser, SAX stands for &quot;Simple API for &lt;span class=&quot;st&quot;&gt;XML&quot;, basically an event based API which allow us to parser XML quicker without storing all of XML contents in memory.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class=&quot;st&quot;&gt;Listed below are a couple of articles talking about differences between SAX and DOM:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.w3.org/DOM/faq.html#SAXandDOM&quot;&gt;&lt;span class=&quot;st&quot;&gt;http://www.w3.org/DOM/faq.html#SAXandDOM&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;st&quot;&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Simple_API_for_XML&quot;&gt;http://en.wikipedia.org/wiki/Simple_API_for_XML&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;Below is an XML file which includes another xml with XInclude.  &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;RedirectRules xmlns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&lt;br /&gt;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;br /&gt;xsi:schemaLocation=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect ../schemas/redirect.xsd &quot;&amp;gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;jaxb redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;jaxb&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/jaxb.php&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;annotation redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;java annotation&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/annotation1.php&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style=&quot;color: red;&quot;&gt;&amp;lt;xi:include href=&quot;src/test/resources/redirects-general.xml&quot; xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot;&amp;gt;&lt;br /&gt;      &amp;lt;xi:fallback&amp;gt;&lt;br /&gt;        &amp;lt;xi:include href=&quot;redirects-general.xml&quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/xi:fallback&amp;gt;&lt;br /&gt;   &amp;lt;/xi:include&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/RedirectRules&amp;gt;&lt;br /&gt;&lt;/pre&gt;Here is the code which validate against W3C schema using SAX Parser: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;public static void validateSchemaInSAXParserWithXInclude(File xmlFile, String[] schemas) throws Exception {&lt;br /&gt;    SAXParserFactory spf = SAXParserFactory.newInstance();&lt;br /&gt;    spf.setXIncludeAware(true);&lt;br /&gt;    spf.setValidating(true);&lt;br /&gt;    spf.setNamespaceAware(true);&lt;br /&gt;    SAXParser parser = spf.newSAXParser();&lt;br /&gt;    parser.setProperty(JAXP_SCHEMA_LANGUAGE, XMLConstants.W3C_XML_SCHEMA_NS_URI);&lt;br /&gt;&lt;br /&gt;    parser.setProperty(JAXP_SCHEMA_SOURCE, schemas);&lt;br /&gt;    XMLReader reader = parser.getXMLReader();&lt;br /&gt;    reader.setFeature(&quot;http://apache.org/xml/features/xinclude/fixup-base-uris&quot;, false);&lt;br /&gt;    reader.setErrorHandler(new ErrorHandler() {&lt;br /&gt;      public void warning(SAXParseException e) throws SAXException {}&lt;br /&gt;&lt;br /&gt;      public void error(SAXParseException e) throws SAXException {&lt;br /&gt;        throw e;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      public void fatalError(SAXParseException e) throws SAXException {&lt;br /&gt;        throw e;&lt;br /&gt;      }&lt;br /&gt;    });&lt;br /&gt;    reader.parse(new InputSource(new FileInputStream(xmlFile)));&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;Below are couple unit tests to cover valid and invalid test cases: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;  @Test(expected = SAXParseException.class) public void invalidSchemaValidationSAXNoXIncludeTest() throws Exception {&lt;br /&gt;    String[] schemas = { &quot;src/main/schemas/redirect.xsd&quot; };&lt;br /&gt;    ValidationUtils.validateSchemaInSAXParserWithXInclude(new File(&lt;br /&gt;        &quot;src/test/resources/redirects-incorrect.xml&quot;), schemas);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Test public void validSchemaValidationSAXNoXIncludeTest() throws Exception {&lt;br /&gt;    String[] schemas = { &quot;src/main/schemas/redirect.xsd&quot; };&lt;br /&gt;    ValidationUtils.validateSchemaInSAXParserWithXInclude(&lt;br /&gt;      new File(&quot;src/test/resources/redirects.xml&quot;), schemas);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Test public void validSchemaValidationSAXXIncludeTest() throws Exception {&lt;br /&gt;    String[] schemas = { &quot;src/main/schemas/redirect.xsd&quot; };&lt;br /&gt;    ValidationUtils.validateSchemaInSAXParserWithXInclude(new File(&lt;br /&gt;        &quot;src/test/resources/redirects-xinclude.xml&quot;), schemas);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;Have fun!</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/6402987411710265715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2012/03/validate-xml-against-xsd-schema-part-3.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/6402987411710265715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/6402987411710265715'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2012/03/validate-xml-against-xsd-schema-part-3.html' title='Validate XML against XSD Schema (Part 3- Support XInclude using SAX Parser)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-3011887791458024923</id><published>2012-03-26T20:26:00.002-06:00</published><updated>2012-03-26T20:26:29.339-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JDOM"/><category scheme="http://www.blogger.com/atom/ns#" term="Validate XML against XSD Schema"/><category scheme="http://www.blogger.com/atom/ns#" term="W3C Schema"/><category scheme="http://www.blogger.com/atom/ns#" term="XInclude"/><category scheme="http://www.blogger.com/atom/ns#" term="XML validation"/><title type='text'>Validate XML against XSD Schema (Part 2- Support XInclude using JDOM)</title><content type='html'>I covered &lt;a href=&quot;http://thetechietutorials.blogspot.com/2012/03/validate-xml-against-xsd-schema-1.html&quot;&gt;basic XML schema validation (Part 1)&lt;/a&gt; yesterday, however that does NOT support XInclude. Today I am going to cover &lt;b&gt;how to use JDOM to validate XML against XSD with &lt;i&gt;XInclude &lt;/i&gt;support&lt;/b&gt;. Here is a link to &quot;&lt;a href=&quot;http://www.w3.org/TR/xinclude/&quot; target=&quot;_blank&quot;&gt;XInclude&lt;/a&gt;&quot; if you are not familiar with XInclude. I had another post last year which covered &lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/08/jaxb-tutorial-part-2-jaxb-with-xinclude.html&quot; target=&quot;_blank&quot;&gt;how to support XInclude in JAXB&lt;/a&gt; if you are interested.&amp;nbsp; &lt;br /&gt;Below is an XML file which includes another xml with XInclude.  &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;RedirectRules xmlns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&lt;br /&gt;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;br /&gt;xsi:schemaLocation=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect ../schemas/redirect.xsd &quot;&amp;gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;jaxb redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;jaxb&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/jaxb.php&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;annotation redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;java annotation&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/annotation1.php&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;   &lt;span style=&quot;color: red;&quot;&gt;&amp;lt;xi:include href=&quot;src/test/resources/redirects-general.xml&quot; xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot;&amp;gt;&lt;br /&gt;      &amp;lt;xi:fallback&amp;gt;&lt;br /&gt;        &amp;lt;xi:include href=&quot;redirects-general.xml&quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/xi:fallback&amp;gt;&lt;br /&gt;   &amp;lt;/xi:include&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/RedirectRules&amp;gt;&lt;br /&gt;&lt;/pre&gt;Here is the code which validate against W3C schema using JDOM: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;public static void validateSchemainJDomWithXInclude(File xmlFile, String[] schemas) throws Exception {&lt;br /&gt;    final SAXBuilder saxBuilder = new SAXBuilder(&quot;org.apache.xerces.parsers.SAXParser&quot;, true);&lt;br /&gt;    &lt;span style=&quot;color: red;&quot;&gt;saxBuilder.setFeature(&quot;http://apache.org/xml/features/validation/schema&quot;, true);&lt;/span&gt;&lt;br /&gt;    &lt;span style=&quot;color: red;&quot;&gt;saxBuilder.setFeature(&quot;http://apache.org/xml/features/xinclude&quot;, true);&lt;br /&gt;    saxBuilder.setFeature(&quot;http://apache.org/xml/features/xinclude/fixup-base-uris&quot;, false);&lt;br /&gt;    saxBuilder.setFeature(&quot;http://apache.org/xml/features/xinclude/fixup-language&quot;, false);&lt;/span&gt;&lt;br /&gt;    saxBuilder.setProperty(JAXP_SCHEMA_SOURCE, schemas);&lt;br /&gt;    saxBuilder.build(new FileInputStream(xmlFile));&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;Below are couple unit tests to cover valid and invalid test cases: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;  @Test&lt;br /&gt;  public void validSchemaValidationJDOMXIncludeTest() throws Exception {&lt;br /&gt;    String[] schemas = { &quot;src/main/schemas/redirect.xsd&quot; };&lt;br /&gt;    ValidationUtils.validateSchemainJDomWithXInclude(new File(&lt;br /&gt;        &quot;src/test/resources/redirects-xinclude.xml&quot;), schemas);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Test(expected = SAXParseException.class) &lt;br /&gt;  public void invalidSchemaValidationSAXNoXIncludeTest() throws Exception {&lt;br /&gt;    String[] schemas = { &quot;src/main/schemas/redirect.xsd&quot; };&lt;br /&gt;    ValidationUtils.validateSchemaInParserWithXInclude(new File(&lt;br /&gt;        &quot;src/test/resources/redirects-incorrect.xml&quot;), schemas);&lt;br /&gt;  }&lt;br /&gt;&lt;/pre&gt;Have fun!</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/3011887791458024923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2012/03/validate-xml-against-xsd-schema-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/3011887791458024923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/3011887791458024923'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2012/03/validate-xml-against-xsd-schema-part-2.html' title='Validate XML against XSD Schema (Part 2- Support XInclude using JDOM)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-3083032914807995496</id><published>2012-03-25T20:53:00.002-06:00</published><updated>2012-03-26T20:30:14.296-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="XSD Schema Validation"/><title type='text'>Validate XML against XSD Schema (Part 1 - Basic Validation)</title><content type='html'>XML validation is essential specially if you are using XML to transfer data between different systems or B2C applications. On the next couple days, I will cover multiple different ways to handle XSD validation.&lt;br /&gt;&lt;br /&gt;Below is a basic way to do schema validation, which takes an XML file and a list of XSD schema files as parameters: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;public static void validateSchema(File xmlFile, String[] schemas) throws Exception {&lt;br /&gt;    SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);&lt;br /&gt;    Source[] sourceArray = new StreamSource[schemas.length];&lt;br /&gt;    for (int i = 0; i &amp;lt; schemas.length; i++) {&lt;br /&gt;      sourceArray[i] = new StreamSource(schemas[i]);&lt;br /&gt;    }&lt;br /&gt;    Schema schema = schemaFactory.newSchema(sourceArray);&lt;br /&gt;    Validator validator = schema.newValidator();&lt;br /&gt;    validator.setFeature(&quot;http://apache.org/xml/features/validation/schema&quot;, true);&lt;br /&gt;    StreamSource source = new StreamSource(xmlFile);&lt;br /&gt;    validator.validate(source);&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;Below is the schema file: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;schema xmlns=&quot;http://www.w3.org/2001/XMLSchema&quot;&lt;br /&gt; targetNamespace=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&lt;br /&gt; xmlns:tns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&lt;br /&gt; elementFormDefault=&quot;qualified&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;element name=&quot;RedirectRules&quot; type=&quot;tns:RedirectRulesType&quot;&amp;gt;&amp;lt;/element&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;complexType name=&quot;RedirectRulesType&quot;&amp;gt;&lt;br /&gt;  &amp;lt;sequence&amp;gt;&lt;br /&gt;   &amp;lt;element name=&quot;RedirectRule&quot; type=&quot;tns:RedirectRuleType&quot;&lt;br /&gt;    minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&amp;gt;&amp;lt;/element&amp;gt;&lt;br /&gt;  &amp;lt;/sequence&amp;gt;&lt;br /&gt; &amp;lt;/complexType&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;complexType name=&quot;RedirectRuleType&quot;&amp;gt;&lt;br /&gt;  &amp;lt;sequence&amp;gt;&lt;br /&gt;   &amp;lt;element name=&quot;Queries&quot; type=&quot;tns:QueryType&quot;&amp;gt;&amp;lt;/element&amp;gt;&lt;br /&gt;   &amp;lt;element name=&quot;Redirects&quot; type=&quot;tns:RedirectType&quot;&amp;gt;&amp;lt;/element&amp;gt;&lt;br /&gt;  &amp;lt;/sequence&amp;gt;&lt;br /&gt;  &amp;lt;attribute name=&quot;name&quot; type=&quot;string&quot;&amp;gt;&amp;lt;/attribute&amp;gt;&lt;br /&gt; &amp;lt;/complexType&amp;gt;&lt;br /&gt;&lt;br /&gt; &amp;lt;complexType name=&quot;QueryType&quot;&amp;gt;&lt;br /&gt;  &amp;lt;sequence&amp;gt;&lt;br /&gt;   &amp;lt;element name=&quot;Query&quot; type=&quot;string&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot;&amp;gt;&amp;lt;/element&amp;gt;&lt;br /&gt;  &amp;lt;/sequence&amp;gt;&lt;br /&gt; &amp;lt;/complexType&amp;gt;&lt;br /&gt; &amp;lt;complexType name=&quot;RedirectType&quot;&amp;gt;&lt;br /&gt;  &amp;lt;sequence&amp;gt;&lt;br /&gt;   &amp;lt;element name=&quot;redirectURL&quot; type=&quot;string&quot; minOccurs=&quot;1&quot;&lt;br /&gt;    maxOccurs=&quot;unbounded&quot;&amp;gt;&amp;lt;/element&amp;gt;&lt;br /&gt;  &amp;lt;/sequence&amp;gt;&lt;br /&gt; &amp;lt;/complexType&amp;gt;&lt;br /&gt;&amp;lt;/schema&amp;gt;&lt;br /&gt;&lt;/pre&gt;Below is the sample XML: &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;general redirect&quot; xmlns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;general&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;&amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;/pre&gt;Below is the sample test code:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;@Test public void testGetRedirectRules() throws JAXBException {&lt;br /&gt; List&amp;lt;RedirectRuleType&amp;gt; redirectRules = JAXBUtils.getRedirectRules(&quot;src/test/resources/redirects.xml&quot;);&lt;br /&gt; for (RedirectRuleType redirectRule : redirectRules) {&lt;br /&gt;  logger.info(&quot;Name=&quot; + redirectRule.getName());&lt;br /&gt;  logger.info(&quot;Query=&quot; + redirectRule.getQueries().getQuery());&lt;br /&gt;  logger.info(&quot;redirectURL=&quot;+ redirectRule.getRedirects().getRedirectURL());&lt;br /&gt; }&lt;br /&gt; Assert.assertEquals(2, redirectRules.size());&lt;br /&gt; List&amp;lt;RedirectRuleType&amp;gt; redirectRules1 = JAXBUtils.getRedirectRulesNoXInclude(&quot;src/test/resources/redirects.xml&quot;);&lt;br /&gt; Assert.assertEquals(redirectRules.size(), redirectRules1.size());&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;Have fun!</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/3083032914807995496/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2012/03/validate-xml-against-xsd-schema-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/3083032914807995496'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/3083032914807995496'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2012/03/validate-xml-against-xsd-schema-1.html' title='Validate XML against XSD Schema (Part 1 - Basic Validation)'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-8568525392090203769</id><published>2012-01-26T21:05:00.000-07:00</published><updated>2012-01-26T21:05:08.695-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Solr"/><category scheme="http://www.blogger.com/atom/ns#" term="dismax"/><category scheme="http://www.blogger.com/atom/ns#" term="edismax"/><category scheme="http://www.blogger.com/atom/ns#" term="stop words"/><category scheme="http://www.blogger.com/atom/ns#" term="StopFilterFactory"/><category scheme="http://www.blogger.com/atom/ns#" term="strField"/><title type='text'>Stop words causing no results found in Solr dismax search</title><content type='html'>If you have issues with some search terms returning no search results, even if your search terms are exactly the same as the titles you are searching for,&amp;nbsp; you might want to read this.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Check to see if your search terms contain stop words, for example, a, an, the, is, etc. &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Check if you are using dismax/edismax for search by checking solrconfig.xml to see if the following line is defined for your search:&lt;/li&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;str name=&quot;defType&quot;&amp;gt;edismax&amp;lt;/str&amp;gt;&amp;nbsp;&lt;/pre&gt;&lt;li&gt;Check qf parameter to see if there are any field types which don&#39;t support removing stop words, for example, an field with string, integer, float etc should not be in qf, otherwise, a search phrase with any stop words won&#39;t return any search results.&lt;br /&gt;Typically string type is defined as below:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;fieldType name=&quot;string&quot; class=&quot;solr.StrField&quot; sortMissingLast=&quot;true&quot; omitNorms=&quot;true&quot;/&amp;gt;&lt;/pre&gt;If a field defined in qf is not an &lt;span class=&quot;st&quot;&gt;&lt;i&gt;appropriate&lt;/i&gt;&lt;/span&gt; type, for example, id of string, you can create another field of a field type which contains the following filter:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;filter class=&quot;solr.StopFilterFactory&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ignoreCase=&quot;true&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; words=&quot;stopwords_en.txt&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enablePositionIncrements=&quot;true&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;&lt;br /&gt;&lt;/pre&gt;Then you can use copyField to copy values to the new field and replace it with the new field in dismax qf parameter.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;In summary, you have to make sure to not have any fields as qf parameter in dismax or edismax, whose types are not using StopFilterFactory, for example, an field with string type should not be in qf, otherwise, a search phrase with any stop words won&#39;t return any search results because dismax/edismax search is trying to match every words in your search term, and stop words were skipped for your other fields.</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/8568525392090203769/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2012/01/stop-words-causing-no-results-found-in.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8568525392090203769'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8568525392090203769'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2012/01/stop-words-causing-no-results-found-in.html' title='Stop words causing no results found in Solr dismax search'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-5736347449212786635</id><published>2011-11-01T00:02:00.001-06:00</published><updated>2012-01-01T16:03:23.569-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="monitor data on TCP connection"/><category scheme="http://www.blogger.com/atom/ns#" term="TCPMon"/><title type='text'>TCPMon - An open source tool to monitor data on TCP connection</title><content type='html'>&lt;a href=&quot;http://code.google.com/p/tcpmon/&quot;&gt;TCPMon &lt;/a&gt;is an open source tool to monitor data on TCP connection. It could be very useful if you want to monitor traffic and you have choices on setting up proxy. Basically you can place tcpmon in between a client and server, then look at the traffic between client and server.&lt;br /&gt;&lt;br /&gt;I mentioned a Firefox addon(Tamper Data) &lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/09/my-favorite-firefox-addons.html&quot;&gt;before &lt;/a&gt;to monitor and modify HTTP/HTTPS requests including headers and query parameters.&amp;nbsp;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/5736347449212786635/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/11/tcpmon-open-source-tool-to-monitor-data.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5736347449212786635'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5736347449212786635'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/11/tcpmon-open-source-tool-to-monitor-data.html' title='TCPMon - An open source tool to monitor data on TCP connection'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-8218621761242269797</id><published>2011-09-27T21:56:00.002-06:00</published><updated>2011-09-27T22:00:48.612-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache JMeter"/><category scheme="http://www.blogger.com/atom/ns#" term="JMeter"/><category scheme="http://www.blogger.com/atom/ns#" term="JMeter Plugins"/><category scheme="http://www.blogger.com/atom/ns#" term="record tests"/><title type='text'>JMeter and JMeter Plugins</title><content type='html'>&lt;a href=&quot;http://jakarta.apache.org/jmeter/&quot; target=&quot;_blank&quot;&gt;JMeter&lt;/a&gt; is an open source load testing software, which is very useful for performance testing. You can use it for functional testing as well.&lt;br /&gt;So far JMeter supports the following servers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;HTTP, HTTPS &lt;/li&gt;&lt;li&gt;SOAP &lt;/li&gt;&lt;li&gt;JMS &lt;/li&gt;&lt;li&gt;Database &lt;/li&gt;&lt;li&gt;Mail&lt;/li&gt;&lt;li&gt;LDAP&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;And JMeter can record tests by setting up Proxy. Here is a &lt;a href=&quot;http://jakarta.apache.org/jmeter/usermanual/jmeter_proxy_step_by_step.pdf&quot;&gt;tutorial&lt;/a&gt; from Apache which shows how to do that. Besides JMeter is extensible, which supports plug-able components. Below are some of my favorite JMeter plugins from Google code project &lt;a href=&quot;http://code.google.com/p/jmeter-plugins/&quot; target=&quot;_blank&quot;&gt;jmeter-plugins&lt;/a&gt;:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Response Times Over Time&amp;nbsp;&lt;/li&gt;&lt;li&gt; Throughput Over Time&lt;/li&gt;&lt;li&gt;Response Times Distribution &lt;/li&gt;&lt;li&gt;Composite Graph &lt;/li&gt;&lt;/ul&gt;They are extremely useful specially sometimes you want to capture more real-time performance data, not just performance summary.&amp;nbsp; &lt;br /&gt;Below are some graphs from running load testing against a Solr server:&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-n-bY1pl38xk/ToKZWscroII/AAAAAAAAAB8/HWO7GCgPDoM/s1600/ResponseOverTime+-09-27.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;http://3.bp.blogspot.com/-n-bY1pl38xk/ToKZWscroII/AAAAAAAAAB8/HWO7GCgPDoM/s400/ResponseOverTime+-09-27.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Response Time Over Time&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-cgADyPPL6CU/ToKZXNe8GII/AAAAAAAAACA/QVy90MkQg5M/s1600/ThroughputOverTime+-+09-27.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;222&quot; src=&quot;http://2.bp.blogspot.com/-cgADyPPL6CU/ToKZXNe8GII/AAAAAAAAACA/QVy90MkQg5M/s400/ThroughputOverTime+-+09-27.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Throughput Over Time&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/8218621761242269797/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/09/jmeter-and-jmeter-plugins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8218621761242269797'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8218621761242269797'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/09/jmeter-and-jmeter-plugins.html' title='JMeter and JMeter Plugins'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-n-bY1pl38xk/ToKZWscroII/AAAAAAAAAB8/HWO7GCgPDoM/s72-c/ResponseOverTime+-09-27.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-5109534732507376464</id><published>2011-09-09T00:15:00.000-06:00</published><updated>2011-12-13T20:15:44.820-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DNS Flusher"/><category scheme="http://www.blogger.com/atom/ns#" term="FireBug"/><category scheme="http://www.blogger.com/atom/ns#" term="Firefox Addons"/><category scheme="http://www.blogger.com/atom/ns#" term="RESTClient"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="TamperData"/><category scheme="http://www.blogger.com/atom/ns#" term="UserAgentSwitcher"/><category scheme="http://www.blogger.com/atom/ns#" term="We Developer"/><category scheme="http://www.blogger.com/atom/ns#" term="WebDriver"/><title type='text'>My Favorite Firefox Addons</title><content type='html'>&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/firebug/&quot;&gt;FireBug&lt;/a&gt; : A must-have Firefox addon for front-end developers. You can monitor, change, and debug CSS, JavaScript, and HTML in any web pages.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/web-developer/&quot;&gt;Web Developer&lt;/a&gt;: Provides a toolkit to web developers including displaying cookie, cache, css, html form info etc.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/user-agent-switcher/&quot;&gt;User Agent Switcher&lt;/a&gt;: A tool to allow me to switch the user agent of a browser, for example, IE, iPhone etc.&amp;nbsp;                                             &lt;a class=&quot;button prominent  add installer&quot; data-hash=&quot;sha256:29b95958781bd1e03d0a217a9c34f382f542f5f3769c9c7bfc0b919cc89858b8&quot; href=&quot;https://addons.mozilla.org/firefox/downloads/latest/59/addon-59-latest.xpi?src=dp-btn-primary&quot;&gt;                  &lt;/a&gt;&lt;a class=&quot;button prominent  add installer&quot; data-hash=&quot;sha256:29b95958781bd1e03d0a217a9c34f382f542f5f3769c9c7bfc0b919cc89858b8&quot; href=&quot;https://addons.mozilla.org/firefox/downloads/latest/59/addon-59-latest.xpi?src=dp-btn-primary&quot;&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/tamper-data/&quot;&gt;Tamper Data &lt;/a&gt;: Monitor and modify HTTP/HTTPS requests including headers and query parameters.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/dns-flusher/&quot;&gt;DNS Flusher&lt;/a&gt; : Provides a easy way to reload changes made on hosts file.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;http://release.seleniumhq.org/selenium-ide/&quot;&gt;Selenium IDE&lt;/a&gt;: Provides record-and-playback of user interactions for web applications. It&#39;s a great tool to&amp;nbsp; speed up web site testing automation because the tool can generate scripts in multiple different languages (Java, C#, Ruby, Python etc) for Selenium RC and WebDriver. The current version is &lt;a href=&quot;http://release.seleniumhq.org/selenium-ide/1.4.1/selenium-ide-1.4.1.xpi&quot;&gt;1.4.1&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/restclient/&quot;&gt;RESTClient&lt;/a&gt;: A simple RESTFul web service test client for FireFox, which allows us to make calls to RESTFul web service. &lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/5109534732507376464/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/09/my-favorite-firefox-addons.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5109534732507376464'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5109534732507376464'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/09/my-favorite-firefox-addons.html' title='My Favorite Firefox Addons'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-4568869473137259452</id><published>2011-09-08T20:00:00.000-06:00</published><updated>2011-09-08T20:00:18.007-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FirefoxDriver"/><category scheme="http://www.blogger.com/atom/ns#" term="org.openqa.selenium.firefox.NotConnectedException"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium RC"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium Server"/><category scheme="http://www.blogger.com/atom/ns#" term="selenium-maven-plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Driver"/><title type='text'>Selenium - WebDriver common errors</title><content type='html'>&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Today  I am going to cover some common errors in Selenium/WebDriver. I am  going to cover Selenium 2.0/WebDriver in the next couple days.&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;i&gt;&lt;b&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:98)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.remote.RemoteWebDriver.&amp;lt;init&amp;gt;(RemoteWebDriver.java:86)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.FirefoxDriver.&amp;lt;init&amp;gt;(FirefoxDriver.java:127)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.FirefoxDriver.&amp;lt;init&amp;gt;(FirefoxDriver.java:78)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at com.waycoolsearch.tutorials.selenium.FirefoxDemo.main(FirefoxDemo.java:15)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Exception&lt;br /&gt; in thread &quot;main&quot; org.openqa.selenium.WebDriverException: Failed to &lt;br /&gt;connect to binary &lt;br /&gt;FirefoxBinary(/Applications/Firefox.app/Contents/MacOS/firefox-bin) on &lt;br /&gt;port 7055; process output follows:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;*** LOG addons.xpi: startup&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;*** LOG addons.xpi: Skipping unavailable install location app-system-share&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;***&lt;br /&gt; LOG addons.xpi: Ignoring file entry whose name is not a valid add-on &lt;br /&gt;ID: &lt;br /&gt;/var/folders/xB/xBaSjsAtG20bFBBLfybQQrHNbfw/-Tmp-/anonymous5249441637174664504webdriver-profile/extensions/webdriver-staging&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;*** LOG addons.xpi: checkForChanges&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;*** LOG addons.xpi: No changes found&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Build info: version: &#39;2.3.1&#39;, revision: &#39;unknown&#39;, time: &#39;2011-08-04 07:30:11&#39;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;System info: os.name: &#39;Mac OS X&#39;, os.arch: &#39;x86_64&#39;, os.version: &#39;10.6.8&#39;, java.version: &#39;1.6.0_24&#39;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Driver info: driver.version: FirefoxDriver&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:110)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:148)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.remote.RemoteWebDriver.&amp;lt;init&amp;gt;(RemoteWebDriver.java:86)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.FirefoxDriver.&amp;lt;init&amp;gt;(FirefoxDriver.java:127)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.FirefoxDriver.&amp;lt;init&amp;gt;(FirefoxDriver.java:78)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at com.waycoolsearch.tutorials.selenium.FirefoxDemo.main(FirefoxDemo.java:15)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:98)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;... 5 more&lt;/span&gt;&lt;init&gt;&lt;init&gt;&lt;init&gt;&lt;init&gt;&lt;init&gt;&lt;init&gt;&lt;br /&gt;&lt;/init&gt;&lt;/init&gt;&lt;/init&gt;&lt;/init&gt;&lt;/init&gt;&lt;/init&gt;&lt;/pre&gt;&lt;b&gt;Potential Root Cause&lt;/b&gt;: Selenium 2.3.1 doesn’t support FireFox 6.0.&lt;br /&gt;&lt;b&gt;How to fix&lt;/b&gt;:&lt;br /&gt;#. Downgrade FireFox 6.0 to FireFox 3&lt;br /&gt;#. Upgrade Selenium 2.5&lt;br /&gt;#. Use the Selenium Server/RC solution via JavaScript. &lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;java.lang.RuntimeException: Could not contact Selenium Server; have you started it on &#39;localhost:4444&#39; ?&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;java.lang.RuntimeException: Could not contact Selenium Server; have you started it on &#39;localhost:4444&#39; ?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Read more at http://seleniumhq.org/projects/remote-control/not-started.html&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Connection refused&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.thoughtworks.selenium.DefaultSelenium.start(DefaultSelenium.java:87)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.waycoolsearch.tutorials.selenium.FirefoxTest.setUp(FirefoxTest.java:24)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:597)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)&lt;/span&gt;&lt;/pre&gt;&lt;b&gt;Potential Root Cause&lt;/b&gt;: Selenium RC Server is not started yet&lt;br /&gt;&lt;b&gt;How to fix&lt;/b&gt;:&lt;br /&gt;#. Run the following command before you run the tests&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;java -jar selenium-server.jar&lt;br /&gt;&lt;/pre&gt;#. Add the following selenium-maven-plugin to pom.xml, which will start Selenium Server before you run integration tests.&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;artifactId&amp;gt;selenium-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;start-server&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;phase&amp;gt;pre-integration-test&amp;lt;/phase&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;goal&amp;gt;start-server&amp;lt;/goal&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;background&amp;gt;true&amp;lt;/background&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;id&amp;gt;stop-server&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;phase&amp;gt;post-integration-test&amp;lt;/phase&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;goal&amp;gt;stop-server&amp;lt;/goal&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;com.thoughtworks.selenium.SeleniumException: Connection refused&lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;com.thoughtworks.selenium.SeleniumException: Connection refused&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:111)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:90)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.thoughtworks.selenium.DefaultSelenium.open(DefaultSelenium.java:343)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.waycoolsearch.tutorials.selenium.FirefoxTest.testFireFox(FirefoxTest.java:34)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.lang.reflect.Method.invoke(Method.java:597)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Caused by: java.net.ConnectException: Connection refused&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.PlainSocketImpl.socketConnect(Native Method)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:351)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:213)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:200)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:432)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.Socket.connect(Socket.java:529)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at java.net.Socket.connect(Socket.java:478)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.NetworkClient.doConnect(NetworkClient.java:163)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.http.HttpClient.&amp;lt;init&amp;gt;(HttpClient.java:233)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.http.HttpClient.New(HttpClient.java:306)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.http.HttpClient.New(HttpClient.java:323)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:970)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:911)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:836)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1014)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.thoughtworks.selenium.HttpCommandProcessor.getOutputStreamWriter(HttpCommandProcessor.java:138)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.thoughtworks.selenium.HttpCommandProcessor.getCommandResponseAsString(HttpCommandProcessor.java:165)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at com.thoughtworks.selenium.HttpCommandProcessor.executeCommandOnServlet(HttpCommandProcessor.java:108)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ... 27 more&lt;/span&gt;&lt;/pre&gt;&lt;b&gt;Potential Root Cause&lt;/b&gt;: Selenium Server is not started and selenium.start is not in the code before you open a link&lt;br /&gt;&lt;b&gt;How to fix&lt;/b&gt;:&lt;br /&gt;# Start Selenium Server&lt;br /&gt;# Add selenium.start() before you call selenium.open(url)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Server Exception: sessionId should not be null; has this session been started yet? on session null&lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6470245033935169&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;5:08:38.846&lt;br /&gt; INFO - Got result: ERROR Server Exception: sessionId should not be &lt;br /&gt;null; has this session been started yet? on session null&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;15:08:38.845 ERROR - Exception running &#39;open &#39;command on session null&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;java.lang.NullPointerException: sessionId should not be null; has this session been started yet?&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.selenium.server.FrameGroupCommandQueueSet.getQueueSet(FrameGroupCommandQueueSet.java:216)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.selenium.server.commands.SeleniumCoreCommand.execute(SeleniumCoreCommand.java:34)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.selenium.server.SeleniumDriverResourceHandler.doCommand(SeleniumDriverResourceHandler.java:595)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.selenium.server.SeleniumDriverResourceHandler.handleCommandRequest(SeleniumDriverResourceHandler.java:393)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.selenium.server.SeleniumDriverResourceHandler.handle(SeleniumDriverResourceHandler.java:146)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1530)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1482)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.http.HttpServer.service(HttpServer.java:909)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:357)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:534)&lt;/span&gt;&lt;/pre&gt;&lt;b&gt;Potential Root Cause&lt;/b&gt;: Selenium server was started, however selenium.start() did not run before selenium.open&lt;br /&gt;&lt;b&gt;How to fix&lt;/b&gt;:&lt;br /&gt;# Add selenium.start() before selenium.open(url)&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/4568869473137259452/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/09/selenium-webdriver-common-errors.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/4568869473137259452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/4568869473137259452'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/09/selenium-webdriver-common-errors.html' title='Selenium - WebDriver common errors'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-2371845931202187141</id><published>2011-08-24T23:12:00.000-06:00</published><updated>2011-08-24T23:12:54.455-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Debug Java Web App"/><category scheme="http://www.blogger.com/atom/ns#" term="Java API for XML Processing"/><category scheme="http://www.blogger.com/atom/ns#" term="Java ClassLoader"/><category scheme="http://www.blogger.com/atom/ns#" term="JAXB"/><category scheme="http://www.blogger.com/atom/ns#" term="JAXP"/><category scheme="http://www.blogger.com/atom/ns#" term="SAXParserFactory"/><category scheme="http://www.blogger.com/atom/ns#" term="Xerces Impl"/><category scheme="http://www.blogger.com/atom/ns#" term="XInclude"/><title type='text'>SAXParserFactory Implementation Class Setup</title><content type='html'>As I mentioned in the JAXB tutorials &lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/08/jaxb-tutorial-part-2-jaxb-with-xinclude.html&quot;&gt;Part 2&lt;/a&gt;, you can write Java code like this to create a SAXParserFactory and make it to turn on the XInclude feature:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;SAXParserFactory spf = SAXParserFactory.newInstance();&lt;br /&gt;&lt;span style=&quot;color: red;&quot;&gt;spf.setXIncludeAware(true);&lt;/span&gt;&lt;/pre&gt;However sometimes you might be getting the following error message:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO]&lt;br /&gt; [talledLocalContainer] 2011-08-24 18:21:13,291 [main] ERROR &lt;br /&gt;org.apache.solr.core.CoreContainer &amp;nbsp;- &lt;br /&gt;java.lang.UnsupportedOperationException: This parser does not support &lt;br /&gt;specification &quot;null&quot; version &quot;null&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO] [talledLocalContainer] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;at javax.xml.parsers.SAXParserFactory.setXIncludeAware(SAXParserFactory.java:448)&lt;/span&gt;&lt;/pre&gt;which means the implementation class for &lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;javax.xml.parsers.SAXParserFactory does NOT support XInclude feature.&amp;nbsp; &lt;/span&gt;&lt;br /&gt;Here is how you can find out what the implementation was:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;log.info(&quot;SAXParserFactory Imp class=&quot; + spf.getClass().getName());&lt;/pre&gt;So easy, right? But how to override the class with a well-known SAXParserFactory class, for example, &lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;org.apache.xerces.jaxp.SAXParserFactoryImpl&lt;/span&gt;?&lt;br /&gt;Below are steps taken by Java API for XML &lt;span class=&quot;st&quot;&gt;Processing &lt;/span&gt;(JAXP) to find a &lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;javax.xml.parsers.SAXParserFactory implementation class&lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/span&gt;:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;javax.xml.parsers.SAXParserFactory system property&lt;/span&gt;&lt;/li&gt; &lt;li&gt;${JAVA_HOME}/lib/jaxp.properties&lt;/li&gt; &lt;li&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;META-INF/services/javax.xml.parsers.SAXParserFactory in jars available to the class loader&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt;For a standalone Java application, it&#39;s relatively easy. You can use &lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;META-INF/services/javax.xml.parsers.SAXParserFactory to override another implementation in the classpath. A web application running on a application container is more complicated because application containers are handling ClassLoader differently. In Websphere, it should solve the issue by adding &lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;META-INF/services/javax.xml.parsers.SAXParserFactory under a war file and changing class loader mode to parent last. And in tomcat, we can&#39;t change &lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;order for &lt;/span&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Class Loaders.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;Below are a couple lines of Java code to help find out what kind of classloader we are using: &lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;        String serviceId = &quot;META-INF/services/javax.xml.parsers.SAXParserFactory&quot;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InputStream is = null;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ClassLoader cl = JAXBUtils.class.getClassLoader();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; is = cl.getResourceAsStream(serviceId);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log.info(&quot;found jar resource=&quot; + serviceId + &quot; using ClassLoader: &quot; + cl);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BufferedReader rd = new BufferedReader(new InputStreamReader(is, &quot;UTF-8&quot;));&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String factoryClassName = rd.readLine();&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; log.info(&quot;Read SAXParserFactory Impl=&quot; + factoryClassName);&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rd.close();&lt;/span&gt;&lt;/pre&gt;Below is the output:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO]&lt;br /&gt; [talledLocalContainer] 2011-08-24 18:21:13,284 [main] INFO &lt;br /&gt;com.waycoolsearch.tutorials.jaxb.JAXBUtils &amp;nbsp;- found jar &lt;br /&gt;resource=META-INF/services/javax.xml.parsers.SAXParserFactory using &lt;br /&gt;ClassLoader: WebappClassLoader&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO] [talledLocalContainer] &amp;nbsp;&amp;nbsp;context:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO] [talledLocalContainer] &amp;nbsp;&amp;nbsp;delegate: false&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO] [talledLocalContainer] &amp;nbsp;&amp;nbsp;repositories:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO] [talledLocalContainer] &amp;nbsp;&amp;nbsp;&amp;nbsp; /WEB-INF/classes/&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO] [talledLocalContainer] ----------&amp;gt; Parent Classloader:&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;[INFO] [talledLocalContainer] org.apache.catalina.loader.StandardClassLoader@106fc94&lt;/span&gt;&lt;/pre&gt;After this, I just created a file &lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;javax.xml.parsers.SAXParserFactory&lt;/span&gt; under &lt;span id=&quot;internal-source-marker_0.6887158080364224&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;src/main/resources/META-INF/services with the following content, which overrides SAXParserFactory implementation class with Xerces impl: &lt;/span&gt;&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;org.apache.xerces.jaxp.SAXParserFactoryImpl&lt;/span&gt;&lt;/pre&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/2371845931202187141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/08/saxparserfactory-implementation-class.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/2371845931202187141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/2371845931202187141'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/08/saxparserfactory-implementation-class.html' title='SAXParserFactory Implementation Class Setup'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-8483148944209136223</id><published>2011-08-24T22:40:00.001-06:00</published><updated>2011-08-24T22:51:40.318-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Solr"/><category scheme="http://www.blogger.com/atom/ns#" term="Log4J"/><category scheme="http://www.blogger.com/atom/ns#" term="Velocity Logging"/><category scheme="http://www.blogger.com/atom/ns#" term="velocity.properties"/><title type='text'>Configuring Velocity log for Solr Browse</title><content type='html'>Solr browser allows us to setup Velocity properties, for example,&amp;nbsp; we can setup browse requestHandler using velocity.properties marked in &lt;span style=&quot;color: red;&quot;&gt;RED&lt;/span&gt; below:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.3848575371931209&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;requestHandler name=&quot;/browse&quot; class=&quot;solr.SearchHandler&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;arr name=&quot;first-components&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;str&amp;gt;redirect&amp;lt;/str&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/arr&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;lst name=&quot;defaults&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;str name=&quot;echoParams&quot;&amp;gt;explicit&amp;lt;/str&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- VelocityResponseWriter settings --&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;str name=&quot;wt&quot;&amp;gt;velocity&amp;lt;/str&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;str name=&quot;v.template&quot;&amp;gt;browse&amp;lt;/str&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;str name=&quot;v.layout&quot;&amp;gt;layout&amp;lt;/str&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: red;&quot;&gt;&amp;lt;str name=&quot;v.properties&quot;&amp;gt;velocity.properties&amp;lt;/str&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;…...&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;/requestHandler&amp;gt;&lt;/span&gt;&lt;/pre&gt;To change the log settings, for example, log file name and Log4J, you can add the following to velocity.properties under solr/config/:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.3848575371931209&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;runtime.log = logs/velocity.log&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem&lt;/span&gt;&lt;/pre&gt;You can find out &lt;a href=&quot;http://velocity.apache.org/engine/devel/developer-guide.html#Configuring_Logging&quot;&gt;how to configure logging for Velocity&lt;/a&gt;. Here is another link talking &lt;span style=&quot;font-size: small;&quot;&gt;about &lt;/span&gt;&lt;a href=&quot;http://minaret.biz/tips/tomcatLogging.html#tomcat_5_5_logging&quot;&gt;Logging for Apache Tomcat and Velocity using Log4j.    &lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/8483148944209136223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/08/configuring-velocity-log-for-solr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8483148944209136223'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/8483148944209136223'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/08/configuring-velocity-log-for-solr.html' title='Configuring Velocity log for Solr Browse'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-7332751555166081309</id><published>2011-08-23T00:12:00.000-06:00</published><updated>2011-08-23T00:12:35.867-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Maven"/><category scheme="http://www.blogger.com/atom/ns#" term="Build Management"/><category scheme="http://www.blogger.com/atom/ns#" term="Maven Assembly Plugin"/><title type='text'>Maven Assembly Plugin</title><content type='html'>&lt;a href=&quot;http://maven.apache.org/plugins/maven-assembly-plugin/assembly.html&quot;&gt;Maven Assembly Plugin&lt;/a&gt;&amp;nbsp; is very useful specially when you are trying to build different artifacts than the standard packages (jar, war etc). For example, I am building a web project, at the mean time, I want to add the configuration files so that I can build and deploy a rpm. &lt;br /&gt;Below is how I define the maven assembly plugin to make another artifact other than the main one:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid rgb(174, 189, 204); font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6067801719174776&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;build&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;finalName&amp;gt;${artifactId}&amp;lt;/finalName&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;artifactId&amp;gt;maven-assembly-plugin&amp;lt;/artifactId&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;version&amp;gt;2.2.1&amp;lt;/version&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;  &lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;id&amp;gt;make-assembly&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;phase&amp;gt;package&amp;lt;/phase&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;goal&amp;gt;attached&amp;lt;/goal&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/goals&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/execution&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/executions&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;descriptors&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;descriptor&amp;gt;src/main/assembly/assembly.xml&amp;lt;/descriptor&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/descriptors&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/configuration&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/plugin&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/plugins&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;/build&amp;gt;&lt;/span&gt;&lt;/pre&gt;Here is the assembly.xml generating a ${artifact.artifactId}.${artifact.version}-bin.tar.gz, which contains all of the files under config/ except config/data, and the main artifact for this maven project (${artifact.artifactId}.${artifact.extension}). &lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid rgb(174, 189, 204); font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&lt;span id=&quot;internal-source-marker_0.6067801719174776&quot; style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;assembly&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;id&amp;gt;bin&amp;lt;/id&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;formats&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;format&amp;gt;tar.gz&amp;lt;/format&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;/formats&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;includeBaseDirectory&amp;gt;false&amp;lt;/includeBaseDirectory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;fileSets&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;fileSet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;directory&amp;gt;${basedir}/config&amp;lt;/directory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;outputDirectory&amp;gt;/config&amp;lt;/outputDirectory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;includes&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;include&amp;gt;*/*&amp;lt;/include&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/includes&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;excludes&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;exclude&amp;gt;data/*&amp;lt;/exclude&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/excludes&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/fileSet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;/fileSets&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;dependencySets&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependencySet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;useTransitiveFiltering&amp;gt;false&amp;lt;/useTransitiveFiltering&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;outputFileNameMapping&amp;gt;${artifact.artifactId}.${artifact.extension}&amp;lt;/outputFileNameMapping&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;includes&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;include&amp;gt;com.waycoolsearch.tutorials.assembly:SampleWebapp&amp;lt;/include&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/includes&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;outputDirectory&amp;gt;/&amp;lt;/outputDirectory&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependencySet&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt; &amp;nbsp;&amp;lt;/dependencySets&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: transparent; color: black; font-family: Arial; font-size: 11pt; font-style: normal; font-variant: normal; font-weight: normal; text-decoration: none; vertical-align: baseline;&quot;&gt;&amp;lt;/assembly&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;If you are seeing the following error:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid rgb(174, 189, 204); font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;untar:  A lone zero block at XXXX&lt;br /&gt;&lt;/pre&gt;you can either change maven assembly plugin version or change artifact type to zip from tar.gz.&lt;br /&gt;&lt;div class=&quot;zemanta-pixie&quot; style=&quot;height: 15px; margin-top: 10px;&quot;&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/7332751555166081309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/08/maven-assembly-plugin.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/7332751555166081309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/7332751555166081309'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/08/maven-assembly-plugin.html' title='Maven Assembly Plugin'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-733779066419502773</id><published>2011-08-16T23:24:00.002-06:00</published><updated>2011-08-17T20:36:00.716-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Solr"/><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="JAXB marshaller/unmarshaller"/><category scheme="http://www.blogger.com/atom/ns#" term="sun jaxb impl"/><category scheme="http://www.blogger.com/atom/ns#" term="XercesImpl"/><category scheme="http://www.blogger.com/atom/ns#" term="XInclude"/><category scheme="http://www.blogger.com/atom/ns#" term="XPointer"/><title type='text'>JAXB Tutorial Part 2 - JAXB with XInclude and XPointer supports</title><content type='html'>In July, I wrote &lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/07/jaxb-tutorial.html&quot;&gt;JAXB tutorials Part 1&lt;/a&gt; - how we can use JAXB to convert XML to Java classes back and forth for implementing redirect rule component for Solr. When I defined more and more business rules, I found most of the rules have common components, which I don&#39;t want to copy common XML components (XML snippets) over and over to lots of files. At the mean time, I don&#39;t want to rewrite the rule component&amp;nbsp; just for&amp;nbsp; re-organizing XML, for example, I don&#39;t want to do special handling after I get a list of JAXB objects either. For now I believe XInclude will give me what I want. Today I am going to continue the tutorial by adding &lt;a href=&quot;http://www.w3.org/TR/xinclude/&quot;&gt;XInlcude&lt;/a&gt; and &lt;a href=&quot;http://www.w3.org/TR/xptr-framework/&quot;&gt;XPointer&lt;/a&gt; supports to JAXB implementation. Before I start the implementation, I would like to mention couple things about XInclude:&lt;br /&gt;1. &lt;a href=&quot;http://www.w3.org/TR/xinclude/&quot;&gt;XInclude&lt;/a&gt; defines an inclusion mechanism that facilitates modularity in XML documents.&amp;nbsp; Here is an example to include an xml file called redirects-general.xml:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;xi:include href=&quot;src/test/resources/redirects-general.xml&quot; xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot;&amp;gt;&lt;br /&gt;&amp;lt;/xi:include&amp;gt;&lt;br /&gt;&lt;/pre&gt;2. XInclude also supports inclusion of non-XML text documents as well. This inclusion process can also be thought of as XML infosets merge.&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;xi:include href=&quot;src/test/resources/redirects-general.xml&quot; xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot; parse=&quot;text&quot;&amp;gt;&lt;br /&gt;&amp;lt;/xi:include&amp;gt;&lt;br /&gt;&lt;/pre&gt;3. XInclude allows us to specify alternative document to include, when a resource cannot be loaded.&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;xi:include href=&quot;src/test/resources/redirects-general.xml&quot; xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot;&amp;gt;&lt;br /&gt;  &amp;lt;xi:fallback&amp;gt;&lt;br /&gt;    &amp;lt;xi:include href=&quot;alternative-redirects.xml&quot;/&amp;gt;&lt;br /&gt;  &amp;lt;/xi:fallback&amp;gt;&lt;br /&gt;&amp;lt;/xi:include&amp;gt;&lt;/pre&gt;4. XInclude  also supports partial XML inclusion - it is possible to use XPointer define which part(s) of an XML document need to be  included, for example:&lt;br /&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;xi:include href=&quot;src/test/resources/redirects-general-xp.xml&quot;&lt;br /&gt;  xpointer=&quot;element(/1/1)&quot;&amp;gt;&lt;br /&gt;&amp;lt;/xi:include&amp;gt;&lt;/pre&gt;&lt;h2&gt;First, you need to pick a JAXB implementation.&lt;/h2&gt;You are going to see slightly different results for different implementations. That&#39;s why it&#39;s important to pick a JAX implementation which works best for you if you have choice. ;-) I have used the following jaxb impls:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;sun jaxb impl&lt;/li&gt; &lt;/ul&gt;&lt;ol&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;com.sun.xml.bind&amp;lt;/groupId&amp;gt; &lt;br /&gt;  &amp;lt;artifactId&amp;gt;jaxb-impl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.1.3&amp;lt;/version&amp;gt; &lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;/pre&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;XercesImpl&lt;/li&gt; &lt;/ul&gt;&lt;ol&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;  &amp;lt;groupId&amp;gt;xerces&amp;lt;/groupId&amp;gt;&lt;br /&gt;  &amp;lt;artifactId&amp;gt;xercesImpl&amp;lt;/artifactId&amp;gt;&lt;br /&gt;  &amp;lt;version&amp;gt;2.9.1&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;/pre&gt;&lt;/ol&gt;Both jaxb implementations should work for the examples I am going to provide.&lt;br /&gt;&lt;h2&gt;Sample xml files &lt;/h2&gt;&lt;h3&gt;redirects-xinclude.xml&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;RedirectRules xmlns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&lt;br /&gt;xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&lt;br /&gt;xsi:schemaLocation=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect ../schemas/redirect.xsd &quot;&amp;gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;jaxb redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;jaxb&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/jaxb.php&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;annotation redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;java annotation&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/annotation1.php&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;   &amp;lt;xi:include href=&quot;src/test/resources/redirects-general.xml&quot; xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot;&amp;gt;&lt;br /&gt;      &amp;lt;xi:fallback&amp;gt;&lt;br /&gt;        &amp;lt;xi:include href=&quot;redirects-general.xml&quot;/&amp;gt;&lt;br /&gt;      &amp;lt;/xi:fallback&amp;gt;&lt;br /&gt;    &amp;lt;/xi:include&amp;gt;&lt;br /&gt;&amp;lt;/RedirectRules&amp;gt;&lt;/pre&gt;&lt;h3&gt;redirects-general.xml&lt;br /&gt;&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;general redirect&quot; xmlns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;general&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;/pre&gt;&lt;h3&gt;redirects-xinclude-xpointer.xml&lt;br /&gt;&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;RedirectRules&lt;br /&gt;	xmlns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&lt;br /&gt;	xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:xi=&quot;http://www.w3.org/2001/XInclude&quot;&lt;br /&gt;	xsi:schemaLocation=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect ../schemas/redirect.xsd &quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;	&amp;lt;RedirectRule name=&quot;jaxb redirect&quot;&amp;gt;&lt;br /&gt;		&amp;lt;Queries&amp;gt;&lt;br /&gt;			&amp;lt;Query&amp;gt;jaxb&amp;lt;/Query&amp;gt;&lt;br /&gt;		&amp;lt;/Queries&amp;gt;&lt;br /&gt;		&amp;lt;Redirects&amp;gt;&lt;br /&gt;			&amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/jaxb.php&lt;br /&gt;			&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;		&amp;lt;/Redirects&amp;gt;&lt;br /&gt;	&amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;	&amp;lt;xi:include href=&quot;src/test/resources/redirects-general-xp.xml&quot;&lt;br /&gt;		xpointer=&quot;element(/1/1)&quot;&amp;gt;&lt;br /&gt;		&amp;lt;xi:fallback&amp;gt;&lt;br /&gt;		&amp;lt;/xi:fallback&amp;gt;&lt;br /&gt;	&amp;lt;/xi:include&amp;gt;&lt;br /&gt;	&amp;lt;xi:include href=&quot;src/test/resources/redirects-general-xp.xml&quot;&lt;br /&gt;		xpointer=&quot;element(/1/2)&quot;&amp;gt;&lt;br /&gt;		&amp;lt;xi:fallback&amp;gt;&lt;br /&gt;		&amp;lt;/xi:fallback&amp;gt;&lt;br /&gt;	&amp;lt;/xi:include&amp;gt;&lt;br /&gt;&amp;lt;/RedirectRules&amp;gt;&lt;/pre&gt;&lt;h3&gt;redirects-general-xp.xml&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;RedirectRules xmlns=&quot;http://www.waycoolsearch.com/tutorials/search/jaxb/redirect&quot;&amp;gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;annotation redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;java annotation&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/java/annotation1.php&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&lt;br /&gt;  &amp;lt;RedirectRule name=&quot;general redirect&quot;&amp;gt;&lt;br /&gt;    &amp;lt;Queries&amp;gt;&lt;br /&gt;      &amp;lt;Query&amp;gt;general1&amp;lt;/Query&amp;gt;&lt;br /&gt;    &amp;lt;/Queries&amp;gt;&lt;br /&gt;    &amp;lt;Redirects&amp;gt;&lt;br /&gt;      &amp;lt;redirectURL&amp;gt;http://tutorials.waycoolsearch.com/&amp;lt;/redirectURL&amp;gt;&lt;br /&gt;    &amp;lt;/Redirects&amp;gt;&lt;br /&gt;  &amp;lt;/RedirectRule&amp;gt;&lt;br /&gt;&amp;lt;/RedirectRules&amp;gt;&lt;/pre&gt;&lt;h2&gt;Java Implementation &lt;/h2&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;/**&lt;br /&gt; * Unmarshal an xml file to an Object in the package specified as package name&lt;br /&gt; *&lt;br /&gt; * @param file - XML file name&lt;br /&gt; * @param packageName - Package name&lt;br /&gt; * @return unmarshalled object&lt;br /&gt; * @throws JAXBException&lt;br /&gt; */&lt;br /&gt;&lt;br /&gt;public static Object unmarshal(String file, String packageName)&lt;br /&gt;	throws JAXBException {&lt;br /&gt;try {&lt;br /&gt;	JAXBContext jc = JAXBContext.newInstance(packageName);&lt;br /&gt;	Unmarshaller u = jc.createUnmarshaller();&lt;br /&gt;	SAXParserFactory spf = SAXParserFactory.newInstance();&lt;br /&gt;&lt;br /&gt;	&lt;span style=&quot;color: red;&quot;&gt;spf.setXIncludeAware(true);&lt;br /&gt;	spf.setNamespaceAware(true);&lt;/span&gt;&lt;br /&gt;	spf.setValidating(true); // Not required for JAXB/XInclude&lt;br /&gt;&lt;br /&gt;	XMLReader xr = spf.newSAXParser().getXMLReader();&lt;br /&gt;	SAXSource source = new SAXSource(xr, new InputSource(&lt;br /&gt;		new FileInputStream(file)));&lt;br /&gt;	return u.unmarshal(source);&lt;br /&gt;} catch (FileNotFoundException e) {&lt;br /&gt;	throw new JAXBException(e);&lt;br /&gt;} catch (SAXException e) {&lt;br /&gt;	throw new JAXBException(e);&lt;br /&gt;} catch (ParserConfigurationException e) {&lt;br /&gt;	throw new JAXBException(e);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;h2&gt;Unit Testing&lt;/h2&gt;&lt;h3&gt;Test XInclude Only&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;/**&lt;br /&gt; * Test Xinclude&lt;br /&gt; *&lt;br /&gt; * @throws JAXBException&lt;br /&gt; */&lt;br /&gt;	@Test&lt;br /&gt;	public void testGetRedirectRulesWithXInclude() throws JAXBException {&lt;br /&gt;		List&amp;lt;RedirectRuleType&amp;gt; redirectRules = JAXBUtils&lt;br /&gt;				.getRedirectRules(&quot;src/test/resources/redirects-xinclude.xml&quot;);&lt;br /&gt;		for (RedirectRuleType redirectRule : redirectRules) {&lt;br /&gt;			logger.info(&quot;Name=&quot; + redirectRule.getName());&lt;br /&gt;			logger.info(&quot;Query=&quot; + redirectRule.getQueries().getQuery());&lt;br /&gt;			logger.info(&quot;redirectURL=&quot;&lt;br /&gt;					+ redirectRule.getRedirects().getRedirectURL());&lt;br /&gt;		}&lt;br /&gt;		Assert.assertEquals(3, redirectRules.size());&lt;br /&gt;&lt;br /&gt;		// This will ignore XInclude so that it still returns two rules instead&lt;br /&gt;		// of 3.&lt;br /&gt;		List&amp;lt;RedirectRuleType&amp;gt; redirectRules1 = JAXBUtils&lt;br /&gt;				.getRedirectRulesNoXInclude(&quot;src/test/resources/redirects-xinclude.xml&quot;);&lt;br /&gt;		Assert.assertEquals(2, redirectRules1.size());&lt;br /&gt;	}&lt;/pre&gt;&lt;h3&gt;Test XInclude with XPointer&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;/**&lt;br /&gt; * Test Xinclude with XPointer&lt;br /&gt; *&lt;br /&gt; * @throws JAXBException&lt;br /&gt; */&lt;br /&gt;	@Test&lt;br /&gt;	public void testGetRedirectRulesWithXIncludeXPointer() throws JAXBException {&lt;br /&gt;		List&amp;lt;RedirectRuleType&amp;gt; redirectRules = JAXBUtils&lt;br /&gt;				.getRedirectRules(&quot;src/test/resources/redirects-xinclude-xpointer.xml&quot;);&lt;br /&gt;		for (RedirectRuleType redirectRule : redirectRules) {&lt;br /&gt;			logger.info(&quot;Name=&quot; + redirectRule.getName());&lt;br /&gt;			logger.info(&quot;Query=&quot; + redirectRule.getQueries().getQuery());&lt;br /&gt;			logger.info(&quot;redirectURL=&quot;&lt;br /&gt;					+ redirectRule.getRedirects().getRedirectURL());&lt;br /&gt;		}&lt;br /&gt;		Assert.assertEquals(3, redirectRules.size());&lt;br /&gt;&lt;br /&gt;		// This will ignore XInclude so that it still returns two rules instead&lt;br /&gt;		// of 3.&lt;br /&gt;		List&amp;lt;RedirectRuleType&amp;gt; redirectRules1 = JAXBUtils&lt;br /&gt;				.getRedirectRulesNoXInclude(&quot;src/test/resources/redirects-xinclude-xpointer.xml&quot;);&lt;br /&gt;		Assert.assertEquals(1, redirectRules1.size());&lt;br /&gt;	}&lt;br /&gt;&lt;/pre&gt;&lt;h3&gt;Marshal/Unmarshal with XInclude/XPointer&lt;/h3&gt;&lt;pre style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;/**&lt;br /&gt; * Test Marshal and Unmarshal with xpointer&lt;br /&gt; *&lt;br /&gt; * @throws JAXBException&lt;br /&gt; */&lt;br /&gt;	@Test&lt;br /&gt;	public void testXPointer() throws JAXBException {&lt;br /&gt;		logger.info(&quot;Unmarshalling a xml file to an object... &quot;);&lt;br /&gt;		String packageName = &quot;com.waycoolsearch.tutorials.search.jaxb.redirect&quot;;&lt;br /&gt;		Object object = JAXBUtils.unmarshal(&lt;br /&gt;				&quot;src/test/resources/redirects-xinclude-xpointer.xml&quot;,&lt;br /&gt;				packageName);&lt;br /&gt;		logger.info(&quot;Marshalling an object back to a xml string... &quot;);&lt;br /&gt;		logger.info(JAXBUtils.marshal(object, packageName));&lt;br /&gt;	}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Have fun! Please let me know if you have any questions/issues.&lt;br /&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/733779066419502773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/08/jaxb-tutorial-part-2-jaxb-with-xinclude.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/733779066419502773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/733779066419502773'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/08/jaxb-tutorial-part-2-jaxb-with-xinclude.html' title='JAXB Tutorial Part 2 - JAXB with XInclude and XPointer supports'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-5503246481008793504</id><published>2011-08-13T15:28:00.000-06:00</published><updated>2011-08-13T15:28:04.800-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="infinite scrolling"/><category scheme="http://www.blogger.com/atom/ns#" term="JQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="Solr Browser for Nutch"/><title type='text'>Infinite scrolling in JavaScript with JQuery</title><content type='html'>Recently I was looking into how to implement infinite scrolling for Solr Browser for Nutch. I found it&#39;s pretty straightforward using JQuery, specially with helps from the links below:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://ajaxian.com/archives/implementing-infinite-scrolling-with-jquery&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to Implementing infinite scrolling with jQuery&quot;&gt;Implementing infinite scrolling with jQuery&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;http://www.webdeveloperjuice.com/2010/02/24/create-infinte-scroll-effect-using-jquery-with-demo/&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to How to : Create Infinte scroll effect using Jquery – With Demo&quot;&gt;How to : Create Infinte scroll effect using Jquery – With Demo&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;div class=&quot;PostHead&quot;&gt; 					 				&lt;/div&gt;&lt;a href=&quot;http://www.webresourcesdepot.com/load-content-while-scrolling-with-jquery/&quot;&gt;Load Content While Scrolling With jQuery&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;I found the following links are interesting too, however I haven&#39;t tried yet:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://flowplayer.org/tools/demos/scrollable/site-navigation.html&quot;&gt;JQuery Tools Scrollable&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;Have fun! </content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/5503246481008793504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/08/infinite-scrolling-in-javascript-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5503246481008793504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5503246481008793504'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/08/infinite-scrolling-in-javascript-with.html' title='Infinite scrolling in JavaScript with JQuery'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-1399068483182421715</id><published>2011-08-02T00:16:00.000-06:00</published><updated>2011-08-02T00:16:08.073-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="build-helper plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="Jamon template engine"/><category scheme="http://www.blogger.com/atom/ns#" term="jamon-maven-plugin"/><category scheme="http://www.blogger.com/atom/ns#" term="open source template engine"/><title type='text'>Jamon - An open source type-safe template engine</title><content type='html'>Last month, I covered a couple template engines: &lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/07/freemarker-open-source-template-engine.html&quot;&gt;FreeMarker&lt;/a&gt; and &lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/07/velocity-open-source-template-engine.html&quot;&gt;Velocity&lt;/a&gt;. Today I am going to cover &lt;a href=&quot;http://www.jamon.org/&quot;&gt;Jamon&lt;/a&gt; a little bit. Jamon is an open source template engine which ensures type-safety. What Jamon does is to generate java classes based on a Jamon template and Java Compiler will help make sure we pass in correct Java types to the templates. I am going to use the same examples I did for FreeMarker and Velocity: &lt;br /&gt;&lt;ul&gt;&lt;li&gt;Handle List in a Jamon template&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Include another Jamon template&lt;/li&gt;&lt;/ul&gt;1. Add the following dependency to your pom.xml&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt;      &amp;lt;groupId&amp;gt;org.jamon&amp;lt;/groupId&amp;gt;&lt;br /&gt;      &amp;lt;artifactId&amp;gt;jamon-runtime&amp;lt;/artifactId&amp;gt;&lt;br /&gt;      &amp;lt;version&amp;gt;2.4.0&amp;lt;/version&amp;gt;&lt;br /&gt;    &amp;lt;/dependency&amp;gt;&lt;/pre&gt;2.Add the following maven plugins&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;plugin&amp;gt;&lt;br /&gt;        &amp;lt;groupId&amp;gt;org.jamon&amp;lt;/groupId&amp;gt;&lt;br /&gt;        &amp;lt;artifactId&amp;gt;jamon-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;        &amp;lt;version&amp;gt;2.4.0&amp;lt;/version&amp;gt;&lt;br /&gt;        &amp;lt;configuration&amp;gt;&lt;br /&gt;          &amp;lt;templateSourceDir&amp;gt;src/main/jamon&amp;lt;/templateSourceDir&amp;gt;&lt;br /&gt;          &amp;lt;templateOutputDir&amp;gt;${basedir}/target/generated-sources/jamon&amp;lt;/templateOutputDir&amp;gt;&lt;br /&gt;        &amp;lt;/configuration&amp;gt;&lt;br /&gt;        &amp;lt;executions&amp;gt;&lt;br /&gt;          &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;phase&amp;gt;generate-sources&amp;lt;/phase&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;              &amp;lt;goal&amp;gt;translate&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;          &amp;lt;/execution&amp;gt;&lt;br /&gt;        &amp;lt;/executions&amp;gt;&lt;br /&gt;      &amp;lt;/plugin&amp;gt;&lt;br /&gt;&lt;br /&gt;      &amp;lt;plugin&amp;gt;&lt;br /&gt;        &amp;lt;groupId&amp;gt;org.codehaus.mojo&amp;lt;/groupId&amp;gt;&lt;br /&gt;        &amp;lt;artifactId&amp;gt;build-helper-maven-plugin&amp;lt;/artifactId&amp;gt;&lt;br /&gt;        &amp;lt;version&amp;gt;1.7&amp;lt;/version&amp;gt;&lt;br /&gt;        &amp;lt;executions&amp;gt;&lt;br /&gt;          &amp;lt;execution&amp;gt;&lt;br /&gt;            &amp;lt;id&amp;gt;add-source&amp;lt;/id&amp;gt;&lt;br /&gt;            &amp;lt;phase&amp;gt;generate-sources&amp;lt;/phase&amp;gt;&lt;br /&gt;            &amp;lt;goals&amp;gt;&lt;br /&gt;              &amp;lt;goal&amp;gt;add-source&amp;lt;/goal&amp;gt;&lt;br /&gt;            &amp;lt;/goals&amp;gt;&lt;br /&gt;            &amp;lt;configuration&amp;gt;&lt;br /&gt;              &amp;lt;sources&amp;gt;&lt;br /&gt;                &amp;lt;source&amp;gt;${project.build.directory}/generated-sources/jamon&lt;br /&gt;        &amp;lt;/source&amp;gt;&lt;br /&gt;              &amp;lt;/sources&amp;gt;&lt;br /&gt;            &amp;lt;/configuration&amp;gt;&lt;br /&gt;          &amp;lt;/execution&amp;gt;&lt;br /&gt;        &amp;lt;/executions&amp;gt;&lt;br /&gt;      &amp;lt;/plugin&amp;gt;&lt;/pre&gt;The first plugin (jamon-maven-plugin) generates java classes from Jamon templates under src/main/templates, and the second maven plugin adds the generated java classes (under target/generated-sources/jamon) to the source of the project so that Java compiler will compile them.&lt;br /&gt;3. Below are the two template files:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TestTemplate.jamon&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;%args&amp;gt;&lt;br /&gt;  String title;&lt;br /&gt;  String welcome;&lt;br /&gt;  String tutorial_url;&lt;br /&gt;  String tutorial_name;&lt;br /&gt;  java.util.List&amp;lt;String&amp;gt; list;&lt;br /&gt;&amp;lt;/%args&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;&amp;lt;% title %&amp;gt;&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;h1&amp;gt;&amp;lt;% welcome %&amp;gt;&amp;lt;/h1&amp;gt;&lt;br /&gt;  &amp;lt;hr/&amp;gt;&lt;br /&gt;Here is the link to &amp;lt;a href=&quot;&amp;lt;% tutorial_url %&amp;gt;&quot;&amp;gt;&amp;lt;% tutorial_name %&amp;gt;&amp;lt;/a&amp;gt;!&lt;br /&gt;&amp;lt;p/&amp;gt;&lt;br /&gt;Below are a  list of topics:&lt;br /&gt;&amp;lt;&amp;amp; /com/waycoolsearch/tutorials/jamon/ListTemplate; list = list &amp;amp;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;ListTemplate.jamon&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;%args&amp;gt;&lt;br /&gt;  java.util.List&amp;lt;String&amp;gt; list;&lt;br /&gt;&amp;lt;/%args&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;%java&lt;br /&gt;for (String value : list) {&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;&amp;lt;% value %&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;%java&lt;br /&gt;}&lt;br /&gt;%&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;4. Below are generated interface classes from Jamon templates under target/generated-sources/jamon:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TestTemplate.java&lt;/li&gt;&lt;li&gt;TestTemplateImpl.java&lt;/li&gt;&lt;li&gt;ListTemplate.java&lt;/li&gt;&lt;li&gt;ListTemplateImpl.java &lt;/li&gt;&lt;/ul&gt;5. Java code to generate text output from the templates&lt;br /&gt;&lt;ul&gt;&lt;li&gt;TestTemplateJamon.java&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;package com.waycoolsearch.tutorials.jamon;&lt;br /&gt;&lt;br /&gt;import java.io.ByteArrayOutputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.OutputStreamWriter;&lt;br /&gt;&lt;br /&gt;public class TestTemplateJamon {&lt;br /&gt; public static String getContent(final String title, final String welcome,&lt;br /&gt;   final String tutorial_url, final String tutorial_name,&lt;br /&gt;   final java.util.List&amp;lt;String&amp;gt; list) throws IOException {&lt;br /&gt;  ByteArrayOutputStream bo = new ByteArrayOutputStream();&lt;br /&gt;  OutputStreamWriter writer = new OutputStreamWriter(bo);&lt;br /&gt;  new TestTemplate().render(writer, title, welcome, tutorial_url,&lt;br /&gt;    tutorial_name, list);&lt;br /&gt;  return bo.toString();&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;ListTemplateJamon.java&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;package com.waycoolsearch.tutorials.jamon;&lt;br /&gt;&lt;br /&gt;import java.io.ByteArrayOutputStream;&lt;br /&gt;import java.io.IOException;&lt;br /&gt;import java.io.OutputStreamWriter;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;public class ListTemplateJamon {&lt;br /&gt;    public static String getContent(List&amp;lt;String&amp;gt; list) throws IOException {&lt;br /&gt;        ByteArrayOutputStream bo = new ByteArrayOutputStream();&lt;br /&gt;        new ListTemplate().render(new OutputStreamWriter(bo), list);&lt;br /&gt;&lt;br /&gt;        return bo.toString();&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;6. Test code &lt;br /&gt;&lt;ul&gt;&lt;li&gt;TestTemplateJamonTest.java&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;package com.waycoolsearch.tutorials.jamon;&lt;br /&gt;&lt;br /&gt;import java.util.Arrays;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import org.apache.log4j.Logger;&lt;br /&gt;import org.junit.Assert;&lt;br /&gt;import org.junit.Test;&lt;br /&gt;&lt;br /&gt;public class TestTemplateJamonTest {&lt;br /&gt; private static Logger log = Logger.getLogger(TestTemplateJamonTest.class);&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void testIncludeOutput() throws Exception {&lt;br /&gt;  List&amp;lt;String&amp;gt; list = Arrays.asList(&quot;JAXB&quot;, &quot;JAXP&quot;, &quot;Flex&quot;, &quot;Velocity&quot;,&lt;br /&gt;    &quot;Annotation&quot;, &quot;Hibernate&quot;);&lt;br /&gt;&lt;br /&gt;  String output1 = TestTemplateJamon.getContent(&lt;br /&gt;    &quot;Jamon tutorials&quot;, &quot;Welcome to Jamon tutorials!&quot;,&lt;br /&gt;    &quot;http://tutorials.waycoolsearch.com/java/&quot;, &quot;java tutorial&quot;,&lt;br /&gt;    list);;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  String output2 = ListTemplateJamon.getContent(list);&lt;br /&gt;&lt;br /&gt;  log.info(&quot;Output1 = &quot; + output1);&lt;br /&gt;  log.info(&quot;Output2 = &quot; + output2);&lt;br /&gt;  Assert.assertTrue(output1.contains(output2));&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;ListTemplateJamonTest.java&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;package com.waycoolsearch.tutorials.jamon;&lt;br /&gt;&lt;br /&gt;import java.util.Arrays;&lt;br /&gt;import java.util.List;&lt;br /&gt;&lt;br /&gt;import org.apache.log4j.Logger;&lt;br /&gt;import org.junit.Assert;&lt;br /&gt;import org.junit.Test;&lt;br /&gt;&lt;br /&gt;public class ListTemplateJamonTest {&lt;br /&gt; private static Logger log = Logger.getLogger(ListTemplateJamonTest.class);&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void testGenerateList() throws Exception {&lt;br /&gt;  List&amp;lt;String&amp;gt; list = Arrays.asList(&quot;JAXB&quot;, &quot;JAXP&quot;, &quot;Flex&quot;, &quot;Velocity&quot;,&lt;br /&gt;    &quot;Annotation&quot;, &quot;Hibernate&quot;);&lt;br /&gt;&lt;br /&gt;  String output = ListTemplateJamon.getContent(list);&lt;br /&gt;  log.info(output);&lt;br /&gt;  for (String value : list) {&lt;br /&gt;   Assert.assertTrue(output.contains(value));&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;/ul&gt;7. Console output&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;2011-08-02 00:01:18,055 [main] INFO  com.waycoolsearch.tutorials.jamon.ListTemplateJamonTest  - &amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXB&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXP&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Flex&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Velocity&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Annotation&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Hibernate&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;br /&gt;2011-08-02 00:01:18,065 [main] INFO  com.waycoolsearch.tutorials.jamon.TestTemplateJamonTest  - Output1 = &amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;Jamon tutorials&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;h1&amp;gt;Welcome to Jamon tutorials!&amp;lt;/h1&amp;gt;&lt;br /&gt;  &amp;lt;hr/&amp;gt;&lt;br /&gt;Here is the link to &amp;lt;a href=&quot;http://tutorials.waycoolsearch.com/java/&quot;&amp;gt;java tutorial&amp;lt;/a&amp;gt;!&lt;br /&gt;&amp;lt;p/&amp;gt;&lt;br /&gt;Below are a  list of topics:&lt;br /&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXB&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXP&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Flex&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Velocity&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Annotation&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Hibernate&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;2011-08-02 00:01:18,065 [main] INFO  com.waycoolsearch.tutorials.jamon.TestTemplateJamonTest  - Output2 = &amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXB&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXP&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Flex&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Velocity&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Annotation&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Hibernate&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;/pre&gt;&lt;br /&gt;You can download source code from &lt;a href=&quot;http://tutorial.waycoolsearch.com/java/JamonDemo.zip&quot;&gt;here&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/1399068483182421715/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/08/jamon-open-source-type-safe-template.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/1399068483182421715'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/1399068483182421715'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/08/jamon-open-source-type-safe-template.html' title='Jamon - An open source type-safe template engine'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-1730274580868014382</id><published>2011-07-31T17:41:00.000-06:00</published><updated>2011-07-31T17:41:57.894-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="#include"/><category scheme="http://www.blogger.com/atom/ns#" term="#parse"/><category scheme="http://www.blogger.com/atom/ns#" term="open source template engines in Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Velocity Include another template file"/><category scheme="http://www.blogger.com/atom/ns#" term="Velocity template"/><title type='text'>Velocity - An open source template engine</title><content type='html'>&lt;a href=&quot;http://velocity.apache.org/&quot;&gt;Velocity&lt;/a&gt; is an open source template engine by Apache. Today I am going to cover a little bit about how to generate text output based on Velocity templates, and how to include template(s) within a template.&lt;br /&gt;1. Add the following dependency to your pom.xml&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;br /&gt; &amp;lt;groupId&amp;gt;org.apache.velocity&amp;lt;/groupId&amp;gt;&lt;br /&gt; &amp;lt;artifactId&amp;gt;velocity&amp;lt;/artifactId&amp;gt;&lt;br /&gt; &amp;lt;version&amp;gt;1.7&amp;lt;/version&amp;gt;&lt;br /&gt;&amp;lt;/dependency&amp;gt;&lt;br /&gt;&lt;/pre&gt;2. Source code to apply Velocity template&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;package com.waycoolsearch.tutorials.velocity;&lt;br /&gt;&lt;br /&gt;import java.io.StringWriter;&lt;br /&gt;import java.io.Writer;&lt;br /&gt;&lt;br /&gt;import org.apache.log4j.Logger;&lt;br /&gt;import org.apache.velocity.Template;&lt;br /&gt;import org.apache.velocity.VelocityContext;&lt;br /&gt;import org.apache.velocity.app.Velocity;&lt;br /&gt;&lt;br /&gt;public class VelocityUtils {&lt;br /&gt;&lt;br /&gt; private static Logger log = Logger.getLogger(VelocityUtils.class);&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * private constructor&lt;br /&gt;  */&lt;br /&gt; private VelocityUtils() {&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * apply Velocity template&lt;br /&gt;  *&lt;br /&gt;  * @param templateFile&lt;br /&gt;  * @param Context&lt;br /&gt;  * @return&lt;br /&gt;  * @throws Exception&lt;br /&gt;  */&lt;br /&gt; public static String applyTemplate(String templateFile,&lt;br /&gt;   VelocityContext context) throws Exception {&lt;br /&gt;  try {&lt;br /&gt;   Velocity.init();&lt;br /&gt;&lt;br /&gt;   Template template = Velocity.getTemplate(templateFile);&lt;br /&gt;&lt;br /&gt;   Writer writer = new StringWriter();&lt;br /&gt;   template.merge(context, writer);&lt;br /&gt;   return writer.toString();&lt;br /&gt;&lt;br /&gt;  } catch (Exception e) {&lt;br /&gt;   log.error(e);&lt;br /&gt;   throw e;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;3.Below are the two template files:&lt;br /&gt;* test.vm&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;$title&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;h1&amp;gt;$welcome&amp;lt;/h1&amp;gt;&lt;br /&gt;  &amp;lt;hr/&amp;gt;&lt;br /&gt;Here is the link to &amp;lt;a href=&quot;${tutorial.url}&quot;&amp;gt;${tutorial.name}&amp;lt;/a&amp;gt;!&lt;br /&gt;&amp;lt;p/&amp;gt;&lt;br /&gt;Below are a  list of topics:&lt;br /&gt;#parse(&quot;src/test/templates/list.vm&quot;)&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;* list.vm&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;#foreach( $name in $list )&lt;br /&gt;&amp;lt;li&amp;gt;$name&amp;lt;/li&amp;gt;&lt;br /&gt;#end&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;/pre&gt;* testInclude.vm&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;$title&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;h1&amp;gt;$welcome&amp;lt;/h1&amp;gt;&lt;br /&gt;  &amp;lt;hr/&amp;gt;&lt;br /&gt;Here is the link to &amp;lt;a href=&quot;${tutorial.url}&quot;&amp;gt;${tutorial.name}&amp;lt;/a&amp;gt;!&lt;br /&gt;&amp;lt;p/&amp;gt;&lt;br /&gt;Below are a  list of topics:&lt;br /&gt;#include(&quot;src/test/templates/list.vm&quot;)&lt;br /&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;4. List in Velocity&lt;br /&gt;* Template&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;#foreach( $name in $list )&lt;br /&gt;&amp;lt;li&amp;gt;$name&amp;lt;/li&amp;gt;&lt;br /&gt;#end&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;/pre&gt;* Test Code&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;@Test&lt;br /&gt; public void testGenerateList() throws Exception {&lt;br /&gt;  VelocityContext context = new VelocityContext();&lt;br /&gt;  List&amp;lt;String&amp;gt; list = Arrays.asList(&quot;JAXB&quot;, &quot;JAXP&quot;, &quot;Flex&quot;, &quot;Velocity&quot;,&lt;br /&gt;    &quot;Annotation&quot;, &quot;Hibernate&quot;);&lt;br /&gt;  context.put(&quot;list&quot;, list);&lt;br /&gt;  String output = VelocityUtils.applyTemplate(&lt;br /&gt;    &quot;src/test/templates/list.vm&quot;, context);&lt;br /&gt;  log.info(output);&lt;br /&gt;  for (String value : list) {&lt;br /&gt;   Assert.assertTrue(output.contains(value));&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;/pre&gt;* Test Output&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;2011-07-31 16:42:27,013 [main] INFO  com.waycoolsearch.tutorials.velocity.VelocityUtilsTest  - &amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXB&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXP&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Flex&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Velocity&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Annotation&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Hibernate&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&lt;/pre&gt;5. Include another file&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;#parse(&quot;src/test/templates/list.vm&quot;)&lt;br /&gt;&lt;/pre&gt;6. Console Output&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;2011-07-31 16:42:27,042 [main] INFO  com.waycoolsearch.tutorials.velocity.VelocityUtilsTest  - &amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;Velocity tutorials&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;h1&amp;gt;Welcome to Velocity tutorials!&amp;lt;/h1&amp;gt;&lt;br /&gt;  &amp;lt;hr/&amp;gt;&lt;br /&gt;Here is the link to &amp;lt;a href=&quot;http://tutorials.waycoolsearch.com/java/&quot;&amp;gt;java tutorial&amp;lt;/a&amp;gt;!&lt;br /&gt;&amp;lt;p/&amp;gt;&lt;br /&gt;Below are a  list of topics:&lt;br /&gt;&amp;lt;ul&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXB&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;JAXP&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Flex&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Velocity&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Annotation&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;li&amp;gt;Hibernate&amp;lt;/li&amp;gt;&lt;br /&gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/pre&gt;7. Use #include to include&amp;nbsp; a file instead of using #parse&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;#include(&quot;src/test/templates/list.vm&quot;)&lt;br /&gt;&lt;/pre&gt;Below is console output:&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;2011-07-31 16:42:27,053 [main] INFO  com.waycoolsearch.tutorials.velocity.VelocityUtilsTest  - &amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;  &amp;lt;title&amp;gt;Velocity tutorials&amp;lt;/title&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;  &amp;lt;h1&amp;gt;Welcome to Velocity tutorials!&amp;lt;/h1&amp;gt;&lt;br /&gt;  &amp;lt;hr/&amp;gt;&lt;br /&gt;Here is the link to &amp;lt;a href=&quot;http://tutorials.waycoolsearch.com/java/&quot;&amp;gt;java tutorial&amp;lt;/a&amp;gt;!&lt;br /&gt;&amp;lt;p/&amp;gt;&lt;br /&gt;Below are a  list of topics:&lt;br /&gt;&lt;span style=&quot;background-color: red;&quot;&gt;&amp;lt;ul&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: red;&quot;&gt;#foreach( $name in $list )&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: red;&quot;&gt;&amp;lt;li&amp;gt;$name&amp;lt;/li&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: red;&quot;&gt;#end&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;background-color: red;&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;&lt;br /&gt;&amp;lt;/body&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;br /&gt;&lt;/pre&gt;8. Here are the test code:&lt;br /&gt;&lt;pre class=&quot;code&quot; style=&quot;background-color: #f3f5f7; border: 1pt solid #AEBDCC; font-family: courier,monospace; padding: 5pt; white-space: pre-wrap; word-wrap: break-word;&quot;&gt;package com.waycoolsearch.tutorials.velocity;&lt;br /&gt;&lt;br /&gt;import java.util.ArrayList;&lt;br /&gt;import java.util.Arrays;&lt;br /&gt;import java.util.HashMap;&lt;br /&gt;import java.util.List;&lt;br /&gt;import java.util.Map;&lt;br /&gt;&lt;br /&gt;import junit.framework.Assert;&lt;br /&gt;&lt;br /&gt;import org.apache.log4j.Logger;&lt;br /&gt;import org.apache.velocity.VelocityContext;&lt;br /&gt;import org.junit.Test;&lt;br /&gt;&lt;br /&gt;public class VelocityUtilsTest {&lt;br /&gt; private static final Logger log = Logger.getLogger(VelocityUtilsTest.class);&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void testGenerateList() throws Exception {&lt;br /&gt;  VelocityContext context = new VelocityContext();&lt;br /&gt;  List&amp;lt;String&amp;gt; list = Arrays.asList(&quot;JAXB&quot;, &quot;JAXP&quot;, &quot;Flex&quot;, &quot;Velocity&quot;,&lt;br /&gt;    &quot;Annotation&quot;, &quot;Hibernate&quot;);&lt;br /&gt;  context.put(&quot;list&quot;, list);&lt;br /&gt;  String output = VelocityUtils.applyTemplate(&lt;br /&gt;    &quot;src/test/templates/list.vm&quot;, context);&lt;br /&gt;  log.info(output);&lt;br /&gt;  for (String value : list) {&lt;br /&gt;   Assert.assertTrue(output.contains(value));&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void testIncludeOutput() throws Exception {&lt;br /&gt;  VelocityContext context = new VelocityContext();&lt;br /&gt;  context.put(&quot;title&quot;, &quot;Velocity tutorials&quot;);&lt;br /&gt;  context.put(&quot;welcome&quot;, &quot;Welcome to Velocity tutorials!&quot;);&lt;br /&gt;  Map&amp;lt;String, String&amp;gt; tutorial = new HashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;  context.put(&quot;tutorial&quot;, tutorial);&lt;br /&gt;  tutorial.put(&quot;url&quot;, &quot;http://tutorials.waycoolsearch.com/java/&quot;);&lt;br /&gt;  tutorial.put(&quot;name&quot;, &quot;java tutorial&quot;);&lt;br /&gt;&lt;br /&gt;  List&amp;lt;String&amp;gt; list = Arrays.asList(&quot;JAXB&quot;, &quot;JAXP&quot;, &quot;Flex&quot;, &quot;Velocity&quot;,&lt;br /&gt;    &quot;Annotation&quot;, &quot;Hibernate&quot;);&lt;br /&gt;  context.put(&quot;list&quot;, list);&lt;br /&gt;&lt;br /&gt;  String output1 = VelocityUtils.applyTemplate(&lt;br /&gt;    &quot;src/test/templates/test.vm&quot;, context);&lt;br /&gt;  String output2 = VelocityUtils.applyTemplate(&lt;br /&gt;    &quot;src/test/templates/list.vm&quot;, context);&lt;br /&gt;  log.info(output1);&lt;br /&gt;  log.info(output2);&lt;br /&gt;  Assert.assertTrue(output1.contains(output2));&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /**&lt;br /&gt;  * The following returns different results if list.vm contains dynamic contents like variables.&lt;br /&gt;  * #include(&quot;src/test/templates/list.vm&quot;)&lt;br /&gt;  * #parse(&quot;src/test/templates/list.vm&quot;)&lt;br /&gt;  * @throws Exception&lt;br /&gt;  */&lt;br /&gt;&lt;br /&gt; @Test&lt;br /&gt; public void testIncludeVsParse() throws Exception {&lt;br /&gt;  VelocityContext context = new VelocityContext();&lt;br /&gt;  context.put(&quot;title&quot;, &quot;Velocity tutorials&quot;);&lt;br /&gt;  context.put(&quot;welcome&quot;, &quot;Welcome to Velocity tutorials!&quot;);&lt;br /&gt;  Map&amp;lt;String, String&amp;gt; tutorial = new HashMap&amp;lt;String, String&amp;gt;();&lt;br /&gt;  context.put(&quot;tutorial&quot;, tutorial);&lt;br /&gt;  tutorial.put(&quot;url&quot;, &quot;http://tutorials.waycoolsearch.com/java/&quot;);&lt;br /&gt;  tutorial.put(&quot;name&quot;, &quot;java tutorial&quot;);&lt;br /&gt;&lt;br /&gt;  List&amp;lt;String&amp;gt; list = Arrays.asList(&quot;JAXB&quot;, &quot;JAXP&quot;, &quot;Flex&quot;, &quot;Velocity&quot;,&lt;br /&gt;    &quot;Annotation&quot;, &quot;Hibernate&quot;);&lt;br /&gt;  context.put(&quot;list&quot;, list);&lt;br /&gt;&lt;br /&gt;  String output1 = VelocityUtils.applyTemplate(&lt;br /&gt;    &quot;src/test/templates/test.vm&quot;, context);&lt;br /&gt;  String output2 = VelocityUtils.applyTemplate(&lt;br /&gt;    &quot;src/test/templates/testInclude.vm&quot;, context);&lt;br /&gt;&lt;br /&gt;  String output3 = VelocityUtils.applyTemplate(&lt;br /&gt;    &quot;src/test/templates/list.vm&quot;, context);&lt;br /&gt;  log.info(output1);&lt;br /&gt;  log.info(output2);&lt;br /&gt;  log.info(output3);&lt;br /&gt;  Assert.assertTrue(output1.contains(output3));&lt;br /&gt;  Assert.assertFalse(output2.contains(output3));&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;You can download source code from &lt;a href=&quot;http://tutorials.waycoolsearch.com/java/VelocityDemo.zip&quot;&gt;here&lt;/a&gt;.</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/1730274580868014382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/07/velocity-open-source-template-engine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/1730274580868014382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/1730274580868014382'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/07/velocity-open-source-template-engine.html' title='Velocity - An open source template engine'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4804832886308402838.post-5634160016143298479</id><published>2011-07-27T01:00:00.005-06:00</published><updated>2011-08-30T22:51:45.552-06:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apache Solr 3.3"/><category scheme="http://www.blogger.com/atom/ns#" term="Customized Solr Browser for Nutch"/><category scheme="http://www.blogger.com/atom/ns#" term="Nutch 1.3"/><title type='text'>A customized solr browser interface for Nutch</title><content type='html'>I created a solr.war file for Nutch based on Solr 3.3 browse GUI, which contains the following:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Customized solrconfig.xml&lt;/li&gt; &lt;li&gt;Customized Velocity templates&lt;/li&gt; &lt;/ul&gt;Below is a sample screenshot:&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-hr3OiRtaToY/Ti-4VXMiBOI/AAAAAAAAAB4/egHcW8Zkw08/s1600/Screen+shot+Solr+Browse+for+Nutch.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;208&quot; src=&quot;http://2.bp.blogspot.com/-hr3OiRtaToY/Ti-4VXMiBOI/AAAAAAAAAB4/egHcW8Zkw08/s400/Screen+shot+Solr+Browse+for+Nutch.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You can drop the war file under tomcat_home/webapps/. The war file should take care of solr setup automatically. You should be able to access http://localhost:&amp;lt;tomcat_port&amp;gt;/solr/browse after you start the solr application.&lt;br /&gt;The default solr config directory is in tomcat_home/webapps/solr/solr, however you can change it via web.xml under the directory&amp;nbsp;tomcat_home/webapps/solr/WEB-INF. The entry you should look for is below:&lt;br /&gt;&lt;pre class=&quot;source&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;env-entry&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;env-entry-name&amp;gt;solr/home&amp;lt;/env-entry-name&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;env-entry-value&amp;gt;./webapps/solr/solr&amp;lt;/env-entry-value&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;env-entry-type&amp;gt;java.lang.String&amp;lt;/env-entry-type&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;lt;/env-entry&amp;gt;&lt;/pre&gt;You can copy your index files to tomcat_home/webapps/solr/solr/data/index if you decide to use your old index data or you can run the following commands to reindex your Nutch data:&lt;br /&gt;&lt;pre class=&quot;source&quot;&gt;$NUTCH_RUNTIME/bin/nutch solrindex http://localhost:&lt;tomcat_port&gt;&amp;lt;&lt;/tomcat_port&gt;tomcat_port&lt;tomcat_port&gt;&amp;gt;/solr/ firstSite/crawldb firstSite/linkdb firstSite/segments/*&lt;br /&gt;&lt;/tomcat_port&gt;&lt;/pre&gt;Or &lt;br /&gt;&lt;pre class=&quot;source&quot;&gt;$NUTCH_RUNTIME/bin/nutch crawl firstSite/urls -solr http://localhost:&amp;lt;tomcat_port&amp;gt;&lt;tomcat_port&gt;/solr -depth 3 -topN 50&lt;br /&gt;&lt;/tomcat_port&gt;&lt;/pre&gt;Notes: the commands above are just examples.&lt;br /&gt;&lt;br /&gt;Click &lt;a href=&quot;http://tutorials.waycoolsearch.com/search/solr.war&quot;&gt;here&lt;/a&gt; to download the war file and let me know if it doesn&#39;t work for you.&lt;br /&gt;&lt;br /&gt;If you are not going to use Tomcat and you want to build the war by yourself, you can look at my previous posts for that:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/06/how-to-build-and-start-apache-solr.html&quot;&gt;How to build and start Apache Solr admin app from source with Maven&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href=&quot;http://thetechietutorials.blogspot.com/2011/06/solr-and-nutch-integration.html&quot;&gt;Solr and Nutch Integration&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt;&lt;br /&gt;Have fun with Solr and Nutch!</content><link rel='replies' type='application/atom+xml' href='http://blog.intellidiscovery.com/feeds/5634160016143298479/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.intellidiscovery.com/2011/07/customized-solr-browser-interface-for.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5634160016143298479'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4804832886308402838/posts/default/5634160016143298479'/><link rel='alternate' type='text/html' href='http://blog.intellidiscovery.com/2011/07/customized-solr-browser-interface-for.html' title='A customized solr browser interface for Nutch'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-hr3OiRtaToY/Ti-4VXMiBOI/AAAAAAAAAB4/egHcW8Zkw08/s72-c/Screen+shot+Solr+Browse+for+Nutch.png" height="72" width="72"/><thr:total>6</thr:total></entry></feed>