-
Notifications
You must be signed in to change notification settings - Fork 39
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
Depending on internal dependencies #7
Comments
Just out of curiosity: have you tried adding your custom Nexus server URLs to your ~/.m2/settings.xml? Something like this: http://www.sonatype.com/books/nexus-book/reference/maven-sect-single-group.html |
From here, it seems your syntax is wrong: https://github.com/mkristian/jbundler/blob/master/spec/mavenfile_spec.rb#L46 Try something like this:
|
I'm not sure what was the code intention of this: https://github.com/mkristian/jbundler/blob/master/lib/jbundler/mavenfile.rb#L57 But this is the effect (try on irb): line = "repository 'http://internal-repository/url'"
name, url = line.sub(/.*(repository|source)\s+/, '').gsub(/['":]/,'').split(/,/) After that url is nil and name is "http//internal-repository/url" Notice that gsub will remove the colon :) |
@rosenfeld sounds like that would be the culprit, it's probably the gsub.... I'll try it tomorrow morning and see if I can get it working. I'll also give the |
No problem, good luck :) |
I pushed a fix - and added that case to specs :) thanx for reporting and finding the problematic code |
if it works for you I happy to push a bug fixed gem. the next release is in making but I need a day or two more |
Maybe creating a DSL wouldn't be that hard: https://github.com/carlhuda/bundler/blob/master/lib/bundler/dsl.rb There are lots of malformed Mvnfile possibilities that would be hard to track with your current approach and regular expressions. I guess it would be easier to support a DSL and let Ruby help you with the parser :) |
@mkristian sorry, newbie question since I'm fairly new to this stuff.. how can I build a jbundler gem from source and then use it in my app that's using bundler? I'd love to test out the code changes. |
https://github.com/mkristian/jbundler/blob/master/Build.md please let me know if something goes wrong !
|
@mkristian thanks again! I appreciate all the help. I'm running into issues when running |
you can skip the tests by rmvn prepare-package -- -Dmaven.test.skip |
@mkristian thanks, got that working (also sent a pull request to skip the tests). However, I'm still getting this issue. The URL for the internal dependency is correct, I can see the POM file that Aether is downloading. However, that stacktrace isn't telling me where Aether is failing to resolve dependencies. I tried setting $JRUBY_OPTS to "-d" so I could see the stacktrace but didn't get any additional information. Thanks again for your help. P.S. I set my Mvnfile repository line to:
And JBundler is setting the correct repository. I think I'll open up some Java code I have that's using Aether and see if I can get some more insight. |
I think I found the problem at least a similar error on my side |
@mkristian thanks, I'll give it a go tomorrow. |
@mkristian it works! Thank you very much! |
I'm trying to depend on some internal JARs inside our company, and I've added the internal repository to my Mvnfile, which looks something like this:
bundle install
works fine, but when Ibundle exec <ruby file>
, I get the following:But I can depend on that dependency in Maven fine. I'm also able to install it using maven_gem.
Do you know why aether is failing to resolve the dependency? Looking at the source code it looked like putting in the
repository
line should work.The text was updated successfully, but these errors were encountered: