|
1 | 1 | # Extending |
| 2 | + |
| 3 | +For general information on extending the buildpack, refer to [Configuration and Extension](../README.md#Configuration-and-Extension). |
| 4 | + |
2 | 5 | To add a component, its class file must be put in a specific location and the class name added to [`config/components.yml`][]. |
3 | 6 |
|
4 | 7 | | Component Type | Location |
@@ -39,7 +42,7 @@ def release |
39 | 42 |
|
40 | 43 |
|
41 | 44 | ## Component Context |
42 | | -Each component class must have an `initialize` method that takes a `Hash` containg contextual information about the application. It is this "whiteboard" that is used by the components to communicate with one another. The context contains the following entries: |
| 45 | +Each component class must have an `initialize` method that takes a `Hash` containing contextual information about the application. It is this "whiteboard" that is used by the components to communicate with one another. The context contains the following entries: |
43 | 46 |
|
44 | 47 | | Name | Type | Description |
45 | 48 | | ---- | ---- | ----------- |
@@ -71,3 +74,20 @@ This base class is recommended for use by any component that uses the buildpack |
71 | 74 | [`lib/java_buildpack/jre`]: ../lib/java_buildpack/jre |
72 | 75 | [`lib/java_buildpack/versioned_dependency_component.rb`]: ../lib/java_buildpack/versioned_dependency_component.rb |
73 | 76 | [repository support]: util-repositories.md |
| 77 | + |
| 78 | +## Examples |
| 79 | +The following example components are relatively simple and good for copying as the basis for a new component. |
| 80 | + |
| 81 | +### `JAVA_OPTS` Framework |
| 82 | + |
| 83 | +The [`JAVA_OPTS` Framework](framework-java_opts.md) ([`lib/java_buildpack/framework/java_opts.rb`](../lib/java_buildpack/framework/java_opts.rb)) extends the [`BaseComponent`](../lib/java_buildpack/base_component.rb) base class described above. |
| 84 | + |
| 85 | +### Java Main Class Container |
| 86 | + |
| 87 | +The [Java Main Class Container](container-java-main.md) ([`lib/java_buildpack/container/main.rb`](../lib/java_buildpack/container/main.rb)) extends the [`BaseComponent`](../lib/java_buildpack/base_component.rb) base class described above. |
| 88 | + |
| 89 | +### Spring Boot CLI Container |
| 90 | + |
| 91 | +The [Spring Boot CLI Container](container-spring-boot-cli.md) ([`lib/java_buildpack/container/spring_boot_cli.rb`](../lib/java_buildpack/container/spring_boot_cli.rb)) extends the [`VersionedDependencyComponent`](../lib/java_buildpack/versioned_dependency_component.rb) base class described above. |
| 92 | + |
| 93 | + |
0 commit comments