RE: functionnal testing
Vincent Massol wrote: > false I tryed cargo but saw no differences with a jetty6:run since it was never returning. Thanks for the tip. Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
functionnal testing
Hi, Is there a standard way to do functionnal testing with m2 ? I just wrote a quick and dirty mojo for that, but i think there should be a better way: I just spawn a jetty6:run in a thread, wait until the container is ready, run a set of tasks (mojos that effectively do html testing) with the plugin manager, and at the end, interrupt the container. AFAIK the lifecycle fork mode was unusable for that. What i need is a parallel mode instead. WDYT ? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
using jelly scripts in maven 2.0: the archetype approach
Hi, Even if i think jelly is an awfull language, i spent some times to package an archetype [1] that can help you reusing your maven 1.0 scripts. But i really encourage using groovy instead, it's less buggued, faster, easier and much more expressive than jelly (many thanks codehaus, you're genius ;-). The idea of this archetype is to package your jelly scripts with some simple java classes that act as bridges between maven's build cycles and your scripts. You have one little .java and one .jelly for each goal you want to package in the same plugin. The formers are in src/main/java, the laters in src/main/scripts. The archetype helps to fire a typical 'one goal' plugin project. Here is an example to write a simple jelly plugin that bind to the 'test' goal. First the .java. +--- package my.maven; /** * My jelly mojo * * @goal test * @description my jelly mojo * @author me * @version $Id$ */ public class MyMojo extends AbstractMojo { } +--- Yes it's empty. Javadoc annotations help maven to bind your script to a goal and a phase. Second the . jelly +--- plugin groupId: ${project.groupId} plugin artifactId : ${project.artifactId} +--- mvn install, And your done. As you can see you have access to a project variable (MavenProject) inside your script. The plugin rely on a little maven-jellyplugin-api [2] Refer to the archetype documentation for usage (exemple of parametrizable jelly plugin). Regards. [1] https://tagloo.no-ip.info/svn/public/maven-archetype-jellymojo [2] https://tagloo.no-ip.info/svn/public/maven-jellyplugin-api - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: maven 2.0 groovy tools
Jason van Zyl wrote: > BURGHARD Éric wrote: >> Hi, >> >> I've just commited a set of tools [1] for maven (plugin, extensions and >> archetype) that can ease a migration from ant to maven (thanks to groovy >> ant extension) or just help you to write new plugins directly in groovy. > > Cool, that's awesome! > > Maybe we can work to get some of this code in the repositories. > > As for the plexus stuff we can set you up an account at Codehaus (if you > don't already have one) and I can definitely push your archetypes into > Maven's SVN. > That's great. I will be very proud to have a codehaus account :-). I think it's really better to have that stuff on codehaus svn coz my bandwidth is dying here. I must admit that i have 'stollen' the codehaus namespace (org.codehaus) and sometimes even the maven's one for the extensions, so that stuff should already fits your repository. To make things really clean, i think that maven-plugin-tools-javalike must disappear in favor of a simple maven-plugin-tools-java patch. For the maven-archetype-groovymojo i've just commited a simpler version, it's functionnal but not really tested (even if it's quite simple). Just look at the other thread. I should definitively take some time for irc. Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
maven 2.0 groovy tools
Hi, I've just commited a set of tools [1] for maven (plugin, extensions and archetype) that can ease a migration from ant to maven (thanks to groovy ant extension) or just help you to write new plugins directly in groovy. For those who wonder, here is a quick example which use the ant xslt task on a fileset +--- def ant = new AntBuilder() def files = ant.fileScanner { fileset(dir: srcDir) { include(name: "**/*.xml") } } for (src in files) { def dst = new File(dstDir, src.name) ant.xslt(in: src.path, out: dst.path, style: myxsl.path, processor: "trax") } +--- The beautifull thing here is that you can add dependency to whatever processor you want in your pom.xml (saxon8, xalan). Maven handle all dependencies transparently, ant's task choose the first processor available, thus the exactly same code (.class) handle a xslt 1.0 or 2.0 transformation (welcome to the jar heaven). I've added 2 extensions to maven : * plexus-compiler-groovyc which allow you to compile your .groovy(s) transparently with the maven-compiler-plugin (during mvn compile) * maven-plugin-tools-javalike which can parse (with some limitations) .groovy (and .java) to generate your plugin's descriptor (mvn plugin:descriptor) One plugin : * maven-groovyc-plugin which add a groovyc:compile goal to compile .groovy (sometime more flexile than plexus-compiler-groovyc). It's a good example of a native groovy plugin And one archetype which ease the starting of new groovy plugin projects : * maven-archetype-groovymojo All that stuff is available on a svn repository [1]. Each component had a quick install documentation (mvn site). [1] https://tagloo.no-ip.info/svn/public/ Regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]