Skip to content

Commit

Permalink
more fixes quicklook
Browse files Browse the repository at this point in the history
  • Loading branch information
lprimak committed Dec 2, 2024
1 parent 6fed894 commit bb07577
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@
import fish.payara.enterprise.config.serverbeans.DeploymentGroup;
import org.glassfish.api.deployment.DeploymentContext;
import org.glassfish.hk2.api.ServiceLocator;
import org.glassfish.hk2.api.UnsatisfiedDependencyException;
import org.glassfish.internal.api.Globals;
import org.glassfish.internal.deployment.Deployment;
import org.glassfish.internal.deployment.ExtendedDeploymentContext;
import org.glassfish.loader.util.ASClassLoaderUtil;


Expand Down Expand Up @@ -440,7 +442,10 @@ public static List<URI> getExternalLibraries(ReadableArchive archive) {
} catch (Exception e) {
Logger.getAnonymousLogger().log(Level.WARNING, e.getMessage(), e);
}
var context = Globals.getDefaultHabitat().getService(Deployment.class).getCurrentDeploymentContext();
ExtendedDeploymentContext context = null;
try {
context = Globals.getDefaultHabitat().getService(Deployment.class).getCurrentDeploymentContext();
} catch (Exception e) { }
if(context != null && !context.getCommandParameters(DeployCommandParameters.class).name().startsWith("__")) {
InstalledLibrariesResolver.getWarLibraries().stream().map(Path::toUri).forEach(externalLibURIs::add);
}
Expand Down

0 comments on commit bb07577

Please sign in to comment.