Skip to content

Commit 5194155

Browse files
author
Christopher Frost
committed
Merge branch 'Add-missing-logging-dependencies-for-GemFire'
2 parents 35e7995 + 5ceccb1 commit 5194155

18 files changed

+503
-3
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ AllCops:
99
- 'build/**/*'
1010
- 'vendor/**/*'
1111
Metrics/AbcSize:
12-
Max: 18
12+
Max: 22
1313
Metrics/ClassLength:
1414
Max: 200
1515
Metrics/CyclomaticComplexity:

config/tomcat.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,23 @@ gemfire_store:
4949
version: 8.+
5050
repository_root: ! '{default.repository.root}/gem-fire-security'
5151
gemfire_logging:
52-
version: 1.5.8
52+
version: 1.7.7
5353
repository_root: ! '{default.repository.root}/slf4j-jdk14'
5454
gemfire_logging_api:
55-
version: 1.5.8
55+
version: 1.7.7
5656
repository_root: ! '{default.repository.root}/slf4j-api'
57+
gemfire_log4j_api:
58+
version: 2.1.0
59+
repository_root: ! '{default.repository.root}/log4j-api'
60+
gemfire_log4j_core:
61+
version: 2.1.0
62+
repository_root: ! '{default.repository.root}/log4j-core'
63+
gemfire_log4j_jcl:
64+
version: 2.1.0
65+
repository_root: ! '{default.repository.root}/log4j-jcl'
66+
gemfire_log4j_jul:
67+
version: 2.1.0
68+
repository_root: ! '{default.repository.root}/log4j-jul'
69+
gemfire_log4j_slf4j_impl:
70+
version: 2.1.0
71+
repository_root: ! '{default.repository.root}/log4j-slf4j-impl'
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Encoding: utf-8
2+
# Cloud Foundry Java Buildpack
3+
# Copyright 2013-2015 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 Log4j API support.
26+
class GemFireLog4jApi < JavaBuildpack::Component::VersionedDependencyComponent
27+
include JavaBuildpack::Container
28+
29+
# (see JavaBuildpack::Component::BaseComponent#compile)
30+
def compile
31+
download_jar(jar_name, tomcat_lib, 'GemFire Log4j API')
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+
"log4j-api-#{@version}.jar"
49+
end
50+
end
51+
52+
end
53+
end
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Encoding: utf-8
2+
# Cloud Foundry Java Buildpack
3+
# Copyright 2013-2015 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 Log4j Core support.
26+
class GemFireLog4jCore < JavaBuildpack::Component::VersionedDependencyComponent
27+
include JavaBuildpack::Container
28+
29+
# (see JavaBuildpack::Component::BaseComponent#compile)
30+
def compile
31+
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Core')
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+
"log4j-core-#{@version}.jar"
49+
end
50+
end
51+
52+
end
53+
end
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Encoding: utf-8
2+
# Cloud Foundry Java Buildpack
3+
# Copyright 2013-2015 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 Log4j Jcl support.
26+
class GemFireLog4jJcl < JavaBuildpack::Component::VersionedDependencyComponent
27+
include JavaBuildpack::Container
28+
29+
# (see JavaBuildpack::Component::BaseComponent#compile)
30+
def compile
31+
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Jcl')
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+
"log4j-jcl-#{@version}.jar"
49+
end
50+
end
51+
52+
end
53+
end
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Encoding: utf-8
2+
# Cloud Foundry Java Buildpack
3+
# Copyright 2013-2015 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 Log4j Jul support.
26+
class GemFireLog4jJul < JavaBuildpack::Component::VersionedDependencyComponent
27+
include JavaBuildpack::Container
28+
29+
# (see JavaBuildpack::Component::BaseComponent#compile)
30+
def compile
31+
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Jul')
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+
"log4j-jul-#{@version}.jar"
49+
end
50+
end
51+
52+
end
53+
end
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Encoding: utf-8
2+
# Cloud Foundry Java Buildpack
3+
# Copyright 2013-2015 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 Log4j Slf4j Impl support.
26+
class GemFireLog4jSlf4jImpl < JavaBuildpack::Component::VersionedDependencyComponent
27+
include JavaBuildpack::Container
28+
29+
# (see JavaBuildpack::Component::BaseComponent#compile)
30+
def compile
31+
download_jar(jar_name, tomcat_lib, 'GemFire Log4j Slf4j Impl')
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+
"log4j-slf4j-impl-#{@version}.jar"
49+
end
50+
end
51+
52+
end
53+
end

lib/java_buildpack/container/tomcat/tomcat_gemfire_store.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
require 'java_buildpack/container'
1919
require 'java_buildpack/container/tomcat/tomcat_utils'
2020
require 'java_buildpack/container/tomcat/gemfire/gemfire'
21+
require 'java_buildpack/container/tomcat/gemfire/gemfire_log4j_api'
22+
require 'java_buildpack/container/tomcat/gemfire/gemfire_log4j_core'
23+
require 'java_buildpack/container/tomcat/gemfire/gemfire_log4j_jcl'
24+
require 'java_buildpack/container/tomcat/gemfire/gemfire_log4j_jul'
25+
require 'java_buildpack/container/tomcat/gemfire/gemfire_log4j_slf4j_impl'
2126
require 'java_buildpack/container/tomcat/gemfire/gemfire_logging_api'
2227
require 'java_buildpack/container/tomcat/gemfire/gemfire_logging'
2328
require 'java_buildpack/container/tomcat/gemfire/gemfire_modules'
@@ -48,6 +53,11 @@ def compile
4853
def sub_components(context)
4954
[
5055
GemFire.new(sub_configuration_context(context, 'gemfire')),
56+
GemFireLog4jApi.new(sub_configuration_context(context, 'gemfire_log4j_api')),
57+
GemFireLog4jCore.new(sub_configuration_context(context, 'gemfire_log4j_core')),
58+
GemFireLog4jJcl.new(sub_configuration_context(context, 'gemfire_log4j_jcl')),
59+
GemFireLog4jJul.new(sub_configuration_context(context, 'gemfire_log4j_jul')),
60+
GemFireLog4jSlf4jImpl.new(sub_configuration_context(context, 'gemfire_log4j_slf4j_impl')),
5161
GemFireLoggingApi.new(sub_configuration_context(context, 'gemfire_logging_api')),
5262
GemFireLogging.new(sub_configuration_context(context, 'gemfire_logging')),
5363
GemFireModules.new(sub_configuration_context(context, 'gemfire_modules')),
2.6 KB
Binary file not shown.
2.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)