diff options
author | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
---|---|---|
committer | Jon Bratseth <bratseth@yahoo-inc.com> | 2016-06-15 23:09:44 +0200 |
commit | 72231250ed81e10d66bfe70701e64fa5fe50f712 (patch) | |
tree | 2728bba1131a6f6e5bdf95afec7d7ff9358dac50 /config_test |
Publish
Diffstat (limited to 'config_test')
-rw-r--r-- | config_test/.gitignore | 2 | ||||
-rw-r--r-- | config_test/OWNERS | 1 | ||||
-rw-r--r-- | config_test/pom.xml | 52 | ||||
-rw-r--r-- | config_test/src/main/java/com/yahoo/configtest/Demo.java | 14 | ||||
-rw-r--r-- | config_test/src/main/resources/configdefinitions/greeting.def | 11 |
5 files changed, 80 insertions, 0 deletions
diff --git a/config_test/.gitignore b/config_test/.gitignore new file mode 100644 index 00000000000..3cc25b51fc4 --- /dev/null +++ b/config_test/.gitignore @@ -0,0 +1,2 @@ +/pom.xml.build +/target diff --git a/config_test/OWNERS b/config_test/OWNERS new file mode 100644 index 00000000000..e0a00db5f4f --- /dev/null +++ b/config_test/OWNERS @@ -0,0 +1 @@ +musum diff --git a/config_test/pom.xml b/config_test/pom.xml new file mode 100644 index 00000000000..2f8426387c3 --- /dev/null +++ b/config_test/pom.xml @@ -0,0 +1,52 @@ +<?xml version="1.0"?> +<!-- Copyright 2016 Yahoo Inc. 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/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + <groupId>com.yahoo.vespa</groupId> + <artifactId>config_test</artifactId> + <packaging>container-plugin</packaging> + <version>6-SNAPSHOT</version> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.11</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.yahoo.vespa</groupId> + <artifactId>config-lib</artifactId> + <version>${project.version}</version> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.5.1</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + <compilerArgs> + <arg>-Xlint:all</arg> + <arg>-Werror</arg> + </compilerArgs> + </configuration> + </plugin> + <plugin> + <groupId>com.yahoo.vespa</groupId> + <artifactId>bundle-plugin</artifactId> + <version>${project.version}</version> + <extensions>true</extensions> + <configuration> + <configGenVersion>${project.version}</configGenVersion> + </configuration> + </plugin> + </plugins> + </build> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> +</project> diff --git a/config_test/src/main/java/com/yahoo/configtest/Demo.java b/config_test/src/main/java/com/yahoo/configtest/Demo.java new file mode 100644 index 00000000000..44b42c79de3 --- /dev/null +++ b/config_test/src/main/java/com/yahoo/configtest/Demo.java @@ -0,0 +1,14 @@ +// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.configtest; + +/** + * Just check we manage to compile something that requires configuration and + * has no dependencies to Vespa. + */ +public class Demo { + public final String greeting; + + public Demo(GreetingConfig config) { + greeting = config.greeting(); + } +} diff --git a/config_test/src/main/resources/configdefinitions/greeting.def b/config_test/src/main/resources/configdefinitions/greeting.def new file mode 100644 index 00000000000..7755413e8f7 --- /dev/null +++ b/config_test/src/main/resources/configdefinitions/greeting.def @@ -0,0 +1,11 @@ +# Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +version=1 +namespace=configtest + +greeting string default="Hello, world." +arbitrary double + +values[].marker int +values[].operations[].type enum { NALLE, BAMSE, BRAKAR } +values[].operations[].arguments[].key string +values[].operations[].arguments[].value string |