You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Olivier Lamy <ol...@accor.com> on 2006/04/12 16:55:51 UTC

RE : Need to Package w/o executing Test

http://maven.apache.org/general.html#skip-test

- Olivier

-----Message d'origine-----
De : RobJac [mailto:robin.jacob@caritor.com] 
Envoyé : mercredi 12 avril 2006 16:53
À : users@maven.apache.org
Objet : Need to Package w/o executing Test



I have a src/main and src/test folders in my project. All the Test
classes will not pass if i execute them. But I still would want package
my project even if my Test  does not execute . When i run "mvn package"
command, it tries to execute my test which fails and will not allow me
to create a jar. Is there a way i can over ride this so that i can
package atleast the files under my src/main folder?

Thanks in advance.
Robin
--
View this message in context:
http://www.nabble.com/Need-to-Package-w-o-executing-Test-t1438538.html#a
3883045
Sent from the Maven - Users forum at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org



This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: RE : Need to Package w/o executing Test

Posted by Lee Meador <le...@leemeador.com>.
Robin,

Here are some things copied from old questions around here with three more
ways. The only thing I tried was to add the tag to the surefire plugin to
ignore all tests. Something like:

<excludes>
  <exclude>**/*Test.*</exclude>
</excludes>


-----------------------------------------------

u may need to define a
maven-surefire-plugin inside build/plugins and there you define
<testFailureIgnore>true</tFI>

Thanks & Regards,
A.S.KRISHNAN,

----------------

A quick-n-dirty approach... In your pom.xml, in <build>, add the
element <testSourceDirectory>src/mytests</testSourceDirectory>.

This will override the src/test folder, so no tests will be found, and
thus no tests will be executed.

You should see:
[INFO] [surefire:test]
[INFO] No tests to run.

Make sure you use "mvn clean" first to delete the compiled test that
have already been created in target.

Wayne Fay

---------------------

use -Dmaven.test.failure.ignore=true

Edwin Punzalan


On 4/12/06, Olivier Lamy <ol...@accor.com> wrote:
>
> http://maven.apache.org/general.html#skip-test
>
> - Olivier
>
> -----Message d'origine-----
> De : RobJac [mailto:robin.jacob@caritor.com]
> Envoyé : mercredi 12 avril 2006 16:53
> À : users@maven.apache.org
> Objet : Need to Package w/o executing Test
>
>
>
> I have a src/main and src/test folders in my project. All the Test
> classes will not pass if i execute them. But I still would want package
> my project even if my Test  does not execute . When i run "mvn package"
> command, it tries to execute my test which fails and will not allow me
> to create a jar. Is there a way i can over ride this so that i can
> package atleast the files under my src/main folder?
>
> Thanks in advance.
> Robin
> --
> View this message in context:
> http://www.nabble.com/Need-to-Package-w-o-executing-Test-t1438538.html#a
> 3883045
> Sent from the Maven - Users forum at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
> This e-mail, any attachments and the information contained therein ("this
> message") are confidential and intended solely for the use of the
> addressee(s). If you have received this message in error please send it back
> to the sender and delete it. Unauthorized publication, use, dissemination or
> disclosure of this message, either in whole or in part is strictly
> prohibited.
>
> --------------------------------------------------------------------------------------------------------------
> Ce message électronique et tous les fichiers joints ainsi que  les
> informations contenues dans ce message ( ci après "le message" ), sont
> confidentiels et destinés exclusivement à l'usage de la  personne à laquelle
> ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le
> renvoyer à son émetteur et de le détruire. Toutes diffusion, publication,
> totale ou partielle ou divulgation sous quelque forme que se soit non
> expressément autorisées de ce message, sont interdites.
>
> -------------------------------------------------------------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


--
-- Lee Meador
Sent from gmail. My real email address is lee@leemeador.com