You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by jp4 <jo...@hnpsolutions.com> on 2007/01/15 18:34:31 UTC
Can you compile test cases without running them
I would like to be able to compile my test cases without actually running
them. I use maven.test.skip=true but that seems to prevent not only the
test execution but the test compilation. Is there a way to compile without
running test cases. I would prefer not to mess with the pom files, but do
it via the command line like -Dmaven.test.skip=true.
Thanks,
jp4
--
View this message in context: http://www.nabble.com/Can-you-compile-test-cases-without-running-them-tf3016005s177.html#a8375655
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: Can you compile test cases without running them
Posted by jp4 <jo...@hnpsolutions.com>.
I just ran mvn clean install -Dtest=foo where foo is not a valid test and
this seems to do what I want. If anyone has a cleaner way, please let me
know.
jp4 wrote:
>
> I would like to be able to compile my test cases without actually running
> them. I use maven.test.skip=true but that seems to prevent not only the
> test execution but the test compilation. Is there a way to compile
> without running test cases. I would prefer not to mess with the pom
> files, but do it via the command line like -Dmaven.test.skip=true.
>
> Thanks,
>
> jp4
>
--
View this message in context: http://www.nabble.com/Can-you-compile-test-cases-without-running-them-tf3016005s177.html#a8375759
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: Can you compile test cases without running them
Posted by franz see <fr...@gmail.com>.
Good day to you, jp4,
The source code compilation is handled by the maven-compiler-plugin by
default. To compile just your test cases, you can do mvn
compiler:testCompile ( see [1] )
Cheers,
Franz
[1] http://maven.apache.org/plugins/maven-compiler-plugin/
jp4 wrote:
>
> I would like to be able to compile my test cases without actually running
> them. I use maven.test.skip=true but that seems to prevent not only the
> test execution but the test compilation. Is there a way to compile
> without running test cases. I would prefer not to mess with the pom
> files, but do it via the command line like -Dmaven.test.skip=true.
>
> Thanks,
>
> jp4
>
--
View this message in context: http://www.nabble.com/Can-you-compile-test-cases-without-running-them-tf3016005s177.html#a8384262
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: Can you compile test cases without running them
Posted by Wendy Smoak <ws...@gmail.com>.
On 1/15/07, jp4 <jo...@hnpsolutions.com> wrote:
> I would like to be able to compile my test cases without actually running
> them. I use maven.test.skip=true but that seems to prevent not only the
> test execution but the test compilation. Is there a way to compile without
> running test cases. I would prefer not to mess with the pom files, but do
> it via the command line like -Dmaven.test.skip=true.
http://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
"mvn test-compile" will run all the lifecycle phases up to and
including test-compile. It is in the next phase, 'test' that the
tests are executed.
--
Wendy
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Can you compile test cases without running them
Posted by allan ramirez <aq...@gmail.com>.
just command "mvn test-compile"
On 1/16/07, jp4 <jo...@hnpsolutions.com> wrote:
>
>
> I would like to be able to compile my test cases without actually running
> them. I use maven.test.skip=true but that seems to prevent not only the
> test execution but the test compilation. Is there a way to compile
> without
> running test cases. I would prefer not to mess with the pom files, but do
> it via the command line like -Dmaven.test.skip=true.
>
> Thanks,
>
> jp4
> --
> View this message in context:
> http://www.nabble.com/Can-you-compile-test-cases-without-running-them-tf3016005s177.html#a8375655
> 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
>
>
--
==========================================================
- alramirez
Re: Can you compile test cases without running them
Posted by drekka <de...@aegeon.com.au>.
Another method is to tell the surfire plugin to skip testing. Just add this
to the plugins:
<plugins>
<!-- Skip surefire plugin. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
I used this a lot because I run my own plugin to handle JUnit4.x because the
surefire one has too many issues with it. So I need the tests compiled but
not run by surefire. But still need to execute the test phase so my plugin
runs.
ciao
Derek
jp4 wrote:
>
> I would like to be able to compile my test cases without actually running
> them. I use maven.test.skip=true but that seems to prevent not only the
> test execution but the test compilation. Is there a way to compile
> without running test cases. I would prefer not to mess with the pom
> files, but do it via the command line like -Dmaven.test.skip=true.
>
> Thanks,
>
> jp4
>
--
View this message in context: http://www.nabble.com/Can-you-compile-test-cases-without-running-them-tf3016005s177.html#a8381021
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: Can you compile test cases without running them
Posted by Tom Huybrechts <to...@gmail.com>.
-Dmaven.test.skip.exec in the surefire snapshot version
On 1/15/07, jp4 <jo...@hnpsolutions.com> wrote:
>
> I would like to be able to compile my test cases without actually running
> them. I use maven.test.skip=true but that seems to prevent not only the
> test execution but the test compilation. Is there a way to compile without
> running test cases. I would prefer not to mess with the pom files, but do
> it via the command line like -Dmaven.test.skip=true.
>
> Thanks,
>
> jp4
> --
> View this message in context: http://www.nabble.com/Can-you-compile-test-cases-without-running-them-tf3016005s177.html#a8375655
> 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