-
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
Bug 380152 - Support Maven option --also-make-dependents, and --resume-from #48
Comments
This is a major shortcoming. Some Eclipse projects are really large and slow to build. Waiting for the whole project to be built just to run a single test in another module is a nightmare. It would be great if this would finally get fixed, if it is broken since Maven 3.2.1, which was released in February 2014, i.e. eight years ago. |
You probably could use the waiting time to prepare a patch for this :-) |
Just some update that might help if someone is willing to provide a patch:
What could be done right now is using the tycho snapshot enable Beside that, if this is crucial to someones business and likes to speed up the development in that area a sponsoring would allow me to assign more time-slots for this particular issue. |
@laeubi, what makes you think that I speak OSGi or Tycho? And what kind of attitude is it, that in some OSS projects, maintainers or other contributors speak this sentence whenever a user who is not a committer or previous contributor to the project creates or even comments on an issue. Is that some kind of Pavlov reflex? "It is OSS, so just fix it yourself." Whom are you helping with such a comment? Don't you think that if I was capable of and had the time for preparing a PR, I would not have done so already? |
Tycho uses standard java techniques, you complain about slow eclipse projects in combination with tycho what almost always implies OSGi+Java so you are all set to start, beside that you can start learning. If there are any questions/problems we are here to help you getting started.
I can offer you with some options, you don't have to choose any. I do fix things that are important to me, sometimes I fix things just for fun and sometimes someone is paying me to fix things that are important to them. This ticket does not fall in any of these categories right now, so someone finally has to change this but obviously no one care in the past eight years.
You can fix it or you can pay someone or you can wait until someone else do it, I think this essentially is the bottom line. Large parts of OSS is driven by volunteering work.
Well its seems we are all in the same boat then, or do you assume Tycho contributor just waiting for a ping to push their already (eight years) prepared PRs? :-) |
The fact that I sometimes have to build an Eclipse project (in my case AJDT, AspectJ Development Tools), because I am helping to do the bare minimum to keep it alive, does not mean that I am feeling inclined to learn OSGi in general, Tycho or Eclipse in particular or how certain Tycho-related plugins relate to the Maven lifecycle. This issue here is potentially slowing down everyone working with Tycho + Maven, not just myself. Tycho simply does not conform to the expected behaviour for any Maven plugin. Normally developers can e.g. run |
Thanks, this is a great overview and potentially helpful to anyone trying to tackle this. Maybe later I can give the 2.7.0 snapshot with BTW, I also just noticed that |
Given on the feedback on this ticket obviously not...
Tycho works well with numerous maven plugins, haven't heard any complains about general misconception. Anyways, your free to choose a better toll (there is ant4eclipse and pde-build in particular).
I often do this exact workflow, so it does work and I can't see how this is related to
And so does tycho if you do not forbids this explicitly.
I don't know what particular issue you see but because in general your described workflow works without any issues for me...and probably also for others. On the other hand implementing this is very complex and probably error prone without much gain. Most developers (in the eclipse project area) are also most probably executing their test directly from the IDE instead of fire up a maven build for this purpose, another reason this seems not an issue for most tycho-users (or potential contributors). |
That is probably true. I work in IntelliJ IDEA, not in an Eclipse plugin project. So I completely rely on Maven, trying to touch as little Eclipse stuff as possible. So I am kind of an exotic bird in this regard. Thanks for all your valuable feedback and for your time, Christoph. 🙂 |
I think this is indeed not very well covered area, but again, contributions are welcome :-) |
I searched the web for
|
OK, I just noticed that there simply was a typo in your post amd I copied & pasted it when searching the web. It is |
This would be a very useful feature. For a use case example: we have a workspace/build with many (~40) different products (containing variations of included features/plugins). In general only one is required to be built at a time, ideally with e.g. |
I have spent some time previously looking at how this might be achieved but ran into some issues. The way that Maven handles the I had tried to get TychoMavenLifecycleParticipant to have access to all of the reactor projects (MavenSession#getAllProjects instead of MavenSession#getProjects) which might have some potential however there is a hint in DefaultMaven that it doesn't expect the participants to add or remove projects from the session. |
@joeshannon this really sounds that there is some need to get support from maven first (e.g. some kind of MavenLifecycleParticipant having a method like "computeDepdentProjects" or something. |
Yes I can try and put together a question for the Maven Developer mailing list. |
I believe the proper API for that is already available: It is possible to implement (or extend the org.apache.maven.graph.DefaultGraphBuilder) and tell maven to use that via a maven extension:
.mvn/extension.xml:
We have been looking into this already and I believe we have a PoC of this somewhere. I can see if we can dig that out. Maybe it would be possible for Tycho to register such an extension by default and supply a custom |
@sratz thanks for sharing this, I think this would be indeed the right place for Tycho to participate! Can you open a dedicated issue for this? I'll try to take a look at it then if we can improve at least here. |
Could someone provide a small reproducer project that shows some usages of the The smaller the project (less modules, less code) the better, so we probably can include this in the tycho integration test suite. Some bonus points could be gained by providing the project as an integration test as a PR in the first place. |
Thanks @laeubi for your effort. It is impressive what you did, even though I have not tested anything yet. Last week, I had started preparing an example Maven project with some interdependent modules in order to test on the console how building certain modules with or without additional CLI options works. It was not an automated test, but a nice playground for different scenarios. But I ran out of time before starting to OSGI-ify all modules. I would have needed to do that alongside reading an OSGi tutorial, which would have taken me much more time than I had then. Actually, the project should have had two branches: one pure JAVA and one OSGi using Tycho. That would have made the two builds comparable with regard to what happens or ought to happen when using certain CLI option in order to build certain modules. I am happy that someone else provided an example project. I have not checked how many and which scenarios it covers, but I am hoping that all the major ones are covered. |
That's really great. I'm going to test it on our build and see if it works. Although I agree that this is not a "must-have" feature, I think it can greatly improve some workflows. For example, if that brittle integration test fails just on release day, you can just rerun part of the build. And this also plays nice with the expectations of a native Maven user. Thanks @laeubi for your hard work. It is very much appreciated! |
@lorenzodallavecchia maybe tycho users are just not very much used to this features, so any examples are great to share so we can see the value it brings. |
Thanks a lot @laeubi for following up on this! I have just tested this on our code-base and it's almost working. But somehow, whenever See also my comment in the integration test PR #564, where this can be reproduced as well. |
Can anyone of the participants here suggest a an useful description for the release notes? I think it is better written by someone actually using this feature so we get the wording correct. |
See https://bugs.eclipse.org/bugs/show_bug.cgi?id=380152
The bug is still occurring. Due to an architectural change in Maven 3.2.1 in the Reactor, Tycho can no longer compute the dependencies if the input modules are filtered with options like
-pl
. Therefore, options like-am
,-amd
and-rf
do not work.See the original BugZilla issue for details and also see https://bugs.eclipse.org/bugs/show_bug.cgi?id=494760 which is likely caused by the same problem.
The text was updated successfully, but these errors were encountered: