I think that is a great run down of the arguments in favor of this. I would definitely like to see this functionality added.
Eric -----Original Message----- From: Colin Sampaleanu [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 21, 2003 3:20 PM To: Turbine Maven Users List Subject: Re: Mechanism to skip tests I love unit tests, but I simply don't buy the argument that you must always run them to build a certain artifact (jar, war, ear, etc) under _all_ circumstances. I gave the example of the property file change. An even better example is if I run maven java:jar which runs unit tests, but afterwards realize I wanted to do maven jar:install instead. Now I have to sit through a bunch of unit tests when I basically know for sure that nothing has changed, and all I want to do is deploy the jar I've already built. Same applies to building a war, etc. When you get to reactor based builds of multiple projects wasted time becomes evan more critical. Unit tests are a very important part of agile methodologies; so is a rapid build/test cycle, and part of that implies being able to control exactly and precisely what to build and test. When you have a toy project, it's easy to say, "build and test everything". When you have a big project with unit tests that take 2-3 minutes, I need some mechanism where I can turn off testing everything and specify that I want to test only one class, or one area. This can make the difference between getting in 20 cycles in an hour vs 5 cycles in an hour, for example. Having to modify project.xml is not easy/fast enough... I've now read the thread you were talking about. I am willing to make changes and supply patches to allow tests to be controlled in a conditional fashion, If a committer is willing to check them in. Regards, Colin [EMAIL PROTECTED] wrote: >I posted an email a while ago about that as well.. I would love to be able >to call maven java:jar -ignore test:test etc.... For the same reasons you >have specified. Purists have said that you should ALWAYS run tests, but >when they slow you down too much, they are just ignored. I think being able >to selectively turn them on and off would be great. > >Eric > >-----Original Message----- >From: Colin Sampaleanu [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 21, 2003 2:31 PM >To: Turbine Maven Users List >Subject: Mechanism to skip tests > > >Is there an easy mechanism which I have missed to allow tests to be >skipped when performing a target (such as java:jar) which has a >dependency on test:test? I've looked at the source for the test and java >plugins and can't see anything. > >Generally you do want to run tests when building a jar (or some artifact >farther down the dependency chain). But it is also a pretty common >occurrence that you want to do that target without executing tests, e.g. >when you have just changed a property file, etc., and you know it will >not affect tests. I realize that 'maven.test.failure.ignore' is >available, but that just skips failing if the tests don't run, I am >looking for something which allows skipping the running of tests. > >Generally, I think you should be able to set whether tests are compiled >by default, and allow that value to be toggled easily at runtime, and >then a similar mechanism to set whether tests are executed by default, >and allow that value to be toggled easily at runtime. This should also >work for the reactor. > >Does anybody agree or have comments? > >Is there a mechanism by which I can dynamically remove dependencies? >E.g. one way I can see to handle the above (assuming something isn't >added to maven itself) is to have a target in my maven.xml which based >on a property, plays with the dependencies dynamically to remove test:test. > > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
