[API] Run npm tests during maven build

This commit is contained in:
Victor Woeltjen 2016-01-08 12:10:42 -08:00
parent 39c1a885d8
commit 82094477a3

62
pom.xml
View File

@ -80,52 +80,36 @@
</configuration>
</plugin>
<!-- Get PhantomJS plugin -->
<!-- Run specs using npm -->
<plugin>
<groupId>com.github.klieber</groupId>
<artifactId>phantomjs-maven-plugin</artifactId>
<version>0.2.1</version>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>0.0.26</version>
<configuration>
<installDirectory>target</installDirectory>
<nodeVersion>v0.12.2</nodeVersion>
<npmVersion>2.7.6</npmVersion>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install</goal>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>javascript tests</id>
<goals>
<goal>karma</goal>
</goals>
</execution>
</executions>
<configuration>
<version>1.9.2</version>
</configuration>
</plugin>
<!-- Run specs -->
<!-- https://github.com/detro/phantomjs-jasminexml-example -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>Jasmine Specs</id>
<phase>test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<workingDirectory>.</workingDirectory>
<arguments>
<argument>platform/framework/test/lib/run_jasmine_test.coffee</argument>
<argument>test.html</argument>
<argument>${project.build.directory}/platform-test-results.html</argument>
</arguments>
</configuration>
</execution>
</executions>
<configuration>
<executable>${phantomjs.binary}</executable>
</configuration>
</plugin>