generator-mtaproject
v0.1.13
Published
Creates a fully configured and deployable MTA project
Downloads
680
Maintainers
Readme
generator-mtaproject
A powerful Yeoman generator for creating fully configured SAP MTA projects with SAP CAP, SAP Fiori, and automated SAP BTP deployment support.
Please note: On Windows, make must be installed. Otherwise, the script will fail during mbt build before deployment.
Features
- Freely configurable project name
- Optional
cds addcomponents:hanaworkzone-standardapprouterxsuaamta
- Optional creation of:
- example
schema.cds - example CAP service
- example
- Create any number of SAP Fiori apps using the
@sap/fiorigenerator - Automatic deployment to multiple SAP BTP targets
- Automatic maintenance of redirect URIs in
xs-security.json - Automatic generation of a
README.mdcontaining:- service URLs
- application URLs
- target-specific information
- Configuration files can be saved and reused later
Requirements
The following tools must be installed globally:
- Node.js
- Yeoman
- SAP CDS Development Kit
- SAP Fiori Generator
Install required tools:
npm install -g yo
npm install -g @sap/cds-dk
npm install -g @sap/generator-fioriSAP CLI Tools Installation Tutorial
A dedicated video tutorial showing how to install the SAP CLI tools is available here:
https://youtu.be/4gPXgPQLRsg
Installation
Install the generator globally:
npm install -g generator-mtaprojectUsage
Create a new project:
yo mtaprojectUse a previously saved configuration:
yo mtaproject --configfile <saved configfile>Example:
yo mtaproject --configfile myproject-config.jsonWhat the Generator Can Do
SAP CAP Project Setup
Automatically creates and configures:
- CAP project structure
- HANA configuration
- XSUAA configuration
- Approuter configuration
- MTA configuration
- Work Zone support
Example CDS Content
Optional generation of:
db/schema.cds- CAP service definitions
- Example entities and projections
SAP Fiori App Generation
The generator can create multiple SAP Fiori applications during setup.
Internally it uses:
@sap/generator-fiori
This allows flexible generation of:
- SAP Fiori Elements apps
- SAPUI5 freestyle apps
- OData V4 applications
Multi-Target Deployment
Supports automatic deployment to multiple SAP BTP targets.
Examples:
- DEV
- TEST
- QA
- PROD
The generator can automatically:
- build the MTA
- deploy the application
- configure destinations
- maintain redirect URIs
Automatic Redirect URI Maintenance
The generator automatically updates:
xs-security.jsonwith the required redirect URIs for all generated applications and SAP BTP targets.
Auto-Generated README
A project-specific README.md can be generated automatically containing:
- service URLs
- application URLs
- target information
- deployment information
Configuration Files
During generation, settings can optionally be saved into a configuration file.
Benefits:
- reuse configurations
- quickly recreate projects
- modify settings later
- standardize project templates
Example:
yo mtaproject --configfile customer-a.jsonExample Workflow
- Start the generator
- Select CAP components
- Create sample CDS model
- Generate SAP Fiori apps
- Configure SAP BTP targets
- Deploy automatically
- Receive generated documentation
Technologies
- Node.js
- Yeoman
- SAP CAP
- SAP HANA
- SAP BTP
- SAP Fiori
- SAPUI5
- MTA
- XSUAA
- Approuter
License
MIT
History
- 0.1.1 : Initial release with core features
- 0.1.2 : Automatic deployment and redirect URI maintenance
- 0.1.3 : ci/cd Push to npmjs.com
- 0.1.4 : Bugfixes (logs, deployment) - Add Readme
- 0.1.5 : Using console.log() instead of this.log() for better output formatting
- 0.1.6 : Service Name adjustment, roles (xs-security.json and service), mock users in package.json
- 0.1.7 : Some Bugfixes (redirect URIs without AppRouter), Adding check for OData Version 4.01 in manifest.json of the apps
- 0.1.8 : Adding Destination for OData Service in mta.yaml, add sample xml View for UI5 Apps, add next Steps in generated Projekt readme.md
- 0.1.9 : Change Names of Role-Collections (in mta.yaml)
- 0.1.10 : Problems with CI/CD fixed
- 0.1.11 : When selecting spaces for deployment, spaces that have already been selected are filtered out
- 0.1.12 : Automatic redeployment after add the redirect URIs to the xs-security.json
- 0.1.13 : Adding outputs in console
