Skip to content

Commit

Permalink
Remove common portal.module.dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
shuyangzhou committed Apr 18, 2021
1 parent bd877a4 commit 1d13d0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
2 changes: 0 additions & 2 deletions portal-module-dependency.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 8 additions & 13 deletions src/com/liferay/netbeansproject/container/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -419,23 +419,18 @@ private static Set<String> _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(), ',')));
}

Expand Down

0 comments on commit 1d13d0c

Please sign in to comment.