Skip to content

Commit

Permalink
#797 | Ignore addontestsrc directory for web sub-module
Browse files Browse the repository at this point in the history
  • Loading branch information
mlytvyn authored Nov 3, 2023
1 parent 409ce8c commit 659e194
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Improved classpath configuration for OOTB modules and readonly mode [#783](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/783)
- Adjusted `platformservices` source directories in readonly mode [#792](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/792)
- Register `web.addonsrc` as source directories for `?.web - Web Classes` library [#796](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/796)
- Ignore `addontestsrc` directory for `web` sub-module [#797](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/797)

### `Cockpit NG` enhancements
- Extend config schema namespace with `editors` type [#784](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/784)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ object HybrisConstants {
const val COMMON_WEB_MODULE_DIRECTORY = "commonweb"

const val ADDON_SRC_DIRECTORY = "addonsrc"
const val ADDON_TESTSRC_DIRECTORY = "addontestsrc"
const val TEST_CLASSES_DIRECTORY = "testclasses"
const val CLASSES_DIRECTORY = "classes"
const val JAR_MODELS = "models.jar"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected void configureCommonRoots(
if (customModuleDescriptor || !rootProjectDescriptor.isImportOotbModulesInReadOnlyMode()) {
addSourceRoots(contentEntry, moduleDescriptor.getModuleRootDirectory(), dirsToIgnore, appSettings, SRC_DIR_NAMES, JavaSourceRootType.SOURCE);

if (!customModuleDescriptor && !rootProjectDescriptor.isExcludeTestSources()) {
if (customModuleDescriptor || !rootProjectDescriptor.isExcludeTestSources()) {
addSourceRoots(contentEntry, moduleDescriptor.getModuleRootDirectory(), dirsToIgnore, appSettings, TEST_SRC_DIR_NAMES, JavaSourceRootType.TEST_SOURCE);
}

Expand Down Expand Up @@ -241,7 +241,7 @@ protected void configureWebModuleRoots(
excludeSubDirectories(
contentEntry,
moduleDescriptor.getModuleRootDirectory(),
Arrays.asList(ADDON_SRC_DIRECTORY, TEST_CLASSES_DIRECTORY, COMMON_WEB_SRC_DIRECTORY)
Arrays.asList(ADDON_SRC_DIRECTORY, ADDON_TESTSRC_DIRECTORY, COMMON_WEB_SRC_DIRECTORY, TEST_CLASSES_DIRECTORY)
);
configureWebInf(contentEntry, moduleDescriptor);
}
Expand Down

0 comments on commit 659e194

Please sign in to comment.