Le mercredi 17 décembre 2008, Benjamin Bentmann a écrit :
> Oleg Gusakov wrote:
> > Unit tests were using those jars to compile test code.
>
> Just a technical question: Is it actually required/desirable to really
> compile code during the tests?
>
> Over in the Maven core ITs, running the Compiler (or Surefire) Plugin
> was the classical approach to test dependency resolution. IMHO, this
> approach adds
> a) unnecessary coupling with external components
> b) unnecessary complexity to the tests
> not to mention the performance penalty.
>
> To come back to Mercury, you are now about to chase down why the
> compiler isn't found (MERCURY-61). But as far as I understand the Ant
> tasks are concerned about dependency resolution, i.e. getting JARs, not
> compilation.
>
> So, wouldn't it be feasible to
> 1) Have the Ant tasks resolve the dependencies
> 2) Dump the resulting class path to a file (<echo>, custom test task)
> 3) Have the test controller (and not a compiler) verify the
> order/contents of the class path by reading that file
> ?
just for the record, I did such tests:

1. in Maven Ant Tasks: see sample.build.xml target "test-deps-order", which is 
based on <pathconvert> task

2. in MNG-1412 IT, with java code getResources( "META-INF/MANIFEST.MF" )

Regards,

Hervé

>
>
> Benjamin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to