Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-dev] JDT JUnit view integration for m2e

Running mvn clean pulls the rug from under the feet of m2e, and it's expected that it will become confused. While working in eclipse, you are expected to use Project > Clean ... not the clean goal (nor deleting the /target directory manually, which is what mvn clean in fact does).
Also note that running clean / full builds should not be part of you everyday development routine - if you need to do that, it's a sign that the toolchain is failing somewhere.

cheers,
Rafał

On 08/09/2011 07:48 PM, Jean-Rémi Desjardins wrote:
Hi,

Thanks for taking the time to read my post. So I did a little bit of investigation after what you said. It turns out I was wrong about the behaviour of "Run As => JUnit Test", or maybe the workspace issue has automagically disappeared. It works like I ideally wanted it too, so that's really quite perfect since I can devote my time to work on something else. On the other hand, I did find one odd behaviour, after a "maven clean", I get a ClassNotFoundException if I try to do a "Run As => JUnit" without previously doing a "maven test". Is this once again something that only happens to me?

Cheers,
JR

2011/8/8 Rafał Krzewski <Rafal.Krzewski@xxxxxxxxx>
To me it seems that something is amiss in your workspace configuration. If m2e is working correctly for you, your project should be ready to for "Run as > JUnit test" launch at all times. You should not need to run any Maven goal to rebuild it a to correct state. Can you be more specific why you need to run assembly phase?

Cheers,
Rafał


On 08/07/2011 04:17 AM, Jean-Remi Desjardins wrote:
Hi,

I am working on a Google App Engine project at my job and I am using m2e. It's working great for me except for one little thing that I would want to have changed and of course I am willing to put the time to make it better unless it seems to hard for me right now.

So my problem is with the JUnit view in Eclipse. My current workflow (and this happens VERY often since I am trying to apply the principles of test driven development as much as possible) is to run "maven test" from the "Run As" menu. I then wait for the tests to finish and run the project as a JUnit project.

I do this because I find that the JUnit view makes it much easier and much faster for me to navigate my test results. The reason I don't just do "Run As" JUnit project is because this doesn't seem to rebuild the project even if I modified a part of it. Btw, I could probably get away with maven assembly and then "Run As => JUnit Test" but it still seems like it's definitely not the ideal solution.

So in my mind, the ideal solution would be to use the JUnit view like it is used for a normal Ant based Eclipse project. But this could involve a lot of work and I think it would be best for me to keep it simple at first.

I did a bit of research and found that Surefire generates a xml file that represents the result of the JUnit test and that you can open these results in the JUnit viewer, this is interesting and my might change my workflow to consider this. I also found a function call in the JDT JUnit API that allows to load such files programmatically.

So I would like, as a first step, to implement a sort of hook that refreshes the JUnit view when the test goal is executed. The view would then show up when I just want to test or when I want to deploy. The bar would not progress like it does for an Ant based project but it would be a good start.

I found bug 349257 in Bugzilla that proposes an enhancement for something very similar. But would still be interested in trying to implement what I just exposed as I believe it to be even better for the user (in this case myself).

So let me know if this is a good idea. Should I submit an enhancement request through Bugzilla? Would I be stepping on someone's toes by trying to implement this feature?

Let me know also if anyone feels they could point me the good direction for this.

Is there somewhere I could find some information on building the project? Because I must admit I did a project import from the git repository using EGit and I had a tons of errors. The build path is probably wrong for some reason.

Cheers,
Jean-Remi Desjardins
_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev

_______________________________________________
m2e-dev mailing list
m2e-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/m2e-dev

_______________________________________________ m2e-dev mailing list m2e-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/m2e-dev


Back to the top