How to create WAR file using grunt for dev server deployement

2.9k views Asked by At

I am using grunt,bower and yeoman for my angularjs web applicaiton. My UI code is ready for deployment. I want to create a .WAR file for deployment.

I installed "grunt-war" dependency using bower and I configured following code in my registerGruntTask.js file

grunt.loadNpmTasks('grunt-war');

grunt.initConfig({

  /*
   * Build a WAR (web archive) without Maven or the JVM installed.
   */
  war: {
    target: {
      options: {
        war_dist_folder: '<%= target %>',
        war_name: 'sm-ui',
        webxml_welcome: 'index.html',
        webxml_display_name: 'sm-ui',
        webxml_mime_mapping: [ 
{ 
  extension: 'woff', 
    mime_type: 'application/font-woff' 
} ]
      },
      files: [
        {
          expand: true,
          cwd: '<%= target %>',
          src: ['**'],
          dest: ''
        }
      ]
    }
  }
});

Then, I entered "grunt build" and "grunt war" in my command line. But, Nothing is creating. Please help me out.

0

There are 0 answers