Skip to content

Commit

Permalink
#243: generate tgz during setup + removed javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Sep 13, 2013
1 parent 2c5dbe8 commit 10b1609
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 7 deletions.
14 changes: 7 additions & 7 deletions console/org.linkedin.glu.console-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,6 @@ cmdline {
replaceTokens: false
]

// jetty archive
resources << [
from: jettyArchive,
into: new File(assemblePackageFile, 'glu/repository/tgzs'),
replaceTokens: false
]

// scripts
scriptProjects.each { scriptProject ->
scriptProject.tasks.withType(SingleArtifactTask.class).each { t ->
Expand All @@ -117,3 +110,10 @@ cmdline {
}
}
}

project.'package-assemble'.doLast {
File basePackage = project.convention.plugins.cmdline.assemblePackageFile

// getting rid of the unnecessary javadoc that comes with jetty!
delete new File(basePackage, "${jettyDistribution}/javadoc")
}
1 change: 1 addition & 0 deletions packaging/org.linkedin.glu.packaging-all/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ task 'clean-dev-setup' << {
logger.lifecycle("Stopping previous setup")
exec {
commandLine devSetupCtlFile.canonicalPath, "stop"
ignoreExitValue true
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.pongasoft.glu.packaging.setup

import org.linkedin.groovy.util.config.Config
import org.linkedin.util.io.resource.Resource
import org.pongasoft.glu.provisioner.core.metamodel.ConsoleMetaModel

Expand Down Expand Up @@ -88,6 +89,12 @@ public class ConsoleServerPackager extends BasePackager
if(metaModel.gluMetaModel.stateMachine)
generateStateMachineJarFile(metaModel.gluMetaModel.stateMachine,
packagePath.createRelative('glu/repository/plugins'))
if(Config.getOptionalBoolean(configTokens, 'includeJettyDistribution', true))
{
shell.tar(dir: packagePath.createRelative(jettyDistribution),
tarFile: packagePath.createRelative("glu/repository/tgzs/${jettyDistribution}.tar.gz"),
compression: 'gzip')
}
}
return new PackagedArtifact(location: packagePath,
host: metaModel.host.resolveHostAddress(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ public class TestConsoleServerPackager extends BasePackagerTest
"/glu/repository/exploded-wars/org.linkedin.glu.console-webapp-${GLU_VERSION}/WEB-INF/web.xml": { r ->
assertTrue(r.file.text.contains('<session-timeout>30</session-timeout>'))
},
"/glu/repository/tgzs": DIRECTORY,
"/glu/repository/tgzs/${jettyDistribution}.tar.gz": tarContent(shell, [
"/${jettyDistribution}": DIRECTORY,
"/${jettyDistribution}/contexts": DIRECTORY,
"/${jettyDistribution}/contexts/console-jetty-context.xml": TUTORIAL_CONSOLE_JETTY_CONTEXT,
"/${jettyDistribution}/contexts/glu-jetty-context.xml": DEFAULT_GLU_JETTY_CONTEXT,
"/${jettyDistribution}/lib": DIRECTORY,
"/${jettyDistribution}/lib/acme.jar": 'this is the jar',
]),
]

checkPackageContent(expectedResources, artifact.location)
Expand Down Expand Up @@ -129,6 +138,7 @@ consoles << [
version: '${GLU_VERSION}',
dataSourceDriverUri: '${driverResource.toURI()}',
configTokens: [
includeJettyDistribution: false,
dataSource: '<datasource>',
JVM_SIZE: '-Xmx555m',
plugins: '<extra plugin config>',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ public class TestGluPackager extends BasePackagerTest
"/${console}/glu/repository/exploded-wars/org.linkedin.glu.console-webapp-${GLU_VERSION}": DIRECTORY,
"/${console}/glu/repository/exploded-wars/org.linkedin.glu.console-webapp-${GLU_VERSION}/WEB-INF": DIRECTORY,
"/${console}/glu/repository/exploded-wars/org.linkedin.glu.console-webapp-${GLU_VERSION}/WEB-INF/web.xml": FILE,
"/${console}/glu/repository/tgzs": DIRECTORY,
"/${console}/glu/repository/tgzs/${jettyDistribution}.tar.gz": FILE,
], bulkFailure),
'/zookeeper-clusters': DIRECTORY,
"/${zkc}": DIRECTORY,
Expand Down

0 comments on commit 10b1609

Please sign in to comment.