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

support resources #176

Closed
cvogt opened this issue Jun 24, 2016 · 6 comments
Closed

support resources #176

cvogt opened this issue Jun 24, 2016 · 6 comments
Labels
Milestone

Comments

@cvogt
Copy link
Owner

cvogt commented Jun 24, 2016

just like src/main/resources/ but top-level resources/. Should end up on the classpath and in the jar.

@cvogt cvogt added the feature label Jun 24, 2016
@cvogt cvogt added this to the 1.1 milestone Jun 24, 2016
@cvogt cvogt modified the milestones: 1.0, 1.1 Nov 3, 2016
@cvogt
Copy link
Owner Author

cvogt commented Nov 3, 2016

added support for projects loading files from their own resources and resources of their dependencies: #293

What still does not work though is for libraries to load resources from the classpath that depends on them. This is necessary for things like application.conf used by play, spray, etc.

Also see the related gitter chat https://gitter.im/cvogt/cbt?at=581b6cad4aeee0634dc1112c

@cvogt
Copy link
Owner Author

cvogt commented Nov 3, 2016

this is actually related to the same problems with configuration in OSGI, as described here https://groups.google.com/forum/#!topic/akka-user/gWXONNJ-cvw
So for example for Akka HTTP the fix would be as described, use the ActorSystem.apply methods that takes a classloader and just pass in your application's classloader.

ActorSystem(
  name, config, this.getClass.getClassLoader
)

@rockjam
Copy link
Contributor

rockjam commented Nov 5, 2016

@cvogt I actually had some prototype of that. Didn't have a chance to finish it

@cvogt
Copy link
Owner Author

cvogt commented Nov 5, 2016

I actually have a fix for the remaining issue now. So we should be ok :). Would still be nice to see the code of your prototype, even if not ready, just for comparison.

@cvogt
Copy link
Owner Author

cvogt commented Feb 13, 2017

ok, so #343 adds support for running code with a flat classloader which should solve problems with parents trying to load classes or resources from their children.

@cvogt
Copy link
Owner Author

cvogt commented Mar 23, 2017

Actually flatClassLoader did NOT fix the problem for akka http, because it looks into the systemclassloader and cbt does not use that for applications. The solution is either telling akka the correct classloader like this: #455 or forking the process like this: #457

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

No branches or pull requests

2 participants