angular-war-packager
v1.0.2
Published
Packages an Angular 18+ project into a WAR file with a web.xml.
Downloads
14
Readme
📦 angular-war-packager
Packages Angular applications (v18+) as .war files ready for Java EE servers, including an automatic WEB-INF/web.xml.
🚀 Installation
Global:
npm install -g angular-war-packagerOr local (dev dependency):
npm install --save-dev angular-war-packager🔽 Or download the .tgz package directly:
⬇️ Download angular-war-packager-x.x.x.tgz
⚙️ Usage
npx ng-warFull example:
npx ng-war --output dist/myapp.war --context MyAngularApp --dist-folder dist🔧 Available options
| Parameter | Description |
|-----------------------|---------------------------------------------------------------------------|
| --output, -o | Name of the generated WAR (default: dist/app.war) |
| --context, -c | Context name used in web.xml (default: AngularApp) |
| --dist-folder, -d | Path to the output folder from ng build (default: dist/) |
📂 Generated structure
dist/
└── app.war
├── index.html
├── assets/
└── WEB-INF/
└── web.xml🧪 Quick test
ng new angular-war-test
cd angular-war-test
ng build
npx ng-war🛡️ Requirements
- Node.js 16+
- Angular CLI with
ng buildexecuted
🧬 Automation with GitHub Actions
This project can be published automatically to npm with a v* tag push. See the workflow at:
.github/workflows/publish-npm.yml📄 License
Apache License 2.0 ©Dario Alves
