In some DevOps scenarios, there is a need to integrate the generated application code to a pipeline where Git is used for SCM, Maven to compile it, and then other tools to take that code through testing to production.
: This is not the typical case. The 'single source of knowledge' in GeneXus projects is the Knowledge Base
at GeneXus Server
and GeneXus Server is the recommended tool for SCM.
Anyway, for the reason exposed in the first sentence in some companies, the Deployment target "Local (sources)" in the Application Deployment tool.
When you select that target and deploy, the source code, resources, and libraries corresponding to the selected Deployment Unit Object are copied to a specific folder structure.
These files can then be put under version control, with Git, for example.
This target also allows generating the pom.xml file required to compile the application with Maven. For that, you must set the "Generate Maven pom file" property to True.
When you set that property to True, a couple of new properties appear. "Maven path for local libs", where you can set the path where Maven expects the required jars (libs) for the compilation of the app to be, for the case that no Maven dependency is known, and "Maven Version" which will help you easily identify the version on the Maven compiled application.
To generate the pom.xml, GeneXus uses a template named Maven.pom.stg that is copied to the Knowledge base directory so that you can change it adding your plugins, profiles, reference parent files, etc.
That template is a template group of StringTemplate? which has the skeleton of theXMLl and references to subtemplates that you can change if you need.
It is available in the GeneXus of the GeneXus Beta Channel. To enable the feature, you must create a file named 'localsources.deploy' in the GeneXus installation directory.