Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Build failed #27

Open
tzvatot opened this issue Mar 14, 2013 · 5 comments
Open

Build failed #27

tzvatot opened this issue Mar 14, 2013 · 5 comments

Comments

@tzvatot
Copy link

tzvatot commented Mar 14, 2013

I created a fresh clone and run ./gradlew installApp which failed. Run again with --debug and it seems like a bad dependency:

16:22:57.995 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionNotFoundException: Could not find group:org.springframework.shell, module:spring-shell, version:1.0.1.BUILD-SNAPSHOT.

@jbrisbin
Copy link
Contributor

I need to update the README, but you have to install my fork of spring-shell into your local maven repos before building rest-shell. The changes in my fork haven't made it upstream yet and for the dotrc file reading to happen, you have to use the changes I made to spring-shell.

https://github.com/jbrisbin/spring-shell

git clone git://github.com/jbrisbin/spring-shell.git
cd spring-shell
./gradlew install

Then try building rest-shell again.

@tzvatot
Copy link
Author

tzvatot commented Mar 14, 2013

Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

@jbrisbin
Copy link
Contributor

trying using the non-ssh url git://github.com/jbrisbin/spring-shell.git (updated the above with this as well)

@tzvatot
Copy link
Author

tzvatot commented Mar 14, 2013

Thanks, that did the trick.
Can you expand a little bit about the difference between your version of spring-shell and 'master's?
Also, I could not find any documentation on where to set 'basic type conversion'. I run get on a json resource and it fails with this TODO message.

@jbrisbin
Copy link
Contributor

You can see my commits here: https://github.com/jbrisbin/spring-shell/commits/master

Basically, I changed the way commands are registered because what I found was that when the start() lifecycle hook was called in the code in master, my custom commands weren't yet available because they were being added later. I just made the shell component aware of ContextRefreshedEvents so it could find commands as soon as they were available rather than waiting until after the context is completely initialized (and all start methods, etc... are called) before registering custom commands.

RE: the error: could you give more information on the resource you're accessing and the kind of error you're seeing?

There are a couple ways to configure conversion in the rest-shell, especially if you're building from source (the default configuration is just a blanket component-scan). In particular, if you look in the org.springframework.data.rest.shell.commands.HttpCommands class you'll see that the RestTemplate and ObjectMapper are injected if one exists. You can change the META-INF/spring/spring-shell-plugin.xml file to add a fully-configured RestTemplate that uses whatever converters you want to suite your use-case and that should be picked up and used in preference to the default configuration.

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

No branches or pull requests

2 participants