Return-Path: Delivered-To: apmail-maven-dev-archive@www.apache.org Received: (qmail 71332 invoked from network); 1 Nov 2007 06:12:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2007 06:12:19 -0000 Received: (qmail 65054 invoked by uid 500); 1 Nov 2007 06:12:06 -0000 Delivered-To: apmail-maven-dev-archive@maven.apache.org Received: (qmail 64971 invoked by uid 500); 1 Nov 2007 06:12:06 -0000 Mailing-List: contact dev-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Developers List" Reply-To: "Maven Developers List" Delivered-To: mailing list dev@maven.apache.org Received: (qmail 64960 invoked by uid 99); 1 Nov 2007 06:12:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 23:12:06 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of kalyan.akella@gmail.com designates 209.85.146.178 as permitted sender) Received: from [209.85.146.178] (HELO wa-out-1112.google.com) (209.85.146.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 06:12:07 +0000 Received: by wa-out-1112.google.com with SMTP id v33so432431wah for ; Wed, 31 Oct 2007 23:11:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; bh=MPguVvwxn270zGAyXLV8hwdhcDRKbXKW6t3hYwamxjc=; b=po3zPF7K5gPconD3KYOsc24GrAQQjPkZlpwv1m4Gqjm/9Xu6wrSksiOGPzSbKX5UBApwtzevRk+j1Q/kzyZiNQ9OxEmOQwxC4huU2/AAAN33fGhHBEbEJVFNIn6VCLSmt9KxIK5STrY4P/tiocBJbK/JhmZGwOnDjaeQbE4WCZg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=e5R/AqtJ3OjQXVRIbJw0vYFSMcYy1ykDZliDY67Kbs3dQlbP/Yi0CRlWJqPTurEP6xZQ+218VEGSQPSje3sU5FC65Sm3ziQ4y4d41d0CisGLHisDgloNyybVbWNUbbFjtbPZWp2CfkewNCuMZAOBebygG6zvIaTzexq8NXR58vQ= Received: by 10.114.94.1 with SMTP id r1mr261153wab.1193897505068; Wed, 31 Oct 2007 23:11:45 -0700 (PDT) Received: by 10.114.80.8 with HTTP; Wed, 31 Oct 2007 23:11:45 -0700 (PDT) Message-ID: Date: Thu, 1 Nov 2007 11:41:45 +0530 From: "Kalyan Akella" To: "Maven Developers List" Subject: Re: Maven runs surefire plugin for testing by default. How to change this? In-Reply-To: <1124E04E-6267-4C18-AA2B-2140F3B33D2D@maven.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13318_18581537.1193897505065" References: <4FCE97AF-365F-4010-BCE9-F1C5BC034764@apache.org> <897E6869-7113-44CE-9B4A-A9FB00E48BE7@maven.org> <7EF233F1-C547-493C-B36F-A57B291B2BD7@maven.org> <1124E04E-6267-4C18-AA2B-2140F3B33D2D@maven.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13318_18581537.1193897505065 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi Jason, I corrected an error in my project POM (related to profiles) and hence now maven invokes my test plugin during the test phase, as expected. However, as I mentioned in my earlier mail, the usage of the maven.test.skip parameter causes maven to skip the testCompile phase as well. See the logs below: [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Not compiling test sources [INFO] [surefire:test] [INFO] Tests are skipped. [INFO] [war:war] [INFO] Exploding webapp... As a result, my test-plugin isn't able to find any test classes to execute and hence isn't doing anything. Is there a way to avoid this from happening. (Also, due to certain constraints, I regret for not being able to share the source code of my plugin for now.). Please help. Thank you. Kalyan. On 11/1/07, Jason van Zyl wrote: > > Send me your plugin and a sample project with tests and I'll take a > look. > > On 31 Oct 07, at 5:20 PM 31 Oct 07, Kalyan Akella wrote: > > > Moreover, when I set the maven.skip.test to true, apart from not > > invoking my > > test plugin, maven, doesn't even compile the test sources as is > > evident from > > the following logs: > > > > [INFO] [resources:testResources] > > [INFO] Using default encoding to copy filtered resources. > > [INFO] [compiler:testCompile] > > [INFO] Not compiling test sources > > [INFO] [surefire:test] > > [INFO] Tests are skipped. > > [INFO] [war:war] > > [INFO] Exploding webapp... > > > > This is an even bigger problem which means that even if I > > eventually, get my > > test plugin to work it doesn't find any test classes to execute! Is > > this a > > problem with Maven or my configuration. Please help. > > > > Thank you. > > Kalyan > > > > > > ---------- Forwarded message ---------- > > From: Kalyan Akella > > Date: Nov 1, 2007 5:30 AM > > Subject: Re: Maven runs surefire plugin for testing by default. How to > > change this? > > To: Maven Developers List > > > > > > I have included the following annotations (in the Javadoc comments) > > inside > > my plugin class: > > @phase test > > @goal test > > And, in the main project POM, I am calling my plugin this way, > > > > > > ... > > > > > > ... > > > > > > sample.plugin > > maven-sample-plugin > > 1.0 > > > > > > > > > > test > > > > test > > > > false > > > > > > > > > > .*Test.class > > > > > > .*Abstract.* Test.class > > .*$.*.class > > .*Poller.*.class > > > > > > > > > > ............ > > > > Still, Maven doesn't invoke my test plugin during the test phase. > > Could you > > please help. > > Thank you. > > Kalyan. > > > > > > On 10/31/07, Jason van Zyl wrote: > >> > >> > >> On 31 Oct 07, at 6:57 AM 31 Oct 07, Kalyan Akella wrote: > >> > >>> Hi Jason, > >>> > >>> Thank you for the response. However, even after setting the > >>> maven.skip.testparameter to 'true' in my main POM, the maven build > >>> cycle doesn't still > >>> invoke my plugin in the testing phase. It simply skips the > >>> surefire:test > >>> phase and proceeds to the consequent phases. Is there anything I am > >>> missing > >>> in my plugin-configuration. Please help me. > >>> > >> > >> If you're developing a plugin you have to make sure your plugin is > >> setup to run in the test phase, and you also need to configure it in > >> your POM to run. You've done these things and you can't get your > >> plugin to run in the test phase? > >> > >>> Thank you. > >>> Kalyan. > >>> > >>> > >>> On 10/31/07, Jason van Zyl < jason@maven.org> wrote: > >>>> > >>>> > >>>> On 30 Oct 07, at 1:06 AM 30 Oct 07, Kalyan Akella wrote: > >>>> > >>>>> Hi Brett, > >>>>> > >>>>> Thanks for the response. However, the skip parameter > >>>>> (maven.test.skip) skips > >>>>> running tests itself. Morever, it is only consumed by the surefire > >>>>> plugin. > >>>> > >>>> Surefire is baked into the default lifecycle, you will currently > >>>> need > >>>> to configure Surefire to skip so that you can use your own plugin > >>>> in > >>>> its place. We know override the baked in plugins is a pain, but you > >>>> can work around this case by just shutting off Surefire with a > >>>> configuration and then using your. > >>>> > >>>>> I > >>>>> dont want surefire to show up at all during the test phase. I need > >>>>> my plugin > >>>>> to take control of the test phase instead of the surefire > >>>>> plugin. I > >>>>> shall > >>>>> also post this message to the users list as well. > >>>>> > >>>> > >>>> You can't knock out Surefire without hacking our default lifecycle > >>>> execution so you're stuck with the skip parameter with Surefire so > >>>> that only your test plugin will run. This is something we > >>>> definitely > >>>> need to fix as many people are just interested in setting their > >>>> own, > >>>> say a simple TestNG plugin, and not have to use Surefire at all. > >>>> Right > >>>> now you're forced to use Surefire. > >>>> > >>>>> Thanks, > >>>>> Kalyan > >>>>> > >>>>> > >>>>> On 10/30/07, Brett Porter < brett@apache.org> wrote: > >>>>>> > >>>>>> I think you're looking for the surefire skip parameter - but this > >>>>>> question belongs on the users@maven.apache.org list. Please reply > >>>>>> there if necessary. > >>>>>> > >>>>>> Thanks, > >>>>>> Brett > >>>>>> > >>>>>> On 30/10/2007, at 2:48 PM, Kalyan Akella wrote: > >>>>>> > >>>>>>> Hi, > >>>>>>> > >>>>>>> Recently, I developed a Java-based maven plugin intended to > >>>>>>> run in > >>>>>>> the test > >>>>>>> phase of the maven build instead of the standard surefire- > >>>>>>> plugin. > >>>>>>> It has > >>>>>>> just one goal, 'test'. When I configured my project's POM to > >>>>>>> include my > >>>>>>> plugin for the testing phase and made sure the POM doesn't > >>>>>>> refernce > >>>>>>> surefire > >>>>>>> anywhere, maven still invokes the surefire:test goal during the > >>>>>>> test phase. > >>>>>>> Could someone please help me how to avoid maven running surefire > >>>>>>> plugin and > >>>>>>> instead run mine. > >>>>>>> > >>>>>>> Here are the details of my plugin POM and that of the Project > >>>>>>> POM: > >>>>>>> > >>>>>>> Plugin POM: > >>>>>>> > >>>>>>> 4.0.0 > >>>>>>> sample.plugin > >>>>>>> maven-sample-plugin > >>>>>>> maven-plugin > >>>>>>> 1.0 > >>>>>>> My Sample Plugin > >>>>>>> > >>>>>>> > >>>>>>> org.apache.maven > >>>>>>> maven-plugin-api > >>>>>>> 2.0 > >>>>>>> > >>>>>>> > >>>>>>> org.apache.maven > >>>>>>> maven-artifact > >>>>>>> 2.0 > >>>>>>> > >>>>>>> > >>>>>>> junit > >>>>>>> junit > >>>>>>> 4.4 > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> org.apache.maven.plugins > >>>>>>> maven-compiler-plugin > >>>>>>> > >>>>>>> 1.5 > >>>>>>> 1.5 > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> Project POM: > >>>>>>> > >>>>>>> 4.0.0 > >>>>>>> sample.project > >>>>>>> hello > >>>>>>> 1.0-SNAPSHOT > >>>>>>> pom > >>>>>>> Hello World > >>>>>>> > >>>>>>> test > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> dev > >>>>>>> > >>>>>>> > >>>>>>> ${filters.dir}/dev-env.properties >>>>>>> filter> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> sample.plugin > >>>>>>> maven-sample-plugin > >>>>>>> 1.0 > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> test > >>>>>>> > >>>>>>> test > >>>>>>> > >>>>>>> false > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> nfs > >>>>>>> > >>>>>>> .*Test.class > >>>>>>> > >>>>>>> > >>>>>>> .*Abstract.*Test.class >>>>>>> param> > >>>>>>> .*$.*.class > >>>>>>> .*Poller.*.class > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> org.apache.maven.plugins > >>>>>>> maven-compiler-plugin > >>>>>>> > >>>>>>> 1.5 > >>>>>>> 1.5 > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> sample.plugin > >>>>>>> maven-sample-plugin > >>>>>>> 1.0 > >>>>>>> > >>>>>>> > >>>>>>> test > >>>>>>> > >>>>>>> test > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> .* Test.class > >>>>>>> > >>>>>>> > >>>>>>> .*Abstract.* Test.class > >>>>>>> .*$.*.class > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> > >>>>>>> Moreover, I included the following annotations while coding this > >>>>>>> plugin: > >>>>>>> @requiresDependencyResolution test > >>>>>>> @phase test > >>>>>>> @goal test > >>>>>>> > >>>>>>> Please help me. Thank you. > >>>>>>> Sincere Regards, > >>>>>>> Kalyan. > >>>>>> > >>>>>> -- > >>>>>> Brett Porter - brett@apache.org > >>>>>> Blog: http://www.devzuz.org/blogs/bporter/ > >>>>>> > >>>>>> > >>>>>> > --------------------------------------------------------------------- > >>>>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >>>>>> For additional commands, e-mail: dev-help@maven.apache.org > >>>>>> > >>>>>> > >>>> > >>>> Thanks, > >>>> > >>>> Jason > >>>> > >>>> ---------------------------------------------------------- > >>>> Jason van Zyl > >>>> Founder, Apache Maven > >>>> jason at sonatype dot com > >>>> ---------------------------------------------------------- > >>>> > >>>> > >>>> > >>>> > >>>> --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >>>> For additional commands, e-mail: dev-help@maven.apache.org > >>>> > >>>> > >> > >> Thanks, > >> > >> Jason > >> > >> ---------------------------------------------------------- > >> Jason van Zyl > >> Founder, Apache Maven > >> jason at sonatype dot com > >> ---------------------------------------------------------- > >> > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > >> For additional commands, e-mail: dev-help@maven.apache.org > >> > >> > > Thanks, > > Jason > > ---------------------------------------------------------- > Jason van Zyl > Founder, Apache Maven > jason at sonatype dot com > ---------------------------------------------------------- > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org > For additional commands, e-mail: dev-help@maven.apache.org > > ------=_Part_13318_18581537.1193897505065--