Skip to content

Commit

Permalink
Added build folder to excluded directories
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshwinThomasIBM authored and JoshwinThomasIBM committed Jan 3, 2025
1 parent bcebc27 commit b899512
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/definitions/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const COMMAND_AND_PROJECT_TYPE_MAP: { [command: string]: string[] } = {
"gradle":[ LIBERTY_GRADLE_PROJECT, LIBERTY_GRADLE_PROJECT_CONTAINER],
"liberty.dev.debug": [LIBERTY_MAVEN_PROJECT, LIBERTY_GRADLE_PROJECT, LIBERTY_MAVEN_PROJECT_CONTAINER, LIBERTY_GRADLE_PROJECT_CONTAINER],
};
export const EXCLUDED_DIR_PATTERN = "**/{bin,classes,target}/**";
export const EXCLUDED_DIR_PATTERN = "**/{bin,classes,target,build}/**";
export const COMMAND_TITLES = new Map();
export const UNTITLED_WORKSPACE="Untitled (Workspace)";
COMMAND_TITLES.set(localize("hotkey.commands.title.refresh"), "liberty.explorer.refresh");
Expand Down
8 changes: 4 additions & 4 deletions src/liberty/libertyProject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ export class ProjectProvider implements vscode.TreeDataProvider<LibertyProject>
* */
public async getListOfMavenAndGradleFolders(path: string): Promise<string[]>{
let uris: string[] = [];
const pomPattern = new vscode.RelativePattern(path, "**/!(target|build)/**/pom.xml");
const gradlePattern = new vscode.RelativePattern(path, "**/!(target|build)/**/build.gradle");
const pomPattern = new vscode.RelativePattern(path, "**/pom.xml");
const gradlePattern = new vscode.RelativePattern(path, "**/build.gradle");
let paths = (await vscode.workspace.findFiles(pomPattern, EXCLUDED_DIR_PATTERN)).map(uri => uri.fsPath);
uris = uris.concat(paths);
paths = (await vscode.workspace.findFiles(gradlePattern, EXCLUDED_DIR_PATTERN)).map(uri => uri.fsPath);
Expand Down Expand Up @@ -410,8 +410,8 @@ export class ProjectProvider implements vscode.TreeDataProvider<LibertyProject>
private async updateProjects(): Promise<void> {
// find all build files in the open workspace and find all the ones that are valid for dev-mode

const pomPaths = (await vscode.workspace.findFiles("**/!(target|build)/**/pom.xml", EXCLUDED_DIR_PATTERN)).map(uri => uri.fsPath);
const gradlePaths = (await vscode.workspace.findFiles("**/!(target|build)/**/build.gradle", EXCLUDED_DIR_PATTERN)).map(uri => uri.fsPath);
const pomPaths = (await vscode.workspace.findFiles("**/pom.xml", EXCLUDED_DIR_PATTERN)).map(uri => uri.fsPath);
const gradlePaths = (await vscode.workspace.findFiles("**/build.gradle", EXCLUDED_DIR_PATTERN)).map(uri => uri.fsPath);
const validPoms: BuildFileImpl[] = await this.findValidPOMs(pomPaths);
const validGradleBuilds: BuildFileImpl[] = await this.findValidGradleBuildFiles(gradlePaths);
let serverXMLPaths: string[] = [];
Expand Down

0 comments on commit b899512

Please sign in to comment.