-
Notifications
You must be signed in to change notification settings - Fork 197
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
extraRequirements should be part of the tycho-surefire configuration instead of the target platform #43
Comments
Strange enough the type in the code for an extraRequirement is org.apache.maven.model.Dependency but in fact this is not a maven-dep but only used as a container object to pass the necessary data... |
relates to #43 Signed-off-by: Christoph Läubrich <[email protected]>
|
I think we should provide explicit solutions for such use-cases, I think you are refereeing to something like eclipse-run mojo?
Are there any examples/bug reports? I think we should try to fix or provide better alternatives
I'm currently working on a more generic solution for plugins to express extra requirements so they get passed to the P2 resolver. tycho-surefire can the use this as well I think. |
Yes, for instance. The point is that some mojos do not recompute a target-platform and use the one from the modules. So yes, we should probably move some mojos to resolve deps instead of reusing TP. But to me, it's not really something that's really going to provide a lot of value over current state.
Basically every case where p2 has limitations (split packages, use constraints, attributes in general...) needs to use target-platfrom extraRequirements as workaround. And this has to be in the common TP and considered by all mojos, as these extraRequirements need to be present for compilation & execution.
OK, can you please send a note the mailing-list about the proposal so we can discuss this. |
additional.bundles is actually not a real alternative but another provider for "extra-requirements"
The problem is, that compilation != execution and we are currently intermix things there. And then there is actually test compilation/execution. The current intermix (not only in tycho but also pde) makes it really hard to test things nicely compared to other solutions. |
The Compiler Mojo also has extraClasspathElements while surefire has dependencies. |
We can safely assume, a bit like Mavne itself, that execution is a super-set of compilation. |
The user-story is that I don't like to have different configuration in IDE and special configuration in tycho. Because of that I'm currently try to add support for some 'missing pieces' and noticed that the current configuration seems to be different mainly because of some limitations with the current design. |
OK, but then I don't get what's bad with extraRequirements here and why moving them to tycho-surefire-plugin configuration would be any better as it would still be special configuration in Tycho? |
extraRequirements are (if i don't configure one target per module) rather global, they are resolved and handled like first-class dependencies (e.g. import-package). and are used to resolve a (for me) vague 'its just required sometimes' instead of being specific, so it leaves me with a feeling to just adding something here and there and better never touch it again because it works but no-one knows why :-) e.g. the documentation:
leaves an inexperienced user in a rather pending state: Should he use it? When use it? Why SCR (the statement is in fact just true for PDE+Equinox in fact) does not work.... and so on. So if (for whatever reason) I need additional things for a test (e.g. mock services, special connectors and configuration whatever) I would always expect to configure it at the surefire-mojo level, and not on some other mojos configuration and of course I probably don't want this one to drip into updatesites or compile-stages (as it currently is with extraRequirements). I rather want to enhance the overall user-experience, make all this more flexible and simpler for the user, so one can simply start a new tycho project in minutes without reading many docs, search google for examples and gets frustrated rather than removing 'extraRequirements' specifically. |
At least it's documented and we have many users using it without much complaint. So the current state seems simple enough. I sincerely don't think that getting rid of extraRequirements here is a very valuable goal. I'd be very happy to see
Beware that flexibility and simplicity don't go hand-by-hand together. Flexibility can often bring complexity (both to implement and use). I'd rather see all focus on "simpler". |
Indeed we are using that as one of the possible solutions for some problems related to a Maven plugin used for code generation when Eclipse dependencies and Maven dependencies are mixed (that concern JDT and its strange version ranges) to make sure some fragments are taken (eclipse/xtext-maven#146) |
As mentioned in https://www.eclipse.org/tycho/sitedocs/tycho-surefire-plugin/test-mojo.html extra requirements are only meaningful to the tycho-surefire-plugin but are instead configured in the target-platform-configuration.
We should do the following:
The text was updated successfully, but these errors were encountered: