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

Possible problem with triggeredBy method used to perform resources filtering #16

Open
savulchik opened this issue Apr 8, 2014 · 6 comments

Comments

@savulchik
Copy link

Hello, @sdb .
Please, see the discussion in the following issue sbt/sbt/issues/1187 regarding triggeredBy method usage. Especially this comment.
Thank you.

@sdb
Copy link
Owner

sdb commented Apr 8, 2014

Hi, I'll look into this issue this weekend and see if we can find a solution to avoid this super dangerous behavior.

I'll contact the sbt developers on this.

Thanks for the report.

@savulchik
Copy link
Author

I managed to reproduce the described problem with race condition in https://github.com/savulchik/xsbt-filter/tree/filterbug by adding Thread.sleep to filterResources task and running new check-jar task in simple test project.

@savulchik
Copy link
Author

Hello, @sdb . I'll try to fix the issue and submit a pull request.

@savulchik
Copy link
Author

Eventually I solved my problem with race condition during build using resource generator having default hook in sbt build cycle http://www.scala-sbt.org/0.13.5/docs/Howto/generatefiles.html#resources.

@sdb I couldn't find a solution for the plugin due to lack of sbt experience

@christophercurrie
Copy link

I suspect that this is responsible for the fact that publishM2 and release (from sbt-release) tasks will create jars where the resources are unfiltered. Unfortunately sbt/sbt#1187 doesn't explain how to correct the behavior. Any guidance anyone has for those tasks will be helpful.

@christophercurrie
Copy link

Following up, it turns out my issues were related to the overlap between this project and sbt-osgi, which looks directly at resourceDirectories in Compile to find the resources to store in the bundle. In order for this project to be compatible, it would need to register the task as a resource generator, and somehow suppress the use of the unmanaged resources.

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