|
| 1 | +# Encoding: utf-8 |
| 2 | +# Cloud Foundry Java Buildpack |
| 3 | +# Copyright 2013 the original author or authors. |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | + |
| 17 | +require 'java_buildpack/component/versioned_dependency_component' |
| 18 | +require 'java_buildpack/container' |
| 19 | +require 'java_buildpack/container/tomcat/tomcat_utils' |
| 20 | +require 'java_buildpack/logging/logger_factory' |
| 21 | + |
| 22 | +module JavaBuildpack |
| 23 | + module Container |
| 24 | + |
| 25 | + # Encapsulates the detect, compile, and release functionality for Tomcat Redis support. |
| 26 | + class GemFireModulesTomcat7 < JavaBuildpack::Component::VersionedDependencyComponent |
| 27 | + include JavaBuildpack::Container |
| 28 | + |
| 29 | + # (see JavaBuildpack::Component::BaseComponent#compile) |
| 30 | + def compile |
| 31 | + download_jar(jar_name, tomcat_lib) |
| 32 | + end |
| 33 | + |
| 34 | + # (see JavaBuildpack::Component::BaseComponent#release) |
| 35 | + def release |
| 36 | + end |
| 37 | + |
| 38 | + protected |
| 39 | + |
| 40 | + # (see JavaBuildpack::Component::VersionedDependencyComponent#supports?) |
| 41 | + def supports? |
| 42 | + true |
| 43 | + end |
| 44 | + |
| 45 | + private |
| 46 | + |
| 47 | + def jar_name |
| 48 | + "gemfire-modules-tomcat7-#{@version}.jar" |
| 49 | + end |
| 50 | + end |
| 51 | + |
| 52 | + end |
| 53 | +end |
0 commit comments