Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ buildFromSource=true

# The default version for LabKey artifacts that are built or that we depend on.
# override in an individual module's gradle.properties file as necessary
labkeyVersion=25.3.4
labkeyVersion=25.3.5
labkeyClientApiVersion=6.2.0

# Version numbers for the various binary artifacts that are included when
Expand Down
21 changes: 17 additions & 4 deletions server/embedded/src/org/labkey/embedded/EmbeddedExtractor.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ public void extractExecutableJar(File destDirectory, boolean remotePipeline)
{
try (JarFile jar = new JarFile(verifyJar()))
{
boolean foundDistributionZip = false;
boolean missingDistributionZip = true;
boolean missingBootstrapJar = remotePipeline;
boolean missingServletApiJar = remotePipeline;
var entries = jar.entries();
while (entries.hasMoreElements())
{
Expand All @@ -233,22 +235,24 @@ public void extractExecutableJar(File destDirectory, boolean remotePipeline)

if ("labkey/distribution.zip".equals(entryName))
{
foundDistributionZip = true;
missingDistributionZip = false;
try (var distInputStream = jar.getInputStream(entry))
{
extractDistributionZip(distInputStream, destDirectory);
}
}
if (remotePipeline)
{
// Keep this code in sync with org.labkey.pipeline.api.PipelineServiceImpl.extractBootstrapFromEmbedded()
if (entry.getName().contains("labkeyBootstrap") && entry.getName().toLowerCase().endsWith(".jar"))
{
try (var in = jar.getInputStream(entry))
{
extractFile(in, new File(destDirectory, "labkeyBootstrap.jar"));
}
missingBootstrapJar = false;
}
if (entry.getName().contains("tomcat-servlet-api") && entry.getName().toLowerCase().endsWith(".jar"))
if (entry.getName().contains("tomcat-embed-core") && entry.getName().toLowerCase().endsWith(".jar"))
{
File pipelineLib = new File(destDirectory, "pipeline-lib");
if (!pipelineLib.exists())
Expand All @@ -262,14 +266,23 @@ public void extractExecutableJar(File destDirectory, boolean remotePipeline)
{
extractFile(in, new File(pipelineLib, "servletApi.jar"));
}
missingServletApiJar = false;
}
}
}

if (!foundDistributionZip)
if (missingDistributionZip)
{
throw new ConfigException("Unable to find distribution zip required to run LabKey Server.");
}
if (missingBootstrapJar)
{
throw new ConfigException("Unable to find labkeyServer.jar required to run LabKey Server's remote pipeline code.");
}
if (missingServletApiJar)
{
throw new ConfigException("Unable to find Servlet API file required to run LabKey Server's remote pipeline code.");
}
}
}
catch (IOException | ConfigException e)
Expand Down