Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make template set root directories accessible for the reader #1667

Open
jan-vcapgemini opened this issue Apr 3, 2023 · 0 comments
Open

Make template set root directories accessible for the reader #1667

jan-vcapgemini opened this issue Apr 3, 2023 · 0 comments

Comments

@jan-vcapgemini
Copy link
Collaborator

Currently we determine the folder for the template set utilities like this:

/**
* Gets the source folder for utility classes
*
* @return the source folder where utility classes are located
*/
private Path getUtilSourceFolder(Path path) {
// TODO: replace with proper root template set folder
return path.getParent().getParent().getParent().getParent();
}

Adjust the TemplateSetConfigurationManager here:

List<Path> templateSetDirectories = retrieveTemplateSetDirectories(configRoot);
for (Path templateDirectory : templateSetDirectories) {
Path templateSetFilePath = templateDirectory.resolve(ConfigurationConstants.MAVEN_CONFIGURATION_RESOURCE_FOLDER)
.resolve(ConfigurationConstants.TEMPLATE_SET_CONFIG_FILENAME);
addConfigRoot(templateSetFilePath, templateDirectory, this.templateSetPaths);
}
to get access to the root directory of each template-set.

jan-vcapgemini added a commit that referenced this issue Apr 3, 2023
removed templateSetPaths field in TemplateSetConfigurationManager
adjusted addConfigRoot to provide the root template set folder
added test to check for invalid template set folders
removed addConfigRoot method
removed getUtilSourceFolder method (now the same way to determine utility folders works for adapted and downloaded template sets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant