[DRE-commits] [ruby-jar-dependencies] 06/08: Add patch to use Debian Maven repository
Miguel Landaeta
nomadium at moszumanska.debian.org
Sat Mar 4 19:52:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
nomadium pushed a commit to branch master
in repository ruby-jar-dependencies.
commit e8e542018207789fde3c5ddd89e155e986805ee6
Author: Miguel Landaeta <nomadium at debian.org>
Date: Sat Mar 4 19:24:39 2017 +0000
Add patch to use Debian Maven repository
---
.../01-add-debian-maven-repo-settings.patch | 56 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 57 insertions(+)
diff --git a/debian/patches/01-add-debian-maven-repo-settings.patch b/debian/patches/01-add-debian-maven-repo-settings.patch
new file mode 100644
index 0000000..1b1748c
--- /dev/null
+++ b/debian/patches/01-add-debian-maven-repo-settings.patch
@@ -0,0 +1,56 @@
+Description: Set up jar-dependencies to use Debian Maven offline repository
+Author: Miguel Landaeta <nomadium at debian.org>
+Forwarded: no
+Last-Update: 2017-03-03
+
+--- ruby-jar-dependencies-0.3.10.orig/lib/jar_dependencies.rb
++++ ruby-jar-dependencies-0.3.10/lib/jar_dependencies.rb
+@@ -174,11 +174,16 @@ module Jars
+ Jars::MavenSettings.global_settings
+ end
+
++ def maven_debian_settings
++ Jars::MavenSettings.debian_settings
++ end
++
+ def local_maven_repo
+ @_local_maven_repo ||= absolute(to_prop(LOCAL_MAVEN_REPO)) ||
+ detect_local_repository(maven_local_settings) ||
+ detect_local_repository(maven_user_settings) ||
+ detect_local_repository(maven_global_settings) ||
++ detect_local_repository(maven_debian_settings) ||
+ File.join( user_home, '.m2', 'repository' )
+ end
+
+@@ -278,6 +283,10 @@ module Jars
+ end
+ end
+
++ def debian_mvn_home
++ File.join(File.expand_path(File.dirname(__FILE__)), "..", "..", "..", "share", "maven")
++ end
++
+ private
+
+ def require_jar_with_block( group_id, artifact_id, *classifier_version )
+--- ruby-jar-dependencies-0.3.10.orig/lib/jars/maven_settings.rb
++++ ruby-jar-dependencies-0.3.10/lib/jars/maven_settings.rb
+@@ -98,6 +98,18 @@ module Jars
+ @_jars_maven_global_settings_ || nil
+ end
+
++ def debian_settings
++ unless instance_variable_defined?(:@_jars_maven_debian_settings_)
++ @_jars_maven_debian_settings_ = nil
++ end
++ if @_jars_maven_debian_settings_.nil?
++ settings = File.join( Jars.debian_mvn_home, 'conf/settings-debian.xml' )
++ settings = false unless File.exists?(settings)
++ @_jars_maven_debian_settings_ = settings
++ end
++ @_jars_maven_debian_settings_ || nil
++ end
++
+ private
+
+ def setup_interpolated_settings(http, https)
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..2b63c55
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+01-add-debian-maven-repo-settings.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-jar-dependencies.git
More information about the Pkg-ruby-extras-commits
mailing list