Skip to content

Commit

Permalink
GRP-2645: Remove slf4j-api-1.6.1.jar file from all lib folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Sachdeva committed Apr 7, 2020
1 parent a53ee23 commit 471fb43
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11152,6 +11152,9 @@ public boolean accept(File dir, String name) {
// now download all the grouper project jars
downloadGrouperJarsIntoLibDirectory(webInfDir);

// delete slf4j-api-1.6.1.jar from all the lib dirs
deleteJarsFromLibDirs(webInfDir, new String[] {"slf4j-api-1.6.1.jar"});

// take care of conflicting jars
reportOnConflictingJars(libDir.getAbsolutePath());
reportOnConflictingJars(libUiAndDaemonDir.getAbsolutePath());
Expand Down Expand Up @@ -13575,6 +13578,24 @@ private File downloadGrouperSourceTagFromGithub() {
return grouperSourceCodeFile;
}

private void deleteJarsFromLibDirs(File webInfDir, String[] jarsToBeDeleted) {

for (String jarName: jarsToBeDeleted) {
File jarInLibDir = new File(webInfDir+File.separator+"lib" + File.separator + jarName);
GrouperInstallerUtils.fileDelete(jarInLibDir);

File jarInLibUiAndDaemonDir = new File(webInfDir+File.separator+"libUiAndDaemon" + File.separator + jarName );
GrouperInstallerUtils.fileDelete(jarInLibUiAndDaemonDir);

File jarInLibWsDir = new File(webInfDir+File.separator+"libWs" + File.separator + jarName );
GrouperInstallerUtils.fileDelete(jarInLibWsDir);

File jarInLibScimDir = new File(webInfDir+File.separator+"libScim" + File.separator + jarName );
GrouperInstallerUtils.fileDelete(jarInLibScimDir);
}

}

private void downloadGrouperJarsIntoLibDirectory(File webInfDir) {
String basePath = "https://oss.sonatype.org/service/local/repositories/releases/content/edu/internet2/middleware/grouper/";

Expand Down

0 comments on commit 471fb43

Please sign in to comment.