-
Notifications
You must be signed in to change notification settings - Fork 189
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
Bug 570883 - m2e PDE Maven target location: Snapshot-Builds with the same version are not updated #124
Comments
Even though it sounds a bit nasty, a simple fix might be to simply ignore the cache for any version that ends with |
Would your suggestion still work for "mvn -o"? |
I think this is an interesting limitiation to mitigate. Artifacts coming from |
Actually any artifact coming from a local file should not be copied there (this problem not only applies to maven location type files), but I found it rather hard to follow the path of method calls and find a way to inject that information without much hassle. |
Hi @mickaelistria: I've tested this with I've tested it using this simple project https://github.com/jstroleny/tycho-exploded-bundles (from https://bugs.eclipse.org/bugs/show_bug.cgi?id=569146 where we met same caching issue). I did following steps to reproduce (see project above):
With version 2.5.0 the build succeeds at the end as previous artifact is cached in m2 repo and it is reused wrongly for subsequent builds. In 2.7.0-SNAPSHOT, it fails correctly. I think these steps can be automated by tycho-its if you find it valuable, from previous issue, there is already integration test with similar structure, but it is testing just explosion of bundle and library is not exporting anything to bundles (see e8e6e5c), so there is no real compilation behind it, would be needed to adjust or create similar test for testing of this issue. |
Thanks for verifying! |
@jstroleny ist would be cool if you could provide a PR that adds an integration test-case for this! |
When a Snapshot build of an artifact which is referenced via "<location type="Maven" ..." is updated, the changes are not reflected in the next tycho build. Because the tycho will use the artifact from the OSGI bundle cache "~/.m2/repository/p2/osgi/bundle" instead the updated in the local maven repository.
Steps to reproduce
Result:
the changes in the SNAPSHOT build of the simple Maven project are not reflected in the tycho build
Workaround:
Clean the maven osgi cache manually - delete Directory of the simple Maven project from the local OSGI cache in the local maven repo "~/.m2/repository/p2/osgi/bundle"
Here is a quick reproducer:
https://github.com/elbird/tycho-pde-maven-snapshot-reproducer
https://bugs.eclipse.org/bugs/show_bug.cgi?id=570883
The text was updated successfully, but these errors were encountered: