lib/buildr4osgi/osgi/registry.rb in buildr4osgi-0.9.3 vs lib/buildr4osgi/osgi/registry.rb in buildr4osgi-0.9.4
- old
+ new
@@ -43,10 +43,23 @@
# A class to hold the registered containers. It is possible to add containers until resolved_containers is called,
# after which it is not possible to modify the registry anymore.
#
class Registry
+ def release_to
+ unless @release_to
+ prefs = Buildr.settings.build
+ @release_to = prefs['osgi']['release_to'].strip unless prefs['osgi'].nil? || prefs['osgi']['release_to'].nil?
+ @release_to ||= "#{ENV['HOME']}/.m2/osgi"
+ end
+ @release_to
+ end
+
+ def release_to=(release_to)
+ @release_to = release_to
+ end
+
#
# Sets the containers of the registry
# Raises an exception if containers have been resolved already.
#
def containers=(containers)
@@ -120,6 +133,6 @@
def registry
@registry ||= ::OSGi::Registry.new
end
-end
\ No newline at end of file
+end