-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Add-missing-logging-dependencies-for-GemFire'
- Loading branch information
Showing
18 changed files
with
503 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
lib/java_buildpack/container/tomcat/gemfire/gemfire_log4j_api.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Encoding: utf-8 | ||
# Cloud Foundry Java Buildpack | ||
# Copyright 2013-2015 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require 'java_buildpack/component/versioned_dependency_component' | ||
require 'java_buildpack/container' | ||
require 'java_buildpack/container/tomcat/tomcat_utils' | ||
require 'java_buildpack/logging/logger_factory' | ||
|
||
module JavaBuildpack | ||
module Container | ||
|
||
# Encapsulates the detect, compile, and release functionality for Log4j API support. | ||
class GemFireLog4jApi < JavaBuildpack::Component::VersionedDependencyComponent | ||
include JavaBuildpack::Container | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#compile) | ||
def compile | ||
download_jar(jar_name, tomcat_lib, 'GemFire Log4j API') | ||
end | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#release) | ||
def release | ||
end | ||
|
||
protected | ||
|
||
# (see JavaBuildpack::Component::VersionedDependencyComponent#supports?) | ||
def supports? | ||
true | ||
end | ||
|
||
private | ||
|
||
def jar_name | ||
"log4j-api-#{@version}.jar" | ||
end | ||
end | ||
|
||
end | ||
end |
53 changes: 53 additions & 0 deletions
53
lib/java_buildpack/container/tomcat/gemfire/gemfire_log4j_core.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Encoding: utf-8 | ||
# Cloud Foundry Java Buildpack | ||
# Copyright 2013-2015 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require 'java_buildpack/component/versioned_dependency_component' | ||
require 'java_buildpack/container' | ||
require 'java_buildpack/container/tomcat/tomcat_utils' | ||
require 'java_buildpack/logging/logger_factory' | ||
|
||
module JavaBuildpack | ||
module Container | ||
|
||
# Encapsulates the detect, compile, and release functionality for Log4j Core support. | ||
class GemFireLog4jCore < JavaBuildpack::Component::VersionedDependencyComponent | ||
include JavaBuildpack::Container | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#compile) | ||
def compile | ||
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Core') | ||
end | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#release) | ||
def release | ||
end | ||
|
||
protected | ||
|
||
# (see JavaBuildpack::Component::VersionedDependencyComponent#supports?) | ||
def supports? | ||
true | ||
end | ||
|
||
private | ||
|
||
def jar_name | ||
"log4j-core-#{@version}.jar" | ||
end | ||
end | ||
|
||
end | ||
end |
53 changes: 53 additions & 0 deletions
53
lib/java_buildpack/container/tomcat/gemfire/gemfire_log4j_jcl.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Encoding: utf-8 | ||
# Cloud Foundry Java Buildpack | ||
# Copyright 2013-2015 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require 'java_buildpack/component/versioned_dependency_component' | ||
require 'java_buildpack/container' | ||
require 'java_buildpack/container/tomcat/tomcat_utils' | ||
require 'java_buildpack/logging/logger_factory' | ||
|
||
module JavaBuildpack | ||
module Container | ||
|
||
# Encapsulates the detect, compile, and release functionality for Log4j Jcl support. | ||
class GemFireLog4jJcl < JavaBuildpack::Component::VersionedDependencyComponent | ||
include JavaBuildpack::Container | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#compile) | ||
def compile | ||
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Jcl') | ||
end | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#release) | ||
def release | ||
end | ||
|
||
protected | ||
|
||
# (see JavaBuildpack::Component::VersionedDependencyComponent#supports?) | ||
def supports? | ||
true | ||
end | ||
|
||
private | ||
|
||
def jar_name | ||
"log4j-jcl-#{@version}.jar" | ||
end | ||
end | ||
|
||
end | ||
end |
53 changes: 53 additions & 0 deletions
53
lib/java_buildpack/container/tomcat/gemfire/gemfire_log4j_jul.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Encoding: utf-8 | ||
# Cloud Foundry Java Buildpack | ||
# Copyright 2013-2015 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require 'java_buildpack/component/versioned_dependency_component' | ||
require 'java_buildpack/container' | ||
require 'java_buildpack/container/tomcat/tomcat_utils' | ||
require 'java_buildpack/logging/logger_factory' | ||
|
||
module JavaBuildpack | ||
module Container | ||
|
||
# Encapsulates the detect, compile, and release functionality for Log4j Jul support. | ||
class GemFireLog4jJul < JavaBuildpack::Component::VersionedDependencyComponent | ||
include JavaBuildpack::Container | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#compile) | ||
def compile | ||
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Jul') | ||
end | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#release) | ||
def release | ||
end | ||
|
||
protected | ||
|
||
# (see JavaBuildpack::Component::VersionedDependencyComponent#supports?) | ||
def supports? | ||
true | ||
end | ||
|
||
private | ||
|
||
def jar_name | ||
"log4j-jul-#{@version}.jar" | ||
end | ||
end | ||
|
||
end | ||
end |
53 changes: 53 additions & 0 deletions
53
lib/java_buildpack/container/tomcat/gemfire/gemfire_log4j_slf4j_impl.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Encoding: utf-8 | ||
# Cloud Foundry Java Buildpack | ||
# Copyright 2013-2015 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require 'java_buildpack/component/versioned_dependency_component' | ||
require 'java_buildpack/container' | ||
require 'java_buildpack/container/tomcat/tomcat_utils' | ||
require 'java_buildpack/logging/logger_factory' | ||
|
||
module JavaBuildpack | ||
module Container | ||
|
||
# Encapsulates the detect, compile, and release functionality for Log4j Slf4j Impl support. | ||
class GemFireLog4jSlf4jImpl < JavaBuildpack::Component::VersionedDependencyComponent | ||
include JavaBuildpack::Container | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#compile) | ||
def compile | ||
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Slf4j Impl') | ||
end | ||
|
||
# (see JavaBuildpack::Component::BaseComponent#release) | ||
def release | ||
end | ||
|
||
protected | ||
|
||
# (see JavaBuildpack::Component::VersionedDependencyComponent#supports?) | ||
def supports? | ||
true | ||
end | ||
|
||
private | ||
|
||
def jar_name | ||
"log4j-slf4j-impl-#{@version}.jar" | ||
end | ||
end | ||
|
||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
42 changes: 42 additions & 0 deletions
42
spec/java_buildpack/container/tomcat/gemfire/gemfire_log4j_api_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Encoding: utf-8 | ||
# Cloud Foundry Java Buildpack | ||
# Copyright 2013-2015 the original author or authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
require 'spec_helper' | ||
require 'component_helper' | ||
require 'java_buildpack/container/tomcat/gemfire/gemfire_log4j_api' | ||
|
||
describe JavaBuildpack::Container::GemFireLog4jApi do | ||
include_context 'component_helper' | ||
|
||
let(:component_id) { 'tomcat' } | ||
|
||
it 'always detects' do | ||
expect(component.detect).to eq("gem-fire-log4j-api=#{version}") | ||
end | ||
|
||
it 'copies resources', | ||
cache_fixture: 'stub-gemfire-log4j-api.jar' do | ||
|
||
component.compile | ||
|
||
expect(sandbox + "lib/log4j-api-#{version}.jar").to exist | ||
end | ||
|
||
it 'does nothing during release' do | ||
component.release | ||
end | ||
|
||
end |
Oops, something went wrong.