Skip to content

Instantly share code, notes, and snippets.

@daniel-perry
Created December 4, 2013 16:23
Show Gist options
  • Save daniel-perry/7790498 to your computer and use it in GitHub Desktop.
Save daniel-perry/7790498 to your computer and use it in GitHub Desktop.
This mahout example: https://cwiki.apache.org/confluence/display/MAHOUT/Quick+tour+of+text+analysis+using+the+Mahout+command+line assumes you know how to use maven to run apache lucene on some text.. which I didn't. This gist is a pom.xml file that will allow you to run the indicated maven command on the reuters text dataset, cobbled together fr…
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>dataproj.maven</groupId>
<artifactId>running-lucene-with-maven</artifactId>
<packaging>war</packaging>
<version>0.1</version>
<profiles>
<!-- Add profile configuration here -->
</profiles>
<dependencies>
<!-- Add dependencies here -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>4.6.0</version>
<type>jar</type>
<optional>false</optional>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-benchmark</artifactId>
<version>4.6.0</version>
<type>jar</type>
<optional>false</optional>
</dependency>
</dependencies>
<build>
<finalName>lucene-reuters</finalName>
<!-- Add filter configuration here -->
<!-- Add resources configuration here -->
<plugins>
<!-- Add plugin configuration here -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<configuration>
<executable>java</executable>
<arguments>
<argument>-Dmyproperty=myvalue</argument>
<argument>-classpath</argument>
<!-- automatically creates the classpath using all project dependencies,
also adding the project build directory -->
<classpath/>
<argument>com.example.Main</argument>
...
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment