You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by st...@apache.org on 2017/04/21 22:41:24 UTC
svn commit: r1792250 [2/2] - in /geronimo/components/config/trunk: ./ impl/
impl/src/ impl/src/main/ impl/src/main/java/ impl/src/main/java/org/
impl/src/main/java/org/apache/ impl/src/main/java/org/apache/geronimo/
impl/src/main/java/org/apache/geroni...
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemEnvConfigSource.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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 org.apache.geronimo.config.configsource;
+
+import java.util.Map;
+
+import javax.enterprise.inject.Typed;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.ConfigSource;
+
+/**
+ * {@link ConfigSource} which uses {@link System#getProperties()}
+ *
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Typed
+@Vetoed
+public class SystemPropertyConfigSource extends BaseConfigSource {
+ public SystemPropertyConfigSource() {
+ initOrdinal(400);
+ }
+
+ @Override
+ public Map<String, String> getProperties() {
+ return (Map) System.getProperties();
+ }
+
+ @Override
+ public String getValue(String key) {
+ return System.getProperty(key);
+ }
+
+ @Override
+ public String getName() {
+ return "system-properties";
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/configsource/SystemPropertyConfigSource.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/BooleanConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/BooleanConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/BooleanConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/BooleanConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class BooleanConverter implements Converter<Boolean> {
+
+ public static final BooleanConverter INSTANCE = new BooleanConverter();
+
+ @Override
+ public Boolean convert(String value) {
+ if (value != null) {
+ return "TRUE".equalsIgnoreCase(value)
+ || "1".equalsIgnoreCase(value)
+ || "YES".equalsIgnoreCase(value)
+ || "Y".equalsIgnoreCase(value)
+ || "ON".equalsIgnoreCase(value)
+ || "JA".equalsIgnoreCase(value)
+ || "J".equalsIgnoreCase(value)
+ || "OUI".equalsIgnoreCase(value);
+ }
+
+ return null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/BooleanConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DoubleConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DoubleConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DoubleConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DoubleConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class DoubleConverter implements Converter<Double> {
+
+ public static final DoubleConverter INSTANCE = new DoubleConverter();
+
+ @Override
+ public Double convert(String value) {
+ return value != null ? Double.valueOf(value) : null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DoubleConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DurationConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DurationConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DurationConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DurationConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import java.time.Duration;
+import java.time.format.DateTimeParseException;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class DurationConverter implements Converter<Duration> {
+
+ public static final DurationConverter INSTANCE = new DurationConverter();
+
+ @Override
+ public Duration convert(String value) {
+ if (value != null) {
+ try {
+ return Duration.parse(value);
+ }
+ catch (DateTimeParseException dtpe) {
+ throw new IllegalArgumentException(dtpe);
+ }
+ }
+ return null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/DurationConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/FloatConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/FloatConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/FloatConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/FloatConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class FloatConverter implements Converter<Float> {
+
+ public static final FloatConverter INSTANCE = new FloatConverter();
+
+ @Override
+ public Float convert(String value) {
+ return value != null ? Float.valueOf(value) : null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/FloatConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/IntegerConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/IntegerConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/IntegerConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/IntegerConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class IntegerConverter implements Converter<Integer> {
+
+ public static final IntegerConverter INSTANCE = new IntegerConverter();
+
+ @Override
+ public Integer convert(String value) {
+ return value != null ? Integer.valueOf(value) : null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/IntegerConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import java.time.LocalDate;
+import java.time.format.DateTimeParseException;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class LocalDateConverter implements Converter<LocalDate> {
+
+ public static final LocalDateConverter INSTANCE = new LocalDateConverter();
+
+ @Override
+ public LocalDate convert(String value) {
+ if (value != null) {
+ try {
+ return LocalDate.parse(value);
+ }
+ catch (DateTimeParseException dtpe) {
+ throw new IllegalArgumentException(dtpe);
+ }
+ }
+ return null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateTimeConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateTimeConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateTimeConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateTimeConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import java.time.LocalDateTime;
+import java.time.format.DateTimeParseException;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class LocalDateTimeConverter implements Converter<LocalDateTime> {
+
+ public static final LocalDateTimeConverter INSTANCE = new LocalDateTimeConverter();
+
+ @Override
+ public LocalDateTime convert(String value) {
+ if (value != null) {
+ try {
+ return LocalDateTime.parse(value);
+ }
+ catch (DateTimeParseException dtpe) {
+ throw new IllegalArgumentException(dtpe);
+ }
+ }
+ return null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalDateTimeConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalTimeConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalTimeConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalTimeConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalTimeConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import java.time.LocalTime;
+import java.time.format.DateTimeParseException;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class LocalTimeConverter implements Converter<LocalTime> {
+
+ public static final LocalTimeConverter INSTANCE = new LocalTimeConverter();
+
+ @Override
+ public LocalTime convert(String value) {
+ if (value != null) {
+ try {
+ return LocalTime.parse(value);
+ }
+ catch (DateTimeParseException dtpe) {
+ throw new IllegalArgumentException(dtpe);
+ }
+ }
+ return null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LocalTimeConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LongConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LongConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LongConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LongConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+/**
+ * @author <a href="mailto:struberg@apache.org">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class LongConverter implements Converter<Long> {
+
+ public static final LongConverter INSTANCE = new LongConverter();
+
+ @Override
+ public Long convert(String value) {
+ return value != null ? Long.valueOf(value) : null;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/LongConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/StringConverter.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/StringConverter.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/StringConverter.java (added)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/StringConverter.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.converters;
+
+import javax.annotation.Priority;
+import javax.enterprise.inject.Vetoed;
+
+import org.eclipse.microprofile.config.spi.Converter;
+
+/**
+ * 1:1 string output. Just to make converter logic happy.
+ *
+ * @author <a href="mailto:struberg@yahoo.de">Mark Struberg</a>
+ */
+@Priority(1)
+@Vetoed
+public class StringConverter implements Converter<String> {
+
+ public static final StringConverter INSTANCE = new StringConverter();
+
+ @Override
+ public String convert(String value) {
+ return value;
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/converters/StringConverter.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/resources/META-INF/beans.xml
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/resources/META-INF/beans.xml?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/resources/META-INF/beans.xml (added)
+++ geronimo/components/config/trunk/impl/src/main/resources/META-INF/beans.xml Fri Apr 21 22:41:24 2017
@@ -0,0 +1,18 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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.
+-->
Propchange: geronimo/components/config/trunk/impl/src/main/resources/META-INF/beans.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension (added)
+++ geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/javax.enterprise.inject.spi.Extension Fri Apr 21 22:41:24 2017
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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 current 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.
+#
+
+org.apache.geronimo.config.cdi.ConfigExtension
\ No newline at end of file
Added: geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigProviderResolver
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigProviderResolver?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigProviderResolver (added)
+++ geronimo/components/config/trunk/impl/src/main/resources/META-INF/services/org.eclipse.microprofile.config.spi.ConfigProviderResolver Fri Apr 21 22:41:24 2017
@@ -0,0 +1,20 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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 current 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.
+#
+
+org.apache.geronimo.config.DefaultConfigProvider
\ No newline at end of file
Added: geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigArchiveProcessor.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigArchiveProcessor.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigArchiveProcessor.java (added)
+++ geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigArchiveProcessor.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.test;
+
+import org.apache.geronimo.config.ConfigImpl;
+import org.apache.geronimo.config.DefaultConfigProvider;
+import org.apache.geronimo.config.cdi.ConfigInjectionProducer;
+import org.apache.geronimo.config.configsource.BaseConfigSource;
+import org.apache.geronimo.config.converters.BooleanConverter;
+import org.eclipse.microprofile.config.spi.ConfigProviderResolver;
+import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
+import org.jboss.arquillian.test.spi.TestClass;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+/**
+ * Adds the whole Config implementation classes and resources to the
+ * Arqillian deployment archive. This is needed to have the container
+ * pick up the beans from within the impl for the TCK tests.
+ *
+ * @author <a href="mailto:struberg@yahoo.de">Mark Struberg</a>
+ */
+public class GeronimoConfigArchiveProcessor implements ApplicationArchiveProcessor {
+
+ @Override
+ public void process(Archive<?> applicationArchive, TestClass testClass) {
+ if (applicationArchive instanceof WebArchive) {
+ JavaArchive configJar = ShrinkWrap
+ .create(JavaArchive.class, "geronimo-config-impl.jar")
+ .addPackage(ConfigImpl.class.getPackage())
+ .addPackage(BooleanConverter.class.getPackage())
+ .addPackage(BaseConfigSource.class.getPackage())
+ .addPackage(ConfigInjectionProducer.class.getPackage())
+ .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml")
+ .addAsServiceProvider(ConfigProviderResolver.class, DefaultConfigProvider.class);
+ ((WebArchive) applicationArchive).addAsLibraries(configJar);
+ }
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigArchiveProcessor.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigExtension.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigExtension.java?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigExtension.java (added)
+++ geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigExtension.java Fri Apr 21 22:41:24 2017
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You 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 org.apache.geronimo.config.test;
+
+import org.jboss.arquillian.container.test.spi.client.deployment.ApplicationArchiveProcessor;
+import org.jboss.arquillian.core.spi.LoadableExtension;
+
+/**
+ * @author <a href="mailto:struberg@yahoo.de">Mark Struberg</a>
+ */
+public class GeronimoConfigExtension implements LoadableExtension {
+ @Override
+ public void register(ExtensionBuilder extensionBuilder) {
+ extensionBuilder.service(ApplicationArchiveProcessor.class, GeronimoConfigArchiveProcessor.class);
+ }
+}
Propchange: geronimo/components/config/trunk/impl/src/test/java/org/apache/geronimo/config/test/GeronimoConfigExtension.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/impl/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension (added)
+++ geronimo/components/config/trunk/impl/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension Fri Apr 21 22:41:24 2017
@@ -0,0 +1,21 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you 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 current 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.
+#
+
+
+org.apache.geronimo.config.test.GeronimoConfigExtension
\ No newline at end of file
Added: geronimo/components/config/trunk/impl/tck-suite.xml
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/tck-suite.xml?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/impl/tck-suite.xml (added)
+++ geronimo/components/config/trunk/impl/tck-suite.xml Fri Apr 21 22:41:24 2017
@@ -0,0 +1,28 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+<!--
+
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<suite name="microprofileconfig-TCK" verbose="2" configfailurepolicy="continue" >
+
+ <test name="Microprofile-config 1_0 TCK">
+ <packages>
+ <package name="org.eclipse.microprofile.config.tck.*">
+ </package>
+
+ </packages>
+ </test>
+
+</suite>
Propchange: geronimo/components/config/trunk/impl/tck-suite.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: geronimo/components/config/trunk/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/pom.xml?rev=1792250&view=auto
==============================================================================
--- geronimo/components/config/trunk/pom.xml (added)
+++ geronimo/components/config/trunk/pom.xml Fri Apr 21 22:41:24 2017
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you 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>org.apache</groupId>
+ <artifactId>apache</artifactId>
+ <version>18</version>
+ </parent>
+
+ <groupId>org.apache.geronimo.config</groupId>
+ <artifactId>config-parent</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <licenses>
+ <license>
+ <name>Apache License, Version 2.0</name>
+ <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ <comments>A business-friendly OSS license</comments>
+ </license>
+ </licenses>
+
+ <prerequisites>
+ <maven>3.1.0</maven>
+ </prerequisites>
+
+ <properties>
+ <maven.compiler.source>1.8</maven.compiler.source>
+ <maven.compiler.target>1.8</maven.compiler.target>
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>microprofile-snapshots</id>
+ <releases><enabled>false</enabled></releases>
+ <snapshots><enabled>true</enabled></snapshots>
+ <url>https://repo.eclipse.org/content/groups/microprofile/</url>
+ </repository>
+ </repositories>
+
+ <modules>
+ <module>impl</module>
+ </modules>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <version>0.12</version>
+ <executions>
+ <execution>
+ <id>rat-check</id>
+ <goals><goal>check</goal></goals>
+ </execution>
+ </executions>
+ <configuration>
+ <excludes>
+ <exclude>.travis.yml.*</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: geronimo/components/config/trunk/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native