Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Fixed
-
3.0.0
-
None
Description
The method org.onehippo.cms7.essentials.dashboard.utils.DependencyUtils#upgradeToEnterpriseProject is built to update a Community project to an Enterprise edition. It leaves the project in error when using it:
- in the main pom.xml of the project the artifact id is incorrect (populated with the group id)
- the existing version must be maintained and is now removed (see note about this below)
- the extra enterprise maven repository is not set
It is possible to not use code for adding the extra maven repository, but use the plugin descriptor for that. This part needs to be added to the descriptor:
"repositories": [
{ "@type": "repository", "id": "hippo-maven2-enterprise", "name": "Hippo Enterprise Maven 2", "url": "https://maven.onehippo.com/maven2-enterprise", "targetPom": "project", "releases": { "@type": "releases", "updatePolicy": "never", "checksumPolicy": "fail" }}
]
But there is something missing in the class org.onehippo.cms7.essentials.dashboard.model.RepositoryRestful for this. The mapping for the "releases" part is not defined in the class, and must be added.
Note that using the descriptor to add the dependency for the cms edition indicator will not work. It will be added before the parent pom is changed, and its version number comes from that parent pom. Building the project will fail. So the cms indicator dependency should also be added by code in this case. OR, other solution: update the options for the descriptor, and make it possible to configure the parent pom there as well.
Setting the correct version of the enterprise edition remains the responsability of the developer that uses a feature to upgrade to enterprise. It will normally work, when enterprise and community edition versions are the same. The description of the plugin should have a warning for that.
Attachments
Issue Links
- causes
-
ESSENTIALS-1042 Extend the plugin descriptor processing to also configure releases information for repositories
- Closed
-
ESSENTIALS-1045 Extend maven repositories snapshot descriptors
- Closed