From 1d13d0ce7ad2adfe4298464c074bc6c158d35ac7 Mon Sep 17 00:00:00 2001 From: shuyangzhou Date: Fri, 16 Apr 2021 21:24:49 -0700 Subject: [PATCH] Remove common portal.module.dependencies --- portal-module-dependency.properties | 2 -- .../netbeansproject/container/Module.java | 21 +++++++------------ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/portal-module-dependency.properties b/portal-module-dependency.properties index 6cc2a1c6..bcbb0b84 100644 --- a/portal-module-dependency.properties +++ b/portal-module-dependency.properties @@ -8,8 +8,6 @@ #Add modules as dependency to other modules petra.modules=petra-concurrent,petra-content,petra-encryptor,petra-executor,petra-function,petra-io,petra-lang,petra-log4j,petra-mail,petra-memory,petra-nio,petra-process,petra-reflect,petra-sql-dsl-api,petra-sql-dsl-spi,petra-string,petra-xml -portal.module.dependencies=portal-kernel,portal-test,registry-api - portal-impl=portal-kernel,registry-api,util-bridges,util-java,util-taglib portal-kernel=registry-api portal-test=portal-kernel,registry-api diff --git a/src/com/liferay/netbeansproject/container/Module.java b/src/com/liferay/netbeansproject/container/Module.java index 2c65d2a3..835d1487 100644 --- a/src/com/liferay/netbeansproject/container/Module.java +++ b/src/com/liferay/netbeansproject/container/Module.java @@ -419,23 +419,18 @@ private static Set _resolvePortalModuleDependencies( Properties properties, String moduleName) throws IOException { - StringBuilder sb = new StringBuilder(); - String dependencies = properties.getProperty(moduleName); - if (dependencies == null) { - sb.append( - PropertiesUtil.getRequiredProperty( - properties, "portal.module.dependencies")); - } - else { - if (!dependencies.isEmpty()) { - sb.append(dependencies); - sb.append(','); - } - sb.append(properties.getProperty("petra.modules")); + if (dependencies == null || dependencies.isEmpty()) { + return Collections.emptySet(); } + StringBuilder sb = new StringBuilder(); + + sb.append(dependencies); + sb.append(','); + sb.append(properties.getProperty("petra.modules")); + return new HashSet(Arrays.asList(StringUtil.split(sb.toString(), ','))); }