Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow other repositories #3

Open
TigerWolf opened this issue Feb 9, 2015 · 13 comments
Open

Allow other repositories #3

TigerWolf opened this issue Feb 9, 2015 · 13 comments

Comments

@TigerWolf
Copy link

One of the Libraries I would like to use is on JCenter:

https://bintray.com/bintray/jcenter

It appears to be the default repository that Android Studio uses.

Im not very familiar with maven but it looks like this might help:

http://maven.apache.org/guides/mini/guide-mirror-settings.html

It could be done by the user but it would be great if this gem did this.

@jjaffeux
Copy link
Contributor

jjaffeux commented Feb 9, 2015

Hi Tiger,

yes indeed I've been thinking about it, I don't want to mess with the ~/.m2/settings.xml but I think I can add it to the generated pom.

for future reference : http://stackoverflow.com/questions/71030/can-i-add-maven-repositories-in-the-command-line

@jjaffeux
Copy link
Contributor

jjaffeux commented Feb 9, 2015

Could have this api :

maven.repositories do
  repository 'https://bintray.com/bintray/jcenter'
end

@lrz
Copy link
Member

lrz commented Feb 9, 2015

Why not adding a repository method to the current maven block instead?

  app.maven do
    repository 'https://foo.com/bar'
    dependency 'foo'
  end

@jjaffeux
Copy link
Contributor

jjaffeux commented Feb 9, 2015

yes indeed this is what I wanted to write, but it was too early for me probably...

@jjaffeux
Copy link
Contributor

jjaffeux commented Feb 9, 2015

@TigerWolf hey I just pushed 1.1.0 with support for repositories (see README), can you try and tell me if it works for you please ?

@TigerWolf
Copy link
Author

Thanks for doing this. I will try it out today.

@TigerWolf
Copy link
Author

rake aborted!
Errno::ENOENT: No such file or directory @ rb_sysopen - /Users/a1673450/.rvm/gems/ruby-2.2.0/gems/motion-maven-1.1.0/lib/motion/project/pom.erb
/Users/a1673450/.rvm/gems/ruby-2.2.0/gems/motion-maven-1.1.0/lib/motion/project/maven.rb:57:in `initialize'
/Users/a1673450/.rvm/gems/ruby-2.2.0/gems/motion-maven-1.1.0/lib/motion/project/maven.rb:57:in `new'
/Users/a1673450/.rvm/gems/ruby-2.2.0/gems/motion-maven-1.1.0/lib/motion/project/maven.rb:57:in `generate_pom'
/Users/a1673450/.rvm/gems/ruby-2.2.0/gems/motion-maven-1.1.0/lib/motion/project/maven.rb:50:in `install!'
/Users/a1673450/.rvm/gems/ruby-2.2.0/gems/motion-maven-1.1.0/lib/motion/project/maven.rb:104:in `block (2 levels) in <top (required)>'
/Users/a1673450/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
/Users/a1673450/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => maven:install
(See full trace by running task with --trace)

Check out:
https://github.com/HipByte/motion-maven/blob/master/motion-maven.gemspec#L20

@jjaffeux
Copy link
Contributor

jjaffeux commented Feb 9, 2015

Yes, I forgot to add the erb file, just pushed update, should be good now.

@TigerWolf
Copy link
Author

Possibly unrelated but I am not able to download the jar from JCenter.

http://dl.bintray.com/austintaylor/maven/com/uservoice/uservoice-android-sdk/

https://bintray.com/austintaylor/maven/com.uservoice%3Auservoice-android-sdk/view

  app.maven do
    repository 'https://bintray.com/bintray/jcenter'
    # dependency "com.uservoice.uservoice-android-sdk"
    dependency 'com.uservoice', :artifact => 'uservoice-android-sdk'
  end

[ERROR] Failed to execute goal on project dependencies: Could not resolve dependencies for project com.maventest:dependencies:jar:1.0: Failed to collect dependencies at com.uservoice:uservoice-android-sdk:jar:LATEST: Failed to read artifact descriptor for com.uservoice:uservoice-android-sdk:jar:LATEST: Failed to resolve version for com.uservoice:uservoice-android-sdk:jar:LATEST: Could not find metadata com.uservoice:uservoice-android-sdk/maven-metadata.xml in local (/Users/a1673450/.m2/repository) -> [Help 1]

Maybe because its an ARR file?

http://dl.bintray.com/austintaylor/maven/com/uservoice/uservoice-android-sdk/1.2.2/

@TigerWolf
Copy link
Author

Its works for
dependency 'com.google.android', :artifact => 'support-v4'

@jjaffeux
Copy link
Contributor

jjaffeux commented Feb 9, 2015

yes, I'm investigating concerning uservoice, there might be an issue with .aar file after, but I think there's another issue before

@jjaffeux
Copy link
Contributor

jjaffeux commented Feb 9, 2015

Ok.

if you use :

app.maven do
    repository 'https://bintray.com/bintray/jcenter'
    repository 'http://dl.bintray.com/austintaylor/maven'
    dependency 'com.uservoice', :artifact => 'uservoice-android-sdk', :version => '1.2.2'
end

On bintray, when you are on the code page you have to click on "setup me" to find the right repository to add.

It will mostly work, I say mostly because you will still have an error with com.android.support:appcompat-v7:jar:21. which is not in bintray, but is in your /extras/android/support/v7/appcompat/ folder. Right now RubyMotion doesn't support it, and you will have to add it by hand, there's a ticket that should fix it in the next weeks : http://hipbyte.myjetbrains.com/youtrack/issue/RM-763

@TigerWolf
Copy link
Author

Thanks, I will try it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants