-
Notifications
You must be signed in to change notification settings - Fork 0
Module Generation
Coretex platform has an ability to generate a new module using Gradle command ./gradlew moduleGen
There are two possible types of modules (regular and web)
Each of these modules has a specific set of parameters.
Regular modules using to encapsulate server logic that dedicated to using as a library.
To generate regular module structure use command ./gradlew moduleGen -Darchetype=regular_module
This command has the following parameters that can be defined bay two ways.
- Define like additional parameters to command example: -Dparam=parm_value
- Will prompt additional params after executing
./gradlew moduleGen -Darchetype=regular_module
- projectPath => Path where module will be generated (example: /modules/test/archetype)
- projectName => Name of the project folder
- moduleName => Module name defined for platform
- packagePath => Source package path (example: com/coretex)
Module structure will be generated automatically and all absent folders and file will be generated
Full command example: ./gradlew moduleGen -Darchetype=regular_module -DprojectPath=/modules/example -DprojectName=exampleProject -DmoduleName=exampleModule -DpackagePath=com/example/project
Web module has few differences in comparison with regular module. The structure is similar but additionally exist web.xml file and preconfigured folder structure to creating front-end part. Each web module will be deployed to a separate context path.
Note: make sure that the newly defined context path hasn't conflict with already exist.
- projectPath => Path where module will be generated (example: /modules/test/archetype)
- projectName => Name of the project folder
- moduleName => Module name defined for platform
- packagePath => Source package path (example: com/coretex)
- webContextPath => Context path for separate context deployment
Full command example: ./gradlew moduleGen -Darchetype=web_module -DprojectPath=/modules/example -DprojectName=exampleProject -PmoduleName=exampleModule -DpackagePath=com/example/project -DwebContextPath=example
If execute the following command ./gradlew moduleGen --no-daemon -DallArchetypes
you will get JSON formated description list of modules