You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by kristoffer <kr...@ericsson.com> on 2008/04/01 16:37:47 UTC
Skip tests for installation phase
Hi,
I want to skip my tests for specific projects which contains integration
tests.. I have read alot on the web/forums/maillists etc and found that this
is sort of a de-fact way of doing this:
[pom.xml: contained in that separate which only contains these tests]=
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
The tests are skipped for most commands (compile, test, package etc) which
is good. But when i run mvn install, the tests are run. It seems as if
"install" matches my "surefire-it" executions, which was not my intention...
[INFO] Scanning for projects...
[INFO]
------------------------------------------------------------------------
[INFO] Building XXXXX JAR
[INFO] task-segment: [integration-test]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[INFO] Using default encoding to copy filtered resources.
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [surefire:test]
[INFO] Tests are skipped.
[INFO] [jar:jar]
[INFO] [surefire:test {execution: surefire-it}]
[INFO] Surefire report directory:
c:\myplace\dev\integrationtest\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running xxx.xxx.AdminIntegrationTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
Results :
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2 seconds
[INFO] Finished at: Tue Apr 01 16:30:10 CEST 2008
[INFO] Final Memory: 5M/11M
[INFO]
------------------------------------------------------------------------
I only want it to be run if i run "integration-test".. Have any one
encountered this before?
thanks and regards,
-Kristoffer
--
View this message in context: http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16418470.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Skip tests for installation phase
Posted by kristoffer <kr...@ericsson.com>.
Thanks for your answer.
However, my current integration-test profile will force some test
dependencies to be packaged within my deployment .ear during 'mvn
install'... So if I use the same integration-test profile to run tests, my
tests will run before the .ear has been packaged deployed correctly, and
thus test fail.
I guess i could create multiple integration-test profiles, but that will
bloat my pom.xml.
Is there no way to force install to no run tests?
regards,
-Kristoffer
Wayne Fay wrote:
>
> You should put the integration test stuff in a profile, and activate
> it when you want to run the integration tests. Then it won't happen
> unless you want it, no matter what phase you execute.
>
> Wayne
>
> On 4/1/08, kristoffer <kr...@ericsson.com> wrote:
>>
>> Hi,
>>
>> I want to skip my tests for specific projects which contains integration
>> tests.. I have read alot on the web/forums/maillists etc and found that
>> this
>> is sort of a de-fact way of doing this:
>>
>> [pom.xml: contained in that separate which only contains these tests]=
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-surefire-plugin</artifactId>
>> <configuration>
>> <skip>true</skip>
>> </configuration>
>> <executions>
>> <execution>
>> <id>surefire-it</id>
>> <phase>integration-test</phase>
>> <goals>
>> <goal>test</goal>
>> </goals>
>> <configuration>
>> <skip>false</skip>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </build>
>>
>> The tests are skipped for most commands (compile, test, package etc)
>> which
>> is good. But when i run mvn install, the tests are run. It seems as if
>> "install" matches my "surefire-it" executions, which was not my
>> intention...
>>
>> [INFO] Scanning for projects...
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building XXXXX JAR
>> [INFO] task-segment: [integration-test]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [resources:resources]
>> [INFO] Using default encoding to copy filtered resources.
>> [INFO] [compiler:compile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources]
>> [INFO] Using default encoding to copy filtered resources.
>> [INFO] [compiler:testCompile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [surefire:test]
>> [INFO] Tests are skipped.
>> [INFO] [jar:jar]
>> [INFO] [surefire:test {execution: surefire-it}]
>> [INFO] Surefire report directory:
>> c:\myplace\dev\integrationtest\target\surefire-reports
>>
>> -------------------------------------------------------
>> T E S T S
>> -------------------------------------------------------
>> Running xxx.xxx.AdminIntegrationTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
>>
>> Results :
>>
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 2 seconds
>> [INFO] Finished at: Tue Apr 01 16:30:10 CEST 2008
>> [INFO] Final Memory: 5M/11M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>> I only want it to be run if i run "integration-test".. Have any one
>> encountered this before?
>>
>> thanks and regards,
>> -Kristoffer
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16418470.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16445364.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Skip tests for installation phase
Posted by Stephen Connolly <st...@gmail.com>.
Nope!
What you could do is use a second module to run your integration tests and
have it depend on your packaged .ear
On Wed, Apr 2, 2008 at 10:45 AM, kristoffer <kr...@ericsson.com>
wrote:
>
> Ok, that makes sense i guess. Is there any way to modify which phases are
> executed for specific projects?
>
> regards,
> -Krostoffer
>
>
> nicklist wrote:
> >
> > And if you're wondering why ""install" matches my "surefire-it"
> > executions", maven works with phases. If you execute a phase ( ie.
> > compile, package or install, all phases before that phase are run, and
> > guess, integration-test is between package and install. See [1].
> >
> > Hth,
> >
> > Nick S.
> >
> > [1]
> > http://cvs.peopleware.be/training/maven/maven2/buildLifecyclePhases.html
> >
> >
> > -----Original Message-----
> > From: kristoffer [mailto:kristoffer.sjogren@ericsson.com]
> > Sent: Wed 4/2/2008 10:36
> > To: users@maven.apache.org
> > Subject: Re: Skip tests for installation phase
> >
> >
> > Thanks for your answer.
> >
> > However, my current integration-test profile will force some test
> > dependencies to be packaged within my deployment .ear during 'mvn
> > install'... So if I use the same integration-test profile to run tests,
> my
> > tests will run before the .ear has been packaged deployed correctly, and
> > thus test fail.
> >
> > I guess i could create multiple integration-test profiles, but that will
> > bloat my pom.xml.
> >
> > Is there no way to force install to no run tests?
> >
> > regards,
> > -Kristoffer
> >
> >
> >
> > Wayne Fay wrote:
> >>
> >> You should put the integration test stuff in a profile, and activate
> >> it when you want to run the integration tests. Then it won't happen
> >> unless you want it, no matter what phase you execute.
> >>
> >> Wayne
> >>
> >> On 4/1/08, kristoffer <kr...@ericsson.com> wrote:
> >>>
> >>> Hi,
> >>>
> >>> I want to skip my tests for specific projects which contains
> integration
> >>> tests.. I have read alot on the web/forums/maillists etc and found
> that
> >>> this
> >>> is sort of a de-fact way of doing this:
> >>>
> >>> [pom.xml: contained in that separate which only contains these tests]=
> >>> <build>
> >>> <plugins>
> >>> <plugin>
> >>> <groupId>org.apache.maven.plugins</groupId>
> >>> <artifactId>maven-surefire-plugin</artifactId>
> >>> <configuration>
> >>> <skip>true</skip>
> >>> </configuration>
> >>> <executions>
> >>> <execution>
> >>> <id>surefire-it</id>
> >>> <phase>integration-test</phase>
> >>> <goals>
> >>> <goal>test</goal>
> >>> </goals>
> >>> <configuration>
> >>> <skip>false</skip>
> >>> </configuration>
> >>> </execution>
> >>> </executions>
> >>> </plugin>
> >>> </plugins>
> >>> </build>
> >>>
> >>> The tests are skipped for most commands (compile, test, package etc)
> >>> which
> >>> is good. But when i run mvn install, the tests are run. It seems as if
> >>> "install" matches my "surefire-it" executions, which was not my
> >>> intention...
> >>>
> >>> [INFO] Scanning for projects...
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] Building XXXXX JAR
> >>> [INFO] task-segment: [integration-test]
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] [resources:resources]
> >>> [INFO] Using default encoding to copy filtered resources.
> >>> [INFO] [compiler:compile]
> >>> [INFO] Nothing to compile - all classes are up to date
> >>> [INFO] [resources:testResources]
> >>> [INFO] Using default encoding to copy filtered resources.
> >>> [INFO] [compiler:testCompile]
> >>> [INFO] Nothing to compile - all classes are up to date
> >>> [INFO] [surefire:test]
> >>> [INFO] Tests are skipped.
> >>> [INFO] [jar:jar]
> >>> [INFO] [surefire:test {execution: surefire-it}]
> >>> [INFO] Surefire report directory:
> >>> c:\myplace\dev\integrationtest\target\surefire-reports
> >>>
> >>> -------------------------------------------------------
> >>> T E S T S
> >>> -------------------------------------------------------
> >>> Running xxx.xxx.AdminIntegrationTest
> >>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047
> >>> sec
> >>>
> >>> Results :
> >>>
> >>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
> >>>
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] BUILD SUCCESSFUL
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>> [INFO] Total time: 2 seconds
> >>> [INFO] Finished at: Tue Apr 01 16:30:10 CEST 2008
> >>> [INFO] Final Memory: 5M/11M
> >>> [INFO]
> >>>
> ------------------------------------------------------------------------
> >>>
> >>>
> >>> I only want it to be run if i run "integration-test".. Have any one
> >>> encountered this before?
> >>>
> >>> thanks and regards,
> >>> -Kristoffer
> >>>
> >>> --
> >>> View this message in context:
> >>>
> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16418470.html
> >>> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >>
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16445365.html
> > Sent from the Maven - Users mailing list archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16446345.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
RE: Skip tests for installation phase
Posted by kristoffer <kr...@ericsson.com>.
Ok, that makes sense i guess. Is there any way to modify which phases are
executed for specific projects?
regards,
-Krostoffer
nicklist wrote:
>
> And if you're wondering why ""install" matches my "surefire-it"
> executions", maven works with phases. If you execute a phase ( ie.
> compile, package or install, all phases before that phase are run, and
> guess, integration-test is between package and install. See [1].
>
> Hth,
>
> Nick S.
>
> [1]
> http://cvs.peopleware.be/training/maven/maven2/buildLifecyclePhases.html
>
>
> -----Original Message-----
> From: kristoffer [mailto:kristoffer.sjogren@ericsson.com]
> Sent: Wed 4/2/2008 10:36
> To: users@maven.apache.org
> Subject: Re: Skip tests for installation phase
>
>
> Thanks for your answer.
>
> However, my current integration-test profile will force some test
> dependencies to be packaged within my deployment .ear during 'mvn
> install'... So if I use the same integration-test profile to run tests, my
> tests will run before the .ear has been packaged deployed correctly, and
> thus test fail.
>
> I guess i could create multiple integration-test profiles, but that will
> bloat my pom.xml.
>
> Is there no way to force install to no run tests?
>
> regards,
> -Kristoffer
>
>
>
> Wayne Fay wrote:
>>
>> You should put the integration test stuff in a profile, and activate
>> it when you want to run the integration tests. Then it won't happen
>> unless you want it, no matter what phase you execute.
>>
>> Wayne
>>
>> On 4/1/08, kristoffer <kr...@ericsson.com> wrote:
>>>
>>> Hi,
>>>
>>> I want to skip my tests for specific projects which contains integration
>>> tests.. I have read alot on the web/forums/maillists etc and found that
>>> this
>>> is sort of a de-fact way of doing this:
>>>
>>> [pom.xml: contained in that separate which only contains these tests]=
>>> <build>
>>> <plugins>
>>> <plugin>
>>> <groupId>org.apache.maven.plugins</groupId>
>>> <artifactId>maven-surefire-plugin</artifactId>
>>> <configuration>
>>> <skip>true</skip>
>>> </configuration>
>>> <executions>
>>> <execution>
>>> <id>surefire-it</id>
>>> <phase>integration-test</phase>
>>> <goals>
>>> <goal>test</goal>
>>> </goals>
>>> <configuration>
>>> <skip>false</skip>
>>> </configuration>
>>> </execution>
>>> </executions>
>>> </plugin>
>>> </plugins>
>>> </build>
>>>
>>> The tests are skipped for most commands (compile, test, package etc)
>>> which
>>> is good. But when i run mvn install, the tests are run. It seems as if
>>> "install" matches my "surefire-it" executions, which was not my
>>> intention...
>>>
>>> [INFO] Scanning for projects...
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Building XXXXX JAR
>>> [INFO] task-segment: [integration-test]
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] [resources:resources]
>>> [INFO] Using default encoding to copy filtered resources.
>>> [INFO] [compiler:compile]
>>> [INFO] Nothing to compile - all classes are up to date
>>> [INFO] [resources:testResources]
>>> [INFO] Using default encoding to copy filtered resources.
>>> [INFO] [compiler:testCompile]
>>> [INFO] Nothing to compile - all classes are up to date
>>> [INFO] [surefire:test]
>>> [INFO] Tests are skipped.
>>> [INFO] [jar:jar]
>>> [INFO] [surefire:test {execution: surefire-it}]
>>> [INFO] Surefire report directory:
>>> c:\myplace\dev\integrationtest\target\surefire-reports
>>>
>>> -------------------------------------------------------
>>> T E S T S
>>> -------------------------------------------------------
>>> Running xxx.xxx.AdminIntegrationTest
>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047
>>> sec
>>>
>>> Results :
>>>
>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
>>>
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] BUILD SUCCESSFUL
>>> [INFO]
>>> ------------------------------------------------------------------------
>>> [INFO] Total time: 2 seconds
>>> [INFO] Finished at: Tue Apr 01 16:30:10 CEST 2008
>>> [INFO] Final Memory: 5M/11M
>>> [INFO]
>>> ------------------------------------------------------------------------
>>>
>>>
>>> I only want it to be run if i run "integration-test".. Have any one
>>> encountered this before?
>>>
>>> thanks and regards,
>>> -Kristoffer
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16418470.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> View this message in context:
> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16445365.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
--
View this message in context: http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16446345.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
maven-remote-resources-plugin [Virus checked]
Posted by Wo...@atosorigin.com.
Hi All,
does anybody remember this plugin maven-remote-resources-plugin ?
Shouldn't this pom snippet
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<id>embedded-only</id>
<goals>
<goal>process</goal>
</goals>
<configuration>
<resourceBundles>
<resourceBundle>org.jboss.ejb3:embedded:only</resourceBundle>
</resourceBundles>
<outputDirectory>src/main/resources</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
download the named jar and put it into resources for inclusion in the
artifact ? Or at least complain, if the jar is not found !?
Any help appreciated!
mit freundlichen Grüßen/best regards
Wolfgang Schrecker
"MODEL-DRIVEN DESIGN demands that the model stay in lockstep with the
implementation, but it allows freedom to choose any implementation that
faithfully captures the meaning of the model"
from Eric Evans: Domain-Driven Design p. 230
--
--------------------------------------------------
Atos Worldline Processing GmbH
Hahnstrasse 25
60528 Frankfurt/Main
Germany
Phone: +49 69/6657-1176
mailto:Wolfgang.Schrecker@atosorigin.com
http://www.atosworldline.com
Geschäftsführer: Erik Munk Koefoed
Aufsichtsratsvorsitzender: Didier Dhennin
Sitz der Gesellschaft: Frankfurt/Main
Handelsregister: Frankfurt/Main HRB 40 417
--------------------------------------------------
Atos Worldline Processing GmbH
Hahnstraße 25
60528 Frankfurt/Main
Germany
Phone: +49 69/6657-1176
Fax :
mailto: Wolfgang.Schrecker@atosorigin.com
http://www.atosworldline.com
Geschäftsführer: Erik Munk Koefoed
Aufsichtsratsvorsitzender: Didier Dhennin
Sitz der Gesellschaft: Frankfurt/Main
Handelsregister: Frankfurt/Main HRB 40 417
* * * * * * * * L E G A L D I S C L A I M E R * * * * * * * *
This e-mail is destined for the above mentioned recipient. In case you
received this e-mail by accident, we would appreciate it if you could
contact the sender and delete all copies stored on your computer.
Please be aware that the security and confidentiality of electronic data
transmitted by e-mail is not completely guaranteed and that data may be seen,
copied, downloaded or changed by third persons during transmission.
Atos Origin accepts no liability for the security and confidentiality of
data and documents sent by e-mail. Please make sure that all important
messages will be confirmed in writing by means of a telefax or a letter.
* * * * * * * * L E G A L D I S C L A I M E R * * * * * * * *
RE: Skip tests for installation phase
Posted by ni...@planet.nl.
And if you're wondering why ""install" matches my "surefire-it" executions", maven works with phases. If you execute a phase ( ie. compile, package or install, all phases before that phase are run, and guess, integration-test is between package and install. See [1].
Hth,
Nick S.
[1] http://cvs.peopleware.be/training/maven/maven2/buildLifecyclePhases.html
-----Original Message-----
From: kristoffer [mailto:kristoffer.sjogren@ericsson.com]
Sent: Wed 4/2/2008 10:36
To: users@maven.apache.org
Subject: Re: Skip tests for installation phase
Thanks for your answer.
However, my current integration-test profile will force some test
dependencies to be packaged within my deployment .ear during 'mvn
install'... So if I use the same integration-test profile to run tests, my
tests will run before the .ear has been packaged deployed correctly, and
thus test fail.
I guess i could create multiple integration-test profiles, but that will
bloat my pom.xml.
Is there no way to force install to no run tests?
regards,
-Kristoffer
Wayne Fay wrote:
>
> You should put the integration test stuff in a profile, and activate
> it when you want to run the integration tests. Then it won't happen
> unless you want it, no matter what phase you execute.
>
> Wayne
>
> On 4/1/08, kristoffer <kr...@ericsson.com> wrote:
>>
>> Hi,
>>
>> I want to skip my tests for specific projects which contains integration
>> tests.. I have read alot on the web/forums/maillists etc and found that
>> this
>> is sort of a de-fact way of doing this:
>>
>> [pom.xml: contained in that separate which only contains these tests]=
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-surefire-plugin</artifactId>
>> <configuration>
>> <skip>true</skip>
>> </configuration>
>> <executions>
>> <execution>
>> <id>surefire-it</id>
>> <phase>integration-test</phase>
>> <goals>
>> <goal>test</goal>
>> </goals>
>> <configuration>
>> <skip>false</skip>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </build>
>>
>> The tests are skipped for most commands (compile, test, package etc)
>> which
>> is good. But when i run mvn install, the tests are run. It seems as if
>> "install" matches my "surefire-it" executions, which was not my
>> intention...
>>
>> [INFO] Scanning for projects...
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building XXXXX JAR
>> [INFO] task-segment: [integration-test]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [resources:resources]
>> [INFO] Using default encoding to copy filtered resources.
>> [INFO] [compiler:compile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources]
>> [INFO] Using default encoding to copy filtered resources.
>> [INFO] [compiler:testCompile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [surefire:test]
>> [INFO] Tests are skipped.
>> [INFO] [jar:jar]
>> [INFO] [surefire:test {execution: surefire-it}]
>> [INFO] Surefire report directory:
>> c:\myplace\dev\integrationtest\target\surefire-reports
>>
>> -------------------------------------------------------
>> T E S T S
>> -------------------------------------------------------
>> Running xxx.xxx.AdminIntegrationTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
>>
>> Results :
>>
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 2 seconds
>> [INFO] Finished at: Tue Apr 01 16:30:10 CEST 2008
>> [INFO] Final Memory: 5M/11M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>> I only want it to be run if i run "integration-test".. Have any one
>> encountered this before?
>>
>> thanks and regards,
>> -Kristoffer
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16418470.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16445365.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Skip tests for installation phase
Posted by kristoffer <kr...@ericsson.com>.
Thanks for your answer.
However, my current integration-test profile will force some test
dependencies to be packaged within my deployment .ear during 'mvn
install'... So if I use the same integration-test profile to run tests, my
tests will run before the .ear has been packaged deployed correctly, and
thus test fail.
I guess i could create multiple integration-test profiles, but that will
bloat my pom.xml.
Is there no way to force install to no run tests?
regards,
-Kristoffer
Wayne Fay wrote:
>
> You should put the integration test stuff in a profile, and activate
> it when you want to run the integration tests. Then it won't happen
> unless you want it, no matter what phase you execute.
>
> Wayne
>
> On 4/1/08, kristoffer <kr...@ericsson.com> wrote:
>>
>> Hi,
>>
>> I want to skip my tests for specific projects which contains integration
>> tests.. I have read alot on the web/forums/maillists etc and found that
>> this
>> is sort of a de-fact way of doing this:
>>
>> [pom.xml: contained in that separate which only contains these tests]=
>> <build>
>> <plugins>
>> <plugin>
>> <groupId>org.apache.maven.plugins</groupId>
>> <artifactId>maven-surefire-plugin</artifactId>
>> <configuration>
>> <skip>true</skip>
>> </configuration>
>> <executions>
>> <execution>
>> <id>surefire-it</id>
>> <phase>integration-test</phase>
>> <goals>
>> <goal>test</goal>
>> </goals>
>> <configuration>
>> <skip>false</skip>
>> </configuration>
>> </execution>
>> </executions>
>> </plugin>
>> </plugins>
>> </build>
>>
>> The tests are skipped for most commands (compile, test, package etc)
>> which
>> is good. But when i run mvn install, the tests are run. It seems as if
>> "install" matches my "surefire-it" executions, which was not my
>> intention...
>>
>> [INFO] Scanning for projects...
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Building XXXXX JAR
>> [INFO] task-segment: [integration-test]
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] [resources:resources]
>> [INFO] Using default encoding to copy filtered resources.
>> [INFO] [compiler:compile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [resources:testResources]
>> [INFO] Using default encoding to copy filtered resources.
>> [INFO] [compiler:testCompile]
>> [INFO] Nothing to compile - all classes are up to date
>> [INFO] [surefire:test]
>> [INFO] Tests are skipped.
>> [INFO] [jar:jar]
>> [INFO] [surefire:test {execution: surefire-it}]
>> [INFO] Surefire report directory:
>> c:\myplace\dev\integrationtest\target\surefire-reports
>>
>> -------------------------------------------------------
>> T E S T S
>> -------------------------------------------------------
>> Running xxx.xxx.AdminIntegrationTest
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
>>
>> Results :
>>
>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
>>
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] BUILD SUCCESSFUL
>> [INFO]
>> ------------------------------------------------------------------------
>> [INFO] Total time: 2 seconds
>> [INFO] Finished at: Tue Apr 01 16:30:10 CEST 2008
>> [INFO] Final Memory: 5M/11M
>> [INFO]
>> ------------------------------------------------------------------------
>>
>>
>> I only want it to be run if i run "integration-test".. Have any one
>> encountered this before?
>>
>> thanks and regards,
>> -Kristoffer
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16418470.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16445365.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Skip tests for installation phase
Posted by Wayne Fay <wa...@gmail.com>.
You should put the integration test stuff in a profile, and activate
it when you want to run the integration tests. Then it won't happen
unless you want it, no matter what phase you execute.
Wayne
On 4/1/08, kristoffer <kr...@ericsson.com> wrote:
>
> Hi,
>
> I want to skip my tests for specific projects which contains integration
> tests.. I have read alot on the web/forums/maillists etc and found that this
> is sort of a de-fact way of doing this:
>
> [pom.xml: contained in that separate which only contains these tests]=
> <build>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-surefire-plugin</artifactId>
> <configuration>
> <skip>true</skip>
> </configuration>
> <executions>
> <execution>
> <id>surefire-it</id>
> <phase>integration-test</phase>
> <goals>
> <goal>test</goal>
> </goals>
> <configuration>
> <skip>false</skip>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> </build>
>
> The tests are skipped for most commands (compile, test, package etc) which
> is good. But when i run mvn install, the tests are run. It seems as if
> "install" matches my "surefire-it" executions, which was not my intention...
>
> [INFO] Scanning for projects...
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building XXXXX JAR
> [INFO] task-segment: [integration-test]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:testCompile]
> [INFO] Nothing to compile - all classes are up to date
> [INFO] [surefire:test]
> [INFO] Tests are skipped.
> [INFO] [jar:jar]
> [INFO] [surefire:test {execution: surefire-it}]
> [INFO] Surefire report directory:
> c:\myplace\dev\integrationtest\target\surefire-reports
>
> -------------------------------------------------------
> T E S T S
> -------------------------------------------------------
> Running xxx.xxx.AdminIntegrationTest
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 sec
>
> Results :
>
> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESSFUL
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2 seconds
> [INFO] Finished at: Tue Apr 01 16:30:10 CEST 2008
> [INFO] Final Memory: 5M/11M
> [INFO]
> ------------------------------------------------------------------------
>
>
> I only want it to be run if i run "integration-test".. Have any one
> encountered this before?
>
> thanks and regards,
> -Kristoffer
>
> --
> View this message in context: http://www.nabble.com/Skip-tests-for-installation-phase-tp16418470s177p16418470.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org