我想在没有maven的情况下生成我的AngularJS项目的war文件。
以下是我的项目结构
我的 app 文件夹具有以下结构
使用 Eclipse 项目,但无需使用它创建战争。
我在我的机器上安装了grunt, grunt-war
。
请查看我的package.json
文件
{
"name": "abc",
"version": "0.0.0",
"dependencies": {
},
"devDependencies": {
"grunt": "~0.4.1",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-concat": "~0.3.0",
"grunt-contrib-coffee": "~0.7.0",
"grunt-contrib-uglify": "~0.2.0",
"grunt-contrib-jshint": "~0.6.0",
"grunt-contrib-cssmin": "~0.6.0",
"grunt-contrib-connect": "~0.3.0",
"grunt-contrib-clean": "~0.4.1",
"grunt-contrib-htmlmin": "~0.1.3",
"grunt-contrib-imagemin": "~0.1.4",
"grunt-contrib-watch": "~0.4.0",
"underscore.string": "~2.3.1",
"grunt-usemin": "~0.1.11",
"grunt-rev": "~0.1.0",
"grunt-karma": "~0.6.2",
"grunt-open": "~0.2.0",
"grunt-concurrent": "~0.3.0",
"cheerio": "0.12.0",
"matchdep": "~0.1.2",
"connect-livereload": "~0.2.0",
"grunt-ngmin": "~0.0.2",
"mustache": "~0.7.2",
"grunt-mcompile": "~0.1.2",
"grunt-contrib-less": "~0.10.0",
"expect.js": "*",
"CSSselect": "0.3.1",
"CSSwhat": "0.2.0",
"karma": "0.10.9",
"karma-chrome-launcher": "~0.1",
"karma-coffee-preprocessor": "~0.1",
"karma-firefox-launcher": "~0.1",
"karma-jasmine": "~0.1",
"karma-phantomjs-launcher": "~0.1",
"karma-ng-html2js-preprocessor":"~0.1",
"grunt-angular-templates": "~0.5.3"
},
"engines": {
"node": ">=0.8.0"
}
}
但我不知道如何编写gruntfile.js
来构建上述应用程序结构的war文件。
我尝试使用grunt-war
click here
通过以下操作,我可以创建 .war ,但它只包含 web.xml
帮助我完成这件事......