Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 3.09 KB

README.textile

File metadata and controls

45 lines (32 loc) · 3.09 KB

Build Status Quality Gate Apache License, Version 2.0 © 2012-2019 Erwin Müller

Description

Adds Groovy support to compile Groovy sources and test sources as an OSGi bundle

Loads properties from a properties file. The properties keys are prefixed with the context, if not already present. The context is an object package name. For example, if the context object is the class ContextProperties then the context is “com.anrisoftware.propertiesutils”. If then a property with the name “foo” is requested, then the property “com.anrisoftware.propertiesutils.foo” is looked up. Defines additional methods to return different types of properties, like boolean, number, list.

The ContextPropertiesFactory class defines various methods to load a properties resource from the class path. Furthermore, the abstract provider AbstractContextPropertiesProvider can be used to inject loaded properties into a class. See the Javadoc of those classes for examples.

Example Properties File

com.anrisoftware.propertiesutils.testString = Foo
com.anrisoftware.propertiesutils.testWithReplacements = Foo ${foo}
com.anrisoftware.propertiesutils.testWithReplacementsSystem = Foo ${os.name}

Links

License

Copyright ©2012 – 2019 Advanced Natural Research Institute. All rights reserved.

Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.