Upgrading JHipster

Unlike other frameworks, upgrading JHipster is a painless process. A subgenerator called JHipster upgrade is used to upgrade an existing application for the new version, without removing any custom changes that have been added since the application was created the first time. This is quite useful, especially when a new version of JHipster is released with known bug fixes and security patches. JHipster upgrades can be executed with the following command:

jhipster upgrade

To make the whole upgrade process automated, JHipster take the help of Git with the following steps:

  • The preceding command checks whether a new version of JHipster is available, unless the --force flag is given explicitly. If this option is given, the upgrade sub-generator will be triggered, irrespective of the latest version being installed.
  • The whole upgrade process depends on Git, so if an application is not initialized with Git (if Git is not installed), JHipster will initialize Git and commit the current code to the master branch.
  • JHipster will check for any uncommitted local code. The upgrade process fails if the code is not committed. 
  • Next, it will check if a jhipster_upgrade branch is available in Git. If not, this will be created. This branch is dedicated to the JHipster upgrade process, so it should never be updated manually.
  • JHipster will check out the jhipster_upgrade branch.
  • At this point, JHipster is upgraded with the latest version.
  • The current project directory is cleaned and the application is generated from scratch, with the entities.
  • The generated code will then be committed to the jhipster_upgrade branch.
  • Finally, the jhipster_upgrade branch will be merged with the original branch from which the jhipster_upgrade command was launched. 
  • In the case of any conflicts, you will need to resolve and commit them manually.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.13.201