Git Product home page Git Product logo

maven-karma-webjars-example's Introduction

Maven+Karma+Webjars

This is an example project that runs JavaScript unit tests (in this case Jasmine tests) driven by the Karma test runner during a Maven build. It also uses Webjars to manage web-resource dependencies.

This type of setup might be encountered in a Java service + Web UI project for example, or in an enterprise environment where CI builds are standardised around a Java + Maven workflow.

For more information check out this blog post describing the example.

Technologies / libraries used

  • Java 1.7+
  • Servlet 3.0
  • Maven 3+
  • Webjars
  • maven-frontend-plugin
  • Node.js
  • Karma
  • Jasmine
  • AngularJS

Getting started

Required environment

To build and run this project you will need the following environment:

  • Java 1.7+ (required for Jetty)
  • Maven 3.0+ (tested on Maven 3.0.5)

Optionally:

  • An IDE (e.g. Eclipse)
  • Node.js (if you want to run other Node packages outside the CI build)

Running locally

Run the project using the Jetty configuration specified in the POM file:

>> mvn jetty:run

Then access the project at:

http://localhost:8080/maven-karma-webjars-example/index.html

Note you can also run the application on any Servlet 3.0 compliant container (e.g. Apache Tomcat etc.).

Running the CI build

The full CI build, including JS unit test execution, can be run via Maven:

>> mvn clean install

License

This project and all of its contents are release under the Apache 2.0 License.

maven-karma-webjars-example's People

Contributors

jfnavin avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.