Discussion:
Skipping Tests but Still Compiling
Kevan Dunsmore
2007-01-30 22:45:32 UTC
Permalink
So I just discovered that if I kick off a build using



mvn -Dmaven.test.skip=true install



then Maven will not even bother compiling the test classes. Is there any
way to force Maven to compile the test classes but not run the tests?





Thanks,

Kevan.







Kevan Dunsmore

Senior Software Engineer

SABRIX Inc

t: 503.924.4908

f: 503.620.5756




This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information that is protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.
Bashar Abdul Jawad
2007-01-30 22:57:38 UTC
Permalink
That is not true. Maven will still compile the test classes, but only if
they have changed since the last compilation. To force maven to compile even
if there were no changes run a clean first.

Bashar

-----Original Message-----
From: Kevan Dunsmore [mailto:***@sabrix.com]
Sent: Tuesday, January 30, 2007 3:46 PM
To: Maven Users List
Subject: Skipping Tests but Still Compiling

So I just discovered that if I kick off a build using



mvn -Dmaven.test.skip=true install



then Maven will not even bother compiling the test classes. Is there any
way to force Maven to compile the test classes but not run the tests?





Thanks,

Kevan.







Kevan Dunsmore

Senior Software Engineer

SABRIX Inc

t: 503.924.4908

f: 503.620.5756




This e-mail message, including any attachments, is for the sole use of the
intended recipient(s) and may contain confidential and privileged
information that is protected from disclosure. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all copies
of the original message and any attachments.
Mark Hewett
2007-01-30 23:12:48 UTC
Permalink
Post by Bashar Abdul Jawad
That is not true. Maven will still compile the test classes, but only if
they have changed since the last compilation. To force maven to compile even
if there were no changes run a clean first.
Bashar
Doesn't seem to for me...
Post by Bashar Abdul Jawad
mvn -Dmaven.test.skip=true clean install
<lines deleted>
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
<lines deleted>
Bashar Abdul Jawad
2007-01-30 23:26:10 UTC
Permalink
Try to add the compile plugin if it isn't there already:

<plugin>
<groupId>org.apache.maven.plugins</groupId>

<artifactId>maven-compiler-plugin</artifactId>
</plugin>

Bashar


-----Original Message-----
From: Mark Hewett [mailto:***@gmail.com]
Sent: Tuesday, January 30, 2007 4:13 PM
To: Maven Users List
Subject: Re: Skipping Tests but Still Compiling
Post by Bashar Abdul Jawad
That is not true. Maven will still compile the test classes, but only if
they have changed since the last compilation. To force maven to compile even
if there were no changes run a clean first.
Bashar
Doesn't seem to for me...
Post by Bashar Abdul Jawad
mvn -Dmaven.test.skip=true clean install
<lines deleted>
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
<lines deleted>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org
Wayne Fay
2007-01-31 06:41:52 UTC
Permalink
This "compile tests but don't run" issue was covered just 2 weeks
ago... Please search the archive before posting next time.

from jp4 <***@hnpsolutions.com>
to ***@maven.apache.org
date Jan 15, 2007 11:34 AM
subject Can you compile test cases without running them

Wayne
Post by Bashar Abdul Jawad
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
Bashar
-----Original Message-----
Sent: Tuesday, January 30, 2007 4:13 PM
To: Maven Users List
Subject: Re: Skipping Tests but Still Compiling
Post by Bashar Abdul Jawad
That is not true. Maven will still compile the test classes, but only if
they have changed since the last compilation. To force maven to compile
even
Post by Bashar Abdul Jawad
if there were no changes run a clean first.
Bashar
Doesn't seem to for me...
Post by Bashar Abdul Jawad
mvn -Dmaven.test.skip=true clean install
<lines deleted>
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
<lines deleted>
---------------------------------------------------------------------
---------------------------------------------------------------------
Kevan Dunsmore
2007-01-31 19:46:00 UTC
Permalink
Can you point me to the mechanism you use to search the archives?

Thanks,
Kevan.


-----Original Message-----
From: Wayne Fay [mailto:***@gmail.com]
Sent: Tuesday, January 30, 2007 10:42 PM
To: Maven Users List
Subject: Re: Skipping Tests but Still Compiling

This "compile tests but don't run" issue was covered just 2 weeks
ago... Please search the archive before posting next time.

from jp4 <***@hnpsolutions.com>
to ***@maven.apache.org
date Jan 15, 2007 11:34 AM
subject Can you compile test cases without running them

Wayne
Post by Bashar Abdul Jawad
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Post by Bashar Abdul Jawad
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
Bashar
-----Original Message-----
Sent: Tuesday, January 30, 2007 4:13 PM
To: Maven Users List
Subject: Re: Skipping Tests but Still Compiling
Post by Bashar Abdul Jawad
That is not true. Maven will still compile the test classes, but only if
they have changed since the last compilation. To force maven to compile
even
Post by Bashar Abdul Jawad
if there were no changes run a clean first.
Bashar
Doesn't seem to for me...
Post by Bashar Abdul Jawad
mvn -Dmaven.test.skip=true clean install
<lines deleted>
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
<lines deleted>
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-***@maven.apache.org
For additional commands, e-mail: users-***@maven.apache.org


This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information that is protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.
Jonathan Anstey
2007-01-31 19:55:18 UTC
Permalink
Post by Kevan Dunsmore
Can you point me to the mechanism you use to search the archives?
Thanks,
Kevan.
-----Original Message-----
Sent: Tuesday, January 30, 2007 10:42 PM
To: Maven Users List
Subject: Re: Skipping Tests but Still Compiling
This "compile tests but don't run" issue was covered just 2 weeks
ago... Please search the archive before posting next time.
date Jan 15, 2007 11:34 AM
subject Can you compile test cases without running them
Wayne
Post by Bashar Abdul Jawad
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Post by Bashar Abdul Jawad
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
Bashar
-----Original Message-----
Sent: Tuesday, January 30, 2007 4:13 PM
To: Maven Users List
Subject: Re: Skipping Tests but Still Compiling
Post by Bashar Abdul Jawad
That is not true. Maven will still compile the test classes, but
only if
Post by Bashar Abdul Jawad
Post by Bashar Abdul Jawad
they have changed since the last compilation. To force maven to
compile
Post by Bashar Abdul Jawad
even
Post by Bashar Abdul Jawad
if there were no changes run a clean first.
Bashar
Doesn't seem to for me...
Post by Bashar Abdul Jawad
mvn -Dmaven.test.skip=true clean install
<lines deleted>
[INFO] [compiler:testCompile]
[INFO] Not compiling test sources
[INFO] [surefire:test]
[INFO] Tests are skipped.
<lines deleted>
---------------------------------------------------------------------
---------------------------------------------------------------------
---------------------------------------------------------------------
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information that is protected from disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.
---------------------------------------------------------------------
Continue reading on narkive:
Loading...