-
Notifications
You must be signed in to change notification settings - Fork 59
Maven
In order to use StormCV you needs its jar file and dependencies on the classpath. You can either download all jar files (see the lib directory within the stormcv_examples project) or use Maven to do this dependency management for you. Add the lines below to your pom.xml file to include all the libraries. Since StormCV is not (yet) released in maven central you need to add the repository where StormCV is currently hosted. See the stormcv-deploy project for a full example of a pom file
<repository>
<id>StormCV repo</id>
<url>http://github.com/sensorstorm/maven/raw/master/releases/</url>
</repository>
In addition you need dependencies for both StormCV 0.7.0 and Storm 0.9.2.
<dependency>
<groupId>nl.tno</groupId>
<artifactId>stormcv</artifactId>
<version>0.7.0</version>
</dependency>
<dependency>
<groupId>org.apache.storm</groupId>
<artifactId>storm-core</artifactId>
<version>0.9.2-incubating</version>
<scope>provided</scope>
</dependency>
If you want to package the jar file you will have to add the maven assembly plugin as shown below (there are different ways to do this though).
<build>
<finalName>your-project-name-${project.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>false</includePluginDependencies>
<classpathScope>compile</classpathScope>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
See the pom file within the stormcv_deploy project for a full example.