code: private void cleanupProjectIfEmpty() {
  
          m_requiresCleanup = false;
          try {
              CmsObject cms = OpenCms.initCmsObject(m_adminCms);
              cms.readProject(getProject().getUuid());
          } catch (CmsException e) {
              return;
          }
          try {
              CmsObject cms = OpenCms.initCmsObject(m_adminCms);
              cms.getRequestContext().setCurrentProject(getProject());
              CmsUUID projectId = getProject().getUuid();
              List<CmsResource> projectResources = cms.readProjectView(projectId, CmsResource.STATE_KEEP);
              if (projectResources.isEmpty()) {
                  cms.deleteProject(projectId);
              }
          } catch (CmsException e) {
              LOG.error(e.getLocalizedMessage(), e);
          }
      }
docs: Cleans up the project, but only if it's empty.<p>