Create UpgradeSettingsCommandlet #759
Labels
configuration
should be configurable or configuration change
enhancement
New feature or request
settings
ide-settings repo and replated processes and features
As a IDEasy user comming from a devonfw-ide project, I want to have a command to upgrade my settings from devonfw-ide to IDEasy so that I can get rid of all legacy after all my team members have already switched to IDEasy.
An
UpgradeSettingsCommandlet
shall be added so I can runide upgrade-settings
to upgrade my settings:devon.properties
are renamed toide.properties
. In case a correspondingide.properties
already exists, the config from thedevon.properties
is merged into the existingide.properties
. This not only applies tosettings
but also toconf
and allworkspaces
.ide.properties
are replaced with their new name (if both legacy and new variable name is defined, the legacy one is removed).ide.properties
are removed (only the last occurrence is kept).DEVON_IDE_CUSTOM_TOOLS
exists, it is converted into acustom-tools.json
file insettings
and the variable is removed (see here and legacy).settings/devon
folder exists, it is renamed tosettings/templates
settings/templates/conf/.m2
folder exists, it is renamed tosettings/templates/conf/mvn
settings/projects
folder exists, it is renamed tosettings/repositories
settings/workspace
andsettings/*/workspace
and replace all knownIdeVariables
from CURLY into ANGLED syntax and legacy variable names are replaced with their new names. So e.g.${DEVON_IDE_HOME}
is replaced with$[IDE_HOME]
or${MAVEN_VERSION}
is replaced with$[MVN_VERSION]
. We also need to replace${SETTINGS_PATH}
with$[IDE_HOME]/settings
.xml
file that is not containing the XML namespace of our merger, we print a warning with the filepath saying that this file is most-likely outdated and print a link to a documentation page about this settings migration feature and linking to our XML merger docs in configurator and telling the project to sync their workspace config manually with the officialide-settings
git repo on github provided by us as template for the settings.workspace
folder a warning will be logged if the file is not empty and the file will be deleted.settings/ide.properties
does not containIDE_VARIABLE_SYNTAX_LEGACY_SUPPORT_ENABLED=false
it will be added.General note:
XXX
are potentially dangerous and we should discuss if we want to ask the user before applying the change. Therefore the user must understand the impact, what might not be so easy to explain. For.m2
vs.mvn
all existing installations also need to be updated. IMHO I cared about compatibilities and fallbacks in our code so it should not break but maybe some templates may contain hardcoded references to.m2
and will stop working then.The text was updated successfully, but these errors were encountered: