Skip to content

Commit 08622eb

Browse files
authored
Publish Libraries to deploy into Tomcat (#76)
1 parent a12b159 commit 08622eb

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

server/build.gradle

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ dependencies
3333
xsdDoc "docflex:docflex-xml-re:${docflexXmlReVersion}"
3434
}
3535

36+
// Bundle and publish tomcat libs to enable distributions built by standalone modules
37+
project.tasks.register("tomcatLibsZip", Zip) {
38+
Zip zip ->
39+
zip.group = GroupNames.BUILD
40+
zip.description = "produce jar file with jars to be deployed in \$CATALINA_HOME/lib"
41+
zip.from project.configurations.tomcatJars.getAsFileTree()
42+
zip.archiveBaseName.set("tomcat-libs")
43+
zip.destinationDirectory = project.file(project.labkey.explodedModuleLibDir)
44+
}
3645

3746
configurations
3847
{
@@ -154,10 +163,25 @@ project.publishing {
154163
}
155164
}
156165

166+
tomcatJars(MavenPublication) {
167+
groupId = 'org.labkey.build'
168+
artifactId = 'tomcat-libs'
169+
version = project.version
170+
artifact project.tasks.tomcatLibsZip
171+
pom {
172+
name = "LabKey Server Tomcat Libs"
173+
description = "Additional Tomcat libs for LabKey Server."
174+
developers PomFileHelper.getLabKeyTeamDevelopers()
175+
licenses PomFileHelper.getApacheLicense()
176+
organization PomFileHelper.getLabKeyOrganization()
177+
scm PomFileHelper.getLabKeyGitScm()
178+
}
179+
}
180+
157181
if (BuildUtils.shouldPublish(project))
158182
{
159183
project.artifactoryPublish {
160-
publications('jsDocs', 'xsdDocs')
184+
publications('jsDocs', 'xsdDocs', 'tomcatJars')
161185
}
162186
project.subprojects {
163187
artifactoryPublish.skip = true

0 commit comments

Comments
 (0)