Hi @imalakaamir
Everytime we try to build the project by running the command (mvn clean install), maven will clean the target folder of all the modules and will build the project. Once the build is completed, the generated artifact i.e., zip or jar will be placed under the target folder for the specific module.
If it's a core module, jar file will be placed under target and if it's a ui.apps or ui.content module, zip file will be placed under the target module.
Here in this case, maven is not able to clean the target folder which is why you are getting an error while building the project. Please go ahead and delete the target folder under ui.apps and try to rebuild the project. It will fix the build issue.
Please follow the below link to know more about the maven commands which are used to clean the target folder.
https://github.com/AdobeDocs/experience-manager-cloud-service.en/blob/master/help/implementing/developing/introduction/aem-project-content-package-structure.md
Archetype defining different folder structure here:
https://experienceleague.adobe.com/docs/experience-manager-core-components/using/developing/archetype/overview.html?lang=en
Thanks!