Skip to content

Commit

Permalink
Add helidon-config-yaml-mp as a dependency in helidon-microprofile-co…
Browse files Browse the repository at this point in the history
…nfig. (helidon-io#4379)

helidon-config-yaml-mp was recently decoupled from helidon-config-mp which is part of helidon-microprofile-config and as a consequence, is not a part of that config bundle anymore. This work was done to add it back and avoid any effects of incompatibility.

(cherry picked from commit aca9bf7)
  • Loading branch information
klustria committed Jun 15, 2022
1 parent b2664e9 commit 8cf4b02
Showing 6 changed files with 107 additions and 11 deletions.
4 changes: 4 additions & 0 deletions microprofile/config/pom.xml
Original file line number Diff line number Diff line change
@@ -39,6 +39,10 @@
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-mp</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-yaml-mp</artifactId>
</dependency>
<dependency>
<groupId>io.helidon.config</groupId>
<artifactId>helidon-config-yaml</artifactId>
46 changes: 46 additions & 0 deletions tests/integration/config/gh-4375/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2022 Oracle and/or its affiliates.
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.
-->

<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>io.helidon.tests.integration</groupId>
<artifactId>helidon-tests-integration-config</artifactId>
<version>3.0.0-SNAPSHOT</version>
</parent>

<artifactId>helidon-tests-integration-config-gh-4375</artifactId>
<name>Helidon Tests Integration GH 4375</name>
<description>Validation for Github issue #4375 - Verify that helidon-config-yaml-mp is part of helidon-microprofile-config</description>

<dependencies>
<dependency>
<groupId>io.helidon.microprofile.config</groupId>
<artifactId>helidon-microprofile-config</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2022 Oracle and/or its affiliates.
*
* 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.
*/

package io.helidon.tests.integration.gh4375;

import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import org.eclipse.microprofile.config.Config;
import org.eclipse.microprofile.config.ConfigProvider;

class YamlMpConfigTest {
private Config config;

@BeforeEach
void initialize() {
this.config = ConfigProvider.getConfig();
Assertions.assertNotNull(this.config);
}

@Test
void TestYamlMpConfigExistsInMicroprofileConfig() {
Assertions.assertTrue(this.config.getValue("yamlMpConfigExists", Boolean.class));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2022 Oracle and/or its affiliates.
#
# 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.
#

yamlMpConfigExists: true
10 changes: 0 additions & 10 deletions tests/integration/config/hocon-mp/pom.xml
Original file line number Diff line number Diff line change
@@ -47,15 +47,5 @@
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.helidon.microprofile.tests</groupId>
<artifactId>helidon-microprofile-tests-junit5</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
*
* This will use SeContainerInitializer rather than @HelidonTest as the latter does not make meta-config work
*/
public class HoconJsonMpMetaConfigTest {
class HoconJsonMpMetaConfigTest {
private static ConfigBean bean;
private static SeContainer container;

0 comments on commit 8cf4b02

Please sign in to comment.