final GAV parentPom, final String moduleName,
final PackagingProvider selectedPackagingProvider,
final Integer majorJavaVersion, final String artifactId) {
Validate.isTrue(isCreateModuleAvailable(),
"Cannot create modules at this time");
final PackagingProvider packagingProvider = getPackagingProvider(selectedPackagingProvider);
final String pathToNewPom = packagingProvider.createArtifacts(
topLevelPackage, artifactId, getJavaVersion(majorJavaVersion),
parentPom, moduleName, this);
updateParentModulePom(moduleName);
setModule(pomManagementService.getPomFromPath(pathToNewPom));
}