You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by st...@apache.org on 2014/12/27 14:57:49 UTC
[05/34] incubator-tamaya git commit: first step: move all sources to
a 'dormant' directory
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/BuildableEnvironment.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/BuildableEnvironment.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/BuildableEnvironment.java
deleted file mode 100644
index 3633c97..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/BuildableEnvironment.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment;
-
-import java.util.*;
-
-/**
- * Environment class that is used by the {@link org.apache.tamaya.metamodel.environment.EnvironmentBuilder}.
- */
-class BuildableEnvironment implements Environment {
-
- /** The environment data. */
- private Map<String,String> context = new TreeMap<>();
-
- /**
- * Constructor.
- * @param builder the builder, not null.
- */
- BuildableEnvironment(EnvironmentBuilder builder){
- Objects.requireNonNull(builder);
- context.putAll(builder.contextData);
- }
-
- @Override
- public Map<String, String> toMap() {
- return context;
- }
-
- @Override
- public Optional<String> get(String key){
- return Optional.ofNullable(context.get(key));
- }
-
- @Override
- public boolean containsKey(String key){
- return context.containsKey(key);
- }
-
- @Override
- public Set<String> keySet() {
- return context.keySet();
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o) return true;
- if (o == null || getClass() != o.getClass()) return false;
-
- BuildableEnvironment that = (BuildableEnvironment) o;
- return context.equals(that.context);
- }
-
- @Override
- public int hashCode() {
- return context.hashCode();
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString(){
- return "Environment: " + getData();
- }
-
- /**
- * Get the delta.
- * @return
- */
- private String getData() {
- StringBuilder b = new StringBuilder();
- for(Map.Entry<String,String> en: this.context.entrySet()){
- b.append(" ").append(en.getKey()).append('=').append(escape(en.getValue())).append('\n');
- }
- if(b.length()>0)
- b.setLength(b.length()-1);
- return b.toString();
- }
-
- /**
- * Escapes several characters.
- * @param value
- * @return
- */
- private String escape(String value){
- if(value==null)
- return null;
- return value.replaceAll("\n", "\\\\n").replaceAll("\r", "\\\\r").replaceAll("\t", "\\\\t")
- .replaceAll("=", "\\\\=");
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/Environment.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/Environment.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/Environment.java
deleted file mode 100644
index 8a8b157..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/Environment.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment;
-
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentSpi;
-import org.apache.tamaya.spi.ServiceContext;
-
-import java.util.Map;
-import java.util.Optional;
-import java.util.Set;
-
-/**
- * Models a runtime environment. Instances current this class are used to
- * evaluate the correct configuration artifacts.<br/>
- * <h3>Implementation Requirements</h3>
- * <p>
- * Implementations current this interface must be
- * <ul>
- * <li>Thread safe.
- * <li>Immutable
- * <li>serializable
- * </ul>
- */
-public interface Environment{
-
- /**
- * Access a property.
- * @param key the property's key, not null.
- * @return the property's keys.
- */
- Optional<String> get(String key);
-
- /**
- * Checks if a property is defined.
- * @param key the property's key, not null.
- * @return true, if the property is existing.
- */
- boolean containsKey(String key);
-
- /**
- * Access the set current property keys, defined by this provider.
- * @return the key set, never null.
- */
- Set<String> keySet();
-
- /**
- * Access the environment as Map.
- * @return the Map instance containing the environments properties, never null.
- */
- Map<String,String> toMap();
-
- /**
- * Get the current {@link org.apache.tamaya.metamodel.environment.Environment}. The environment is used to determine the current runtime state, which
- * is important for returning the correct configuration.
- * @return the current Environment, never null.
- */
- public static Environment current(){
- return ServiceContext.getInstance().getSingleton(EnvironmentSpi.class).getCurrentEnvironment();
- }
-
- /**
- * Get the current {@link Environment}. The environment is used to determine the current runtime state, which
- * is important for returning the correct configuration.
- * @return the current Environment, never null.
- */
- public static Environment root(){
- return ServiceContext.getInstance().getSingleton(EnvironmentSpi.class).getRootEnvironment();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/EnvironmentBuilder.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/EnvironmentBuilder.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/EnvironmentBuilder.java
deleted file mode 100644
index 17ec34b..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/EnvironmentBuilder.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment;
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Objects;
-
-/**
-* Builder to create new {@link Environment instances.}
-*/
-public final class EnvironmentBuilder{
-
- /** The property name for the stage property. */
- public static final String STAGE_PROP = "stage";
-
- /** THe environment data. */
- Map<String,String> contextData = new HashMap<>();
-
- /**
- * Constructor.
- */
- private EnvironmentBuilder() {
- }
-
- /**
- * Creates a new buildr instance.
- * @return the new builder instance.
- */
- public static final EnvironmentBuilder of() {
- return new EnvironmentBuilder();
- }
-
- /**
- * Sets a new environment property.
- * @param key the key, not null.
- * @param value the keys, not null.
- * @return the builder for chaining
- */
- public EnvironmentBuilder set(String key, String value){
- this.contextData.put(key, value);
- return this;
- }
-
- /**
- * Sets new environment properties.
- * @param values the key/values, not null.
- * @return the builder for chaining
- */
- public EnvironmentBuilder setAll(Map<String,String> values){
- this.contextData.putAll(values);
- return this;
- }
-
- /**
- * Sets the stage using the default stage key.
- * @param stage The stage, not null.
- * @return the builder for chaining.
- */
- public EnvironmentBuilder setStage(String stage){
- this.contextData.put(STAGE_PROP, Objects.requireNonNull(stage));
- return this;
- }
-
- /**
- * Access a property
- * @param key the key, not null.
- * @return the builder for chaining.
- */
- public String getProperty(String key) {
- return this.contextData.get(key);
- }
-
- /**
- * Builds a new Environment.
- * @return a new Environment, never null.
- */
- public Environment build() {
- return new BuildableEnvironment(this);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentApplicationEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentApplicationEnvironmentProvider.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentApplicationEnvironmentProvider.java
deleted file mode 100644
index db4a7c7..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentApplicationEnvironmentProvider.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment.internal;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.tamaya.core.config.ConfigurationFormats;
-import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.core.resource.ResourceLoader;
-import org.apache.tamaya.core.properties.ConfigurationFormat;
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentProvider;
-import org.apache.tamaya.spi.ServiceContext;
-
-/**
- * Application environment provider that is dependent on the current context classloader and tries to
- * evaluate {@code META-INF/env/application.properties, META-INF/env/application.xml and META-INF/env/application.ini}.
- * Only if a property named {@code org.apache.tamaya.env.applicationId} is found, it will
- * be used as the {@code environmentId} and a corresponding {@link org.apache.tamaya.metamodel.environment.Environment} instance
- * is created and attached.
- */
-public class ClassLoaderDependentApplicationEnvironmentProvider implements EnvironmentProvider {
-
- private static final Logger LOG = Logger.getLogger(ClassLoaderDependentApplicationEnvironmentProvider.class.getName());
-
- private Map<ClassLoader, Map<String,String>> environments = new ConcurrentHashMap<>();
- private Map<ClassLoader, Boolean> environmentAvailable = new ConcurrentHashMap<>();
-
- @Override
- public boolean isActive() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if(cl==null){
- return false;
- }
- Boolean available = this.environmentAvailable.get(cl);
- if(available!=null && !available){
- return false;
- }
- List<Resource> propertyUris = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
- "classpath:META-INF/env/application.properties", "classpath:META-INF/env/application.xml", "classpath:META-INF/env/application.ini");
- available = !propertyUris.isEmpty();
- this.environmentAvailable.put(cl, available);
- return available;
- }
-
- @Override
- public Map<String,String> getEnvironmentData() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if(cl==null){
- return null;
- }
- Map<String,String> data = this.environments.get(cl);
- if(data!=null){
- return data;
- }
- List<Resource> propertyUris = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
- "classpath:META-INF/env/application.properties", "classpath:META-INF/env/application.xml", "classpath:META-INF/env/application.ini");
- data = new HashMap<>();
-
- for(Resource resource:propertyUris){
- try{
- ConfigurationFormat format = ConfigurationFormats.getFormat(resource);
- data.putAll(format.readConfiguration(resource));
- }
- catch(Exception e){
- LOG.log(Level.SEVERE, e, () -> "Error reading application environment data fromMap " + resource);
- }
- }
- data.put("classloader.type", cl.getClass().getName());
- data.put("classloader.info", cl.toString());
- Set<Resource> uris = new HashSet<>();
- uris.addAll(propertyUris);
- data.put("environment.sources", uris.toString());
- data = Collections.unmodifiableMap(data);
- this.environments.put(cl, data);
- return data;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentEarEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentEarEnvironmentProvider.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentEarEnvironmentProvider.java
deleted file mode 100644
index 2ef88ec..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/ClassLoaderDependentEarEnvironmentProvider.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment.internal;
-
-import org.apache.tamaya.core.config.ConfigurationFormats;
-import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.metamodel.environment.EnvironmentBuilder;
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentProvider;
-import org.apache.tamaya.spi.ServiceContext;
-import org.apache.tamaya.core.properties.ConfigurationFormat;
-import org.apache.tamaya.core.resource.ResourceLoader;
-
-
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * This class implements a {@link EnvironmentProvider} that tries
- * to read configuration for an ear deployment located under {@code META-INF/env/ear.properties,
- * META-INF/env/ear.xml or META-INF/env/ear.ini}. The environment id hereby is defined by a
- * configuration entry named {@code org.apache.tamaya.core.env.earId}.
- *
- * Only if such a configuration with such an {@code earId} is found an {@link org.apache.tamaya.metamodel.environment.Environment}
- * is created and attached to the corresponding ear classloader.
- */
-public class ClassLoaderDependentEarEnvironmentProvider implements EnvironmentProvider {
-
- private static final Logger LOG = Logger.getLogger(ClassLoaderDependentEarEnvironmentProvider.class.getName());
-
-// private static final String EARID_PROP = "environment.earId";
-
- private Map<ClassLoader, Map<String,String>> environments = new ConcurrentHashMap<>();
- private Map<ClassLoader, Boolean> environmentAvailable = new ConcurrentHashMap<>();
-
- @Override
- public boolean isActive() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if(cl==null){
- return false;
- }
- Boolean available = this.environmentAvailable.get(cl);
- if(available!=null && !available){
- return false;
- }
- List<Resource> propertyUris = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
- "classpath:META-INF/env/ear.properties", "classpath:META-INF/env/ear.xml", "classpath:META-INF/env/ear.ini");
- available = !propertyUris.isEmpty();
- this.environmentAvailable.put(cl, available);
- return available;
- }
-
- @Override
- public Map<String,String> getEnvironmentData() {
- ClassLoader cl = Thread.currentThread().getContextClassLoader();
- if(cl==null){
- return null;
- }
- Map<String,String> data = this.environments.get(cl);
- if(data!=null){
- return data;
- }
- List<Resource> resources = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(cl,
- "classpath:META-INF/env/ear.properties", "classpath:META-INF/env/ear.xml", "classpath:META-INF/env/ear.ini");
- data = new HashMap<>();
- for(Resource resource:resources){
- try{
- ConfigurationFormat format = ConfigurationFormats.getFormat(resource);
- Map<String,String> read = format.readConfiguration(resource);
- data.putAll(read);
- }
- catch(Exception e){
- LOG.log(Level.SEVERE, e, () -> "Error reading ear environment data fromMap " + resource);
- }
- }
-// String earId = data.getOrDefault(EARID_PROP, cl.toString());
- String stageValue = data.get(EnvironmentBuilder.STAGE_PROP);
- if (stageValue != null) {
- data.put(EnvironmentBuilder.STAGE_PROP,stageValue);
- }
- data.put("classloader.type", cl.getClass().getName());
- data.put("classloader.info", cl.toString());
- Set<Resource> resourceSet = new HashSet<>();
- resourceSet.addAll(resources);
- data.put("environment.sources", resourceSet.toString());
- data = Collections.unmodifiableMap(data);
- this.environments.put(cl, data);
- return data;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/InitialEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/InitialEnvironmentProvider.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/InitialEnvironmentProvider.java
deleted file mode 100644
index 9321539..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/InitialEnvironmentProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment.internal;
-
-import java.net.InetAddress;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.TimeZone;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import org.apache.tamaya.core.env.ConfiguredSystemProperties;
-import org.apache.tamaya.metamodel.environment.EnvironmentBuilder;
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentProvider;
-
-/**
- * Default {@link org.apache.tamaya.metamodel.environment.Environment}.
- */
-public final class InitialEnvironmentProvider implements EnvironmentProvider{
-
- private Map<String,String> environmentData = new HashMap<>();
-
- public InitialEnvironmentProvider() {
- Properties props = System.getProperties();
- if(props instanceof ConfiguredSystemProperties){
- props = ((ConfiguredSystemProperties)props).getInitialProperties();
- }
- String stageValue = props.getProperty(EnvironmentBuilder.STAGE_PROP);
- environmentData.put(EnvironmentBuilder.STAGE_PROP, stageValue);
- environmentData.put("timezone", TimeZone.getDefault().getID());
- environmentData.put("locale", Locale.getDefault().toString());
- try {
- environmentData.put("host", InetAddress.getLocalHost().toString());
- } catch (Exception e) {
- Logger.getLogger(getClass().getName()).log(Level.WARNING, e, () -> "Failed to evaluate hostname.");
- }
- // Copy env properties....
- for (Entry<String, String> en : System.getenv().entrySet()) {
- environmentData.put(en.getKey(), en.getValue());
- }
- environmentData = Collections.unmodifiableMap(environmentData);
- }
-
- @Override
- public boolean isActive(){
- return true;
- }
-
- @Override
- public Map<String,String> getEnvironmentData() {
- return environmentData;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SingleEnvironmentManager.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SingleEnvironmentManager.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SingleEnvironmentManager.java
deleted file mode 100644
index cbf177d..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SingleEnvironmentManager.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment.internal;
-
-
-import org.apache.tamaya.metamodel.environment.Environment;
-import org.apache.tamaya.metamodel.environment.EnvironmentBuilder;
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentProvider;
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentSpi;
-import org.apache.tamaya.spi.ServiceContext;
-
-import java.util.*;
-
-/**
- * Service for accessing {@link org.apache.tamaya.metamodel.environment.Environment}. Environments are used to
- * access/determine configurations.<br/>
- * <h3>Implementation PropertyMapSpec</h3> This class is
- * <ul>
- * <li>thread safe,
- * <li>and behaves contextual.
- * </ul>
- */
-public class SingleEnvironmentManager implements EnvironmentSpi {
-
- private final List<EnvironmentProvider> environmentProviders = loadEnvironmentProviders();
- private Environment rootEnvironment = getCurrentEnvironment();
-
- private List<EnvironmentProvider> loadEnvironmentProviders() {
- List<EnvironmentProvider> providerList = new ArrayList<>();
- for(EnvironmentProvider prov: ServiceContext.getInstance().getServices(EnvironmentProvider.class)){
- providerList.add(prov);
- }
- return providerList;
- }
-
- @Override
- public Environment getCurrentEnvironment(){
- EnvironmentBuilder b = EnvironmentBuilder.of();
- for(EnvironmentProvider prov: environmentProviders){
- if(prov.isActive()){
- if(prov.isActive()){
- b.setAll(prov.getEnvironmentData());
- }
- }
- }
- return b.build();
- }
-
- @Override
- public Environment getRootEnvironment(){
- return rootEnvironment;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SystemClassLoaderEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SystemClassLoaderEnvironmentProvider.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SystemClassLoaderEnvironmentProvider.java
deleted file mode 100644
index e943971..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/internal/SystemClassLoaderEnvironmentProvider.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment.internal;
-
-import org.apache.tamaya.core.config.ConfigurationFormats;
-import org.apache.tamaya.core.resource.Resource;
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentProvider;
-import org.apache.tamaya.spi.ServiceContext;
-import org.apache.tamaya.core.properties.ConfigurationFormat;
-import org.apache.tamaya.core.resource.ResourceLoader;
-
-
-import java.util.*;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-/**
- * System environment provider (loaded only once using the system class loader) that loads additional environment properties fromMap the classpath evaluating
- * {@code META-INF/env/system.properties, META-INF/env/system.xml and META-INF/env/system.ini}.
- */
-public class SystemClassLoaderEnvironmentProvider implements EnvironmentProvider {
-
- private static final Logger LOG = Logger.getLogger(SystemClassLoaderEnvironmentProvider.class.getName());
-
- private Map<String,String> data = new HashMap<>();
-
-
- public SystemClassLoaderEnvironmentProvider(){
- List<Resource> propertyResources = ServiceContext.getInstance().getSingleton(ResourceLoader.class).getResources(ClassLoader.getSystemClassLoader(),
- "classpath:META-INF/env/system.properties", "classpath:META-INF/env/system.xml", "classpath:META-INF/env/system.ini");
- for(Resource resource:propertyResources){
- try{
- ConfigurationFormat format = ConfigurationFormats.getFormat(resource);
- Map<String,String> data = format.readConfiguration(resource);
- data.putAll(data);
- }
- catch(Exception e){
- LOG.log(Level.INFO, e, () -> "Could not read environment data from " + resource);
- }
- }
- data.put("classloader.type", ClassLoader.getSystemClassLoader().getClass().getName());
- data.put("classloader.info", ClassLoader.getSystemClassLoader().toString());
- Set<Resource> resourceSet = new HashSet<>();
- resourceSet.addAll(propertyResources);
- data.put("environment.system.sources", resourceSet.toString());
- this.data = Collections.unmodifiableMap(data);
- }
- @Override
- public boolean isActive() {
- return true;
- }
-
- @Override
- public Map<String,String> getEnvironmentData() {
- return data;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentProvider.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentProvider.java
deleted file mode 100644
index ef4ff43..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentProvider.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment.spi;
-
-import java.util.Map;
-
-/**
- * SPI for components that define a concrete type current {@link org.apache.tamaya.metamodel.environment.Environment}.
- * The chain current environment config determine the current {@link org.apache.tamaya.metamodel.environment.Environment} active
- * and its parent instances.
- * Created by Anatole on 14.10.2014.
- */
-public interface EnvironmentProvider {
-
- /**
- * Evaluates if an environment is currently active.
- * @return
- */
- boolean isActive();
-
- /**
- * Returns the properties to be added to the environment.
- * @return the properties, or an empty map if no properties are to be added (or the provider is not active for the
- * current runtime state).
- */
- Map<String,String> getEnvironmentData();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentSpi.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentSpi.java b/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentSpi.java
deleted file mode 100644
index dbf8f65..0000000
--- a/modules/metamodels/environment/src/main/java/org/apache/tamaya/metamodel/environment/spi/EnvironmentSpi.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment.spi;
-
-
-import org.apache.tamaya.metamodel.environment.Environment;
-
-/**
- * Service for accessing {@link org.apache.tamaya.metamodel.environment.Environment}. Environments are used to
- * access/determine configurations.<br/>
- * <h3>Implementation PropertyMapSpec</h3> This class is
- * <ul>
- * <li>thread safe,
- * <li>and behaves contextual.
- * </ul>
- */
-public interface EnvironmentSpi {
-
- /**
- * Get the current environment current the given environment type.
- * @return the corresponding environment, never null.
- * @throws IllegalArgumentException if not such type is present or active.
- */
- Environment getCurrentEnvironment();
-
- /**
- * Get the current environment current the given environment type.
- * @return the corresponding environment, never null.
- * @throws IllegalArgumentException if not such type is present or active.
- */
- Environment getRootEnvironment();
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.EnvironmentProvider
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.EnvironmentProvider b/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.EnvironmentProvider
deleted file mode 100644
index 3592434..0000000
--- a/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.EnvironmentProvider
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# 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.tamaya.core.internal.env.InitialEnvironmentProvider
-org.apache.tamaya.core.internal.env.SystemClassLoaderEnvironmentProvider
-org.apache.tamaya.core.internal.env.ClassLoaderDependentEarEnvironmentProvider
-org.apache.tamaya.core.internal.env.ClassLoaderDependentApplicationEnvironmentProvider
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.spi.EnvironmentSpi
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.spi.EnvironmentSpi b/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.spi.EnvironmentSpi
deleted file mode 100644
index 4a5b828..0000000
--- a/modules/metamodels/environment/src/main/resources/META-INF/services/org.apache.tamaya.spi.EnvironmentSpi
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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.tamaya.metamodel.environment.TestEnvironmentManagerSingleton
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/EnvironmentManagerTest.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/EnvironmentManagerTest.java b/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/EnvironmentManagerTest.java
deleted file mode 100644
index 5abdd8e..0000000
--- a/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/EnvironmentManagerTest.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment;
-
-import org.apache.tamaya.Environment;
-import org.junit.Test;
-
-
-import static org.junit.Assert.*;
-
-/**
- * Tests for basic {@link org.apache.tamaya.EnvironmentManager} functionality.
- * Created by Anatole on 17.10.2014.
- */
-public class EnvironmentManagerTest {
-
- @Test
- public void testGetEnvironment(){
- Environment env = Environment.current();
- assertNotNull(env);
- Environment env2 = Environment.current();
- assertNotNull(env2);
- assertFalse("Current Environments requested in same context are not the same!", env==env2);
- }
-
- @Test
- public void testGetRootEnvironment(){
- Environment env = Environment.root();
- assertNotNull(env);
- Environment env2 = Environment.root();
- assertNotNull(env2);
- assertTrue("Root Environments requested in same context are not the same!", env==env2);
- }
-
- @Test
- public void testRootIsNotCurrentEnvironment(){
- Environment env1 = Environment.root();
- Environment env2 = Environment.current();
- assertNotNull(env1);
- assertNotNull(env2);
- // within this test environment these are always the same
- assertEquals(env1, env2);
- }
-
- @Test
- public void testEnvironmentOverride(){
- assertEquals(Environment.root().get("user.country").get(),System.getProperty("user.country"));
- assertEquals(Environment.current().get("user.country").get(), System.getProperty("user.country"));
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentManagerSingleton.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentManagerSingleton.java b/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentManagerSingleton.java
deleted file mode 100644
index 83a6056..0000000
--- a/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentManagerSingleton.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment;
-
-import org.apache.tamaya.metamodel.environment.spi.EnvironmentSpi;
-
-/**
- * Created by Anatole on 12.09.2014.
- */
-public class TestEnvironmentManagerSingleton implements EnvironmentSpi {
- @Override
- public Environment getCurrentEnvironment(){
- return null;
- }
-
- @Override
- public Environment getRootEnvironment(){
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentProvider.java
----------------------------------------------------------------------
diff --git a/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentProvider.java b/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentProvider.java
deleted file mode 100644
index 7524a80..0000000
--- a/modules/metamodels/environment/src/test/java/org/apache/tamaya/metamodel/environment/TestEnvironmentProvider.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * 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.tamaya.metamodel.environment;
-
-import org.apache.tamaya.core.spi.EnvironmentProvider;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Environment provider used by some tests.
- */
-public class TestEnvironmentProvider implements EnvironmentProvider {
- private Map<String, String> data = new HashMap<>();
-
- public TestEnvironmentProvider(){
- data.put("user.country", System.getProperty("user.country"));
- data.put("java.version", System.getProperty("java.version"));
- data = Collections.unmodifiableMap(data);
- }
-
- @Override
- public boolean isActive() {
- return true;
- }
-
- @Override
- public Map<String, String> getEnvironmentData() {
- return data;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/pom.xml
----------------------------------------------------------------------
diff --git a/modules/metamodels/pom.xml b/modules/metamodels/pom.xml
deleted file mode 100644
index 74b338f..0000000
--- a/modules/metamodels/pom.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-<!--
-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.
--->
-<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.tamaya.ext</groupId>
- <artifactId>tamaya-ext-all</artifactId>
- <version>0.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <groupId>org.apache.tamaya.metamodels</groupId>
- <artifactId>tamaya-metamodels-all</artifactId>
- <name>Apache Tamaya Modules Metamodels</name>
- <packaging>pom</packaging>
-
- <properties>
- <github.global.server>github</github.global.server>
- <jdkVersion>1.8</jdkVersion>
- <maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
- <maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
- </properties>
-
- <modules>
- <module>simple</module>
- <module>environment</module>
- </modules>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/simple/pom.xml
----------------------------------------------------------------------
diff --git a/modules/metamodels/simple/pom.xml b/modules/metamodels/simple/pom.xml
deleted file mode 100644
index 792a045..0000000
--- a/modules/metamodels/simple/pom.xml
+++ /dev/null
@@ -1,73 +0,0 @@
-<!--
-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.tamaya.metamodels</groupId>
- <artifactId>tamaya-metamodels-all</artifactId>
- <version>0.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>tamaya-metamodel-simple</artifactId>
- <name>Apache Tamaya Modules Metamodels - Simple</name>
- <description>Simple Tamaya Metamodel, e.g. feasible for SE commandline tools and simple use cases.</description>
- <packaging>jar</packaging>
-
- <properties>
- <jdkVersion>1.8</jdkVersion>
- <maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
- <maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.jacoco</groupId>
- <artifactId>jacoco-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-agent</id>
- <goals>
- <goal>prepare-agent</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>${maven.compile.sourceLevel}</source>
- <target>${maven.compile.targetLevel}</target>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/metamodels/simple/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.ConfigurationProviderSpi
----------------------------------------------------------------------
diff --git a/modules/metamodels/simple/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.ConfigurationProviderSpi b/modules/metamodels/simple/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.ConfigurationProviderSpi
deleted file mode 100644
index b3a2634..0000000
--- a/modules/metamodels/simple/src/main/resources/META-INF/services/org.apache.tamaya.core.spi.ConfigurationProviderSpi
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# 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.tamaya.metamodel.simple.SimpleConfigProvider
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/modules/pom.xml
----------------------------------------------------------------------
diff --git a/modules/pom.xml b/modules/pom.xml
deleted file mode 100644
index e012023..0000000
--- a/modules/pom.xml
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
-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.
--->
-<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.tamaya</groupId>
- <artifactId>tamaya-all</artifactId>
- <version>0.1-SNAPSHOT</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>tamaya-ext-all</artifactId>
- <groupId>org.apache.tamaya.ext</groupId>
- <name>Apache Tamaya Modules</name>
- <packaging>pom</packaging>
-
- <properties>
- <github.global.server>github</github.global.server>
- <jdkVersion>1.8</jdkVersion>
- <maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
- <maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-core</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.openejb</groupId>
- <artifactId>mbean-annotation-api</artifactId>
- <version>4.7.1</version>
- </dependency>
- </dependencies>
-
- <modules>
- <module>metamodels</module>
- <module>integration</module>
- <!-- <module>environment</module> -->
- </modules>
-
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/d9964c64/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 329d20a..a2260fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,8 +17,8 @@ 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>
+ 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>
@@ -26,31 +26,31 @@ under the License.
<version>16</version>
</parent>
<groupId>org.apache.tamaya</groupId>
- <artifactId>tamaya-all</artifactId>
- <version>0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
- <name>Apache Tamaya</name>
- <description>Apache Tamaya - Java Configuration</description>
+ <artifactId>tamaya-all</artifactId>
+ <version>0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Apache Tamaya</name>
+ <description>Apache Tamaya - Java Configuration</description>
<url>http://tamaya.incubator.apache.org</url>
<inceptionYear>2014</inceptionYear>
- <organization>
- <name>Apache Software Foundation</name>
- <url>http://apache.org</url>
- </organization>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://apache.org</url>
+ </organization>
-
- <properties>
+
+ <properties>
<findbugs.skip>true</findbugs.skip>
- <jdkVersion>1.8</jdkVersion>
- <maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
- <maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
+ <jdkVersion>1.8</jdkVersion>
+ <maven.compile.targetLevel>${jdkVersion}</maven.compile.targetLevel>
+ <maven.compile.sourceLevel>${jdkVersion}</maven.compile.sourceLevel>
<maven.compile.optimize>false</maven.compile.optimize>
<maven.compile.deprecation>true</maven.compile.deprecation>
<maven.javadoc.skip>true</maven.javadoc.skip>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<rat.skip>false</rat.skip>
- <junit.version>4.12</junit.version>
+ <junit.version>4.12</junit.version>
<!-- Dependency and plugin relate version properties go here -->
<asciidoctor.version>1.5.0</asciidoctor.version>
@@ -64,7 +64,7 @@ under the License.
<jruby.version>1.7.16.1</jruby.version>
<findbugs.version>3.0.0</findbugs.version>
<rat.version>0.11</rat.version>
- </properties>
+ </properties>
<licenses>
<license>
@@ -193,19 +193,19 @@ under the License.
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.2.201409121644</version>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.1</version>
- <configuration>
- <debug>true</debug>
- <optimize>${maven.compile.optimize}</optimize>
- <source>${maven.compile.sourceLevel}</source>
- <target>${maven.compile.targetLevel}</target>
- <encoding>${project.build.sourceEncoding}</encoding>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.1</version>
+ <configuration>
+ <debug>true</debug>
+ <optimize>${maven.compile.optimize}</optimize>
+ <source>${maven.compile.sourceLevel}</source>
+ <target>${maven.compile.targetLevel}</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
<showDeprecation>${maven.compile.deprecation}</showDeprecation>
- </configuration>
- </plugin>
+ </configuration>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
@@ -306,8 +306,8 @@ under the License.
<version>3.3</version>
<inherited>true</inherited>
</plugin>
- </plugins>
- </pluginManagement>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
@@ -363,7 +363,7 @@ under the License.
<artifactId>apache-rat-plugin</artifactId>
</plugin>
</plugins>
- </build>
+ </build>
<dependencyManagement>
<dependencies>