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

spring run --local does not accumulate dependencies in a local directory #99

Closed
nebhale opened this issue Oct 28, 2013 · 3 comments
Closed
Assignees

Comments

@nebhale
Copy link
Member

nebhale commented Oct 28, 2013

In Spring Boot 0.5.0.M5 (from the homebrew tap), the --local option no longer accumulates grapes in the $PWD/.grapes folder. It would appear that the dependencies are being accumulated in their default location of $HOME/.gradle/grapes. To reproduce this issue simply run the 'quick start sample' with --local.

@wilkinsona
Copy link
Member

I suspect I may have inadvertently broken this when I implemented the custom Aether-based Grape engine. I'll investigate.

@ghost ghost assigned wilkinsona Oct 31, 2013
@wilkinsona
Copy link
Member

M5 pre-dates the Aether changes.

The problem's due to the introduction of TestCommand. Its instantiation triggers GrapeIvy's one-off initialization and this is occurring before RunCommand has had a chance to set the system property that's used to configure the grape directory. This causes the default ($HOME/.groovy/grapes) to be used, rather than the directory specified by --local ($PWD/grapes)

@gregturn
Copy link
Contributor

Then that would be my fault. Though I'm not sure if I grok what's happening. Have to read more code.

gigfork pushed a commit to boostrack/spring-boot that referenced this issue Apr 21, 2014
When running an application, --local can be used to collect the
application's dependencies in a local directory. Prior to
AetherGrapeEngine being introduced, using --local would result in the
dependencies being written to ./grapes. When AetherGrapeEngine was
introduced --local no longer had any effect.

This commit updates AetherGrapeEngine so that it honours --local,
writing its dependencies to ./repository. When --local is not specified
dependencies are written to ~/.m2/repository (the standard location
for the local Maven cache). As part of this change TestCommand has
been refactored so that it lazily initialises its GroovyCompiler. This
ensures that RunCommand has a chance to set the system property that
backs --local before AetherGrapeEngine is initialised and accesses the
property.

Fixes spring-projects#99
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