Hi
I need to refactor the package root, say from com.company.inventory .* to com.mycompany.inventory.*
Unless I missed it in documentation by searching the keyword, I didn’t find if there is any option to refactor it. The edit option in studio is not available too. Any suggestions?
Hi
Do not forget to back up your project before such modifications.
You can rename the root package using IntelliJ IDEA as follows:
Open the project in IDEA
In the Project window click the “Gears” icon in the title bar and deselect Compact Empty Middle Package
Find the company folder in the project tree
Right click on it and select Refactor ? Rename
If a dialog appears select Rename all
Specify a new name of folder
Open the “Find in Path” dialog in IDEA (Ctrl + Shift + F) and search all Occurrences of com.company in the project and change it to com.mycompany. As usual modification of the following files required:
in the core module: app.properties, spring.xml
in the global module: metadata.xml
in the gui module: screens.xml, screens descriptors and controllers
in the web module: web-screens.xml, web-app.properties, web-spring.xml, also screens descriptors and controllers
build.gradle
8. Also modify the project in the ~\.haulmont\studio\projects.xml file
9. Reopen the project in Studio, clean it, redeploy and start the server