Skip to content

Instantly share code, notes, and snippets.

@arey
Created March 4, 2014 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arey/9342883 to your computer and use it in GitHub Desktop.
Save arey/9342883 to your computer and use it in GitHub Desktop.
jasmine-maven-plugin configuration testing JavaScript code of a Java web app with Jasmine
<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>com.javaetmoi.samples</groupId>
<version>1.0-SNAPSHOT</version>
<artifactId>jasmine-test-webapp</artifactId>
<name>JavaEtMoi Samples :: ${project.artifactId} - ${project.packaging}</name>
<packaging>war</packaging>
<description>Maven configuration to test JavaScript code of a Java web app with Jasmine et PhantomJS</description>
<inceptionYear>2014</inceptionYear>
<url>https://github.com/arey/js-test-webapp</url>
<build>
<plugins>
<plugin>
<groupId>com.github.searls</groupId>
<artifactId>jasmine-maven-plugin</artifactId>
<version>1.3.1.4</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<jsSrcDir>${project.basedir}/src/main/webapp/static/js</jsSrcDir>
<jsTestSrcDir>${project.basedir}/src/test/javascript</jsTestSrcDir>
<preloadSources>
<source>/lib/jquery-2.1.0.min.js</source>
</preloadSources>
</configuration>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment