This article shows how to package and publish a Module object to a Modules Server.
When you right-click on a module, you have two options for packaging and publishing
- Package Module ...
- With this option, you can package and optionally also publish the module
- Publish Module ...
- With this option, you can publish an already packaged module
When you package a module, you must add specific information for packaging and distribution.
In the information tab, you have to set several Module Object Properties to set.
Also, you can define external resources (File object) to be added, in the Resources Tab.
Read more at Module object to know the meaning and objective of each property.
The available platforms correspond to Environments (and the associated Generators) of the Knowledge Base. You can select the Generators for the ones you want to package (i.e. Java, .NET, .NET Framework, Android, Apple)
After setting all the properties, you can just Package, or Package & Publish.
- Building. GeneXus builds the Module for each selected environment. (GeneXus actually 'Rebuild's it)
- Packaging. GeneXus creates a package that contains the binaries and module definition files.
In this specific case, it generated a "<Knowledge Base Directory>\modules\mymodule_1.0.opc" file. (The 'opc' extension stands for Open Packaging Convention; it is a zip file)
The binary is created with the provided version and copyright information.
The 'Publish Module ...' option lets you publish a module that is already packaged. It opens the same dialog as the 'Package Module ...' option, with all fields read-only.
When you publish a module to a Modules Server, GeneXus does one of the following, depending on the server's type:
- Directory: GeneXus copies the packaged module to the corresponding folder
- Nexus: GeneXus uploads the packaged module to the Nexus' maven or NuGet repository.
Probably because the settings.xml file that indicates the key is not correct. Make sure that with that user and password you can log in on Nexus.
Probably this is due to the fact that when configuring the Server Source the full URL of a Nexus repository was not set.