diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-01-11 17:12:05 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2021-01-11 17:17:11 +0100 |
commit | 50f8720f85172080d188f086d9b57074fd6d7a1b (patch) | |
tree | dcc28f3c2a92d1958c03733534509c0e49e71a4b /container-core-config | |
parent | bd9d35c912d4c08c8e73b876348278fa968eceaa (diff) |
Move access log definition to separate module
Config defintion must be embedded into container-core as the generated
Java config class uses package 'com.yahoo.container.core'.
Diffstat (limited to 'container-core-config')
-rw-r--r-- | container-core-config/CMakeLists.txt | 2 | ||||
-rw-r--r-- | container-core-config/OWNERS | 1 | ||||
-rw-r--r-- | container-core-config/README.md | 7 | ||||
-rw-r--r-- | container-core-config/pom.xml | 48 | ||||
-rw-r--r-- | container-core-config/src/main/java/com/yahoo/container/core/package-info.java | 5 | ||||
-rw-r--r-- | container-core-config/src/main/resources/configdefinitions/container.core.access-log.def | 17 |
6 files changed, 80 insertions, 0 deletions
diff --git a/container-core-config/CMakeLists.txt b/container-core-config/CMakeLists.txt new file mode 100644 index 00000000000..307bb103e9f --- /dev/null +++ b/container-core-config/CMakeLists.txt @@ -0,0 +1,2 @@ +# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +install_config_definitions() diff --git a/container-core-config/OWNERS b/container-core-config/OWNERS new file mode 100644 index 00000000000..fb71c67318d --- /dev/null +++ b/container-core-config/OWNERS @@ -0,0 +1 @@ +bjorncs
\ No newline at end of file diff --git a/container-core-config/README.md b/container-core-config/README.md new file mode 100644 index 00000000000..5bb4c3860e1 --- /dev/null +++ b/container-core-config/README.md @@ -0,0 +1,7 @@ +# container-core-config + +Contains config definitions with package `com.yahoo.container.core` that are used by other modules. + +This artifact is embedded inside container-core jar, but built as bundle to allow other modules to depend on container-core config definitions without depending on container-core. +The generated config classes cannot be moved to container-core as it would introduce a cycles in Maven dependency graph. +This works at correctly runtime as OSGi allows cycling dependencies between bundles. diff --git a/container-core-config/pom.xml b/container-core-config/pom.xml new file mode 100644 index 00000000000..fb4aea4071e --- /dev/null +++ b/container-core-config/pom.xml @@ -0,0 +1,48 @@ +<?xml version="1.0"?> +<!-- Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 + http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>com.yahoo.vespa</groupId> + <artifactId>parent</artifactId> + <version>7-SNAPSHOT</version> + <relativePath>../parent/pom.xml</relativePath> + </parent> + <artifactId>container-core-config</artifactId> + <version>7-SNAPSHOT</version> + <packaging>container-plugin</packaging> <!-- See README.md for why it's not packaged as 'jar' --> + <dependencies> + <dependency> + <groupId>com.yahoo.vespa</groupId> + <artifactId>annotations</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.yahoo.vespa</groupId> + <artifactId>config-lib</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>com.yahoo.vespa</groupId> + <artifactId>bundle-plugin</artifactId> + <extensions>true</extensions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + </plugin> + </plugins> + <outputDirectory>${buildOutputDirectory}</outputDirectory> + </build> + <properties> + <buildOutputDirectory>${project.build.directory}/classes/</buildOutputDirectory> + </properties> +</project>
\ No newline at end of file diff --git a/container-core-config/src/main/java/com/yahoo/container/core/package-info.java b/container-core-config/src/main/java/com/yahoo/container/core/package-info.java new file mode 100644 index 00000000000..c9c683bd68a --- /dev/null +++ b/container-core-config/src/main/java/com/yahoo/container/core/package-info.java @@ -0,0 +1,5 @@ +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +@ExportPackage +package com.yahoo.container.core; + +import com.yahoo.osgi.annotation.ExportPackage;
\ No newline at end of file diff --git a/container-core-config/src/main/resources/configdefinitions/container.core.access-log.def b/container-core-config/src/main/resources/configdefinitions/container.core.access-log.def new file mode 100644 index 00000000000..08ea6ec4884 --- /dev/null +++ b/container-core-config/src/main/resources/configdefinitions/container.core.access-log.def @@ -0,0 +1,17 @@ +# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +namespace=container.core + +# File name patterns supporting the expected time variables, e.g. ".%Y%m%d%H%M%S" +fileHandler.pattern string + +# When should rotation happen, in minutes after midnight +# Does this really need to be configurable? +# Could just configure "every N minutes" instead +fileHandler.rotation string default="0 60 ..." + +# Use this as the name of the symlink created pointing to the newest file in the "date" naming scheme. +# This is ignored if the sequence naming scheme is used. +fileHandler.symlink string default="" + +# compress the previous access log after rotation +fileHandler.compressOnRotation bool default=true |