You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Robert Langridge <La...@cpw.co.uk> on 2006/12/08 11:02:17 UTC

Surefire test query.

Hi,

I have a situation where all my test classes are in the same directory
structure as my main classes. When I point the <testSourceDirectory> to
the directory where all the source lives it does not exclude the normal
source files. I thought by default the Surefire plugin only compiles and
tests the *Test.java (or similar) not all of the source? 

For example: when I have the below and I run "mvn compile" it compiles
778 files, great. When I run "mvn test" it compiles 786 files. How do I
get the test just to compile the 8 test files I have?

	<outputDirectory>bin</outputDirectory>	
	<sourceDirectory>JavaSource</sourceDirectory>
	<testSourceDirectory>JavaSource</testSourceDirectory>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
			<excludes>
				<exclude>**/*Test*.java</exclude>
				<exclude>**/junit/*</exclude>
			</excludes>
        </configuration>
      </plugin>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-surefire-plugin</artifactId>
		<configuration>
		  <testFailureIgnore>true</testFailureIgnore>
		  <includes>
			<include>**/junit/*</include>
			<include>**/*Test*.java</include>

		  </includes>
		</configuration>
	</plugin>

Cheers,

Rob Langridge 



This communication together with any attachments transmitted with it ("this E-Mail") is intended only for the use of the addressee and may contain information which is privileged and confidential.  If the reader of this E-Mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are hereby notified that any use, dissemination, forwarding, printing or copying of this E-Mail is strictly prohibited.  Addressees should check this E-mail for viruses.  The Company makes no representations as regards the absence of viruses in this E-Mail.  If you have received this E-Mail in error please notify our IT Service Desk immediately by e-mail at postmaster@cpw.co.uk  Please then immediately delete, erase or otherwise destroy this E-Mail and any copies of it.

Any opinions expressed in this E-Mail are those of the author and do not necessarily constitute the views of the Company.  Nothing in this E-Mail shall bind the Company in any contract or obligation.

For the purposes of this E-Mail "the Company" means The Carphone Warehouse Group Plc and/or any of its subsidiaries.

Please feel free to visit our website:  http:// www.carphonewarehouse.com or http://www.phonehouse.com

The Carphone Warehouse Group Plc (Registered in England No. 3253714) 1 Portal Way, London W3 6RS


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


Re: Surefire test query.

Posted by Wayne Fay <wa...@gmail.com>.
Easiest "fix" is to simply move the 8 test files to the src/test
rather than src/main. Given that its just 8 files, I don't know why
you wouldn't just do it??

Wayne

On 12/8/06, Robert Langridge <La...@cpw.co.uk> wrote:
>
> Hi,
>
> I have a situation where all my test classes are in the same directory
> structure as my main classes. When I point the <testSourceDirectory> to
> the directory where all the source lives it does not exclude the normal
> source files. I thought by default the Surefire plugin only compiles and
> tests the *Test.java (or similar) not all of the source?
>
> For example: when I have the below and I run "mvn compile" it compiles
> 778 files, great. When I run "mvn test" it compiles 786 files. How do I
> get the test just to compile the 8 test files I have?
>
>        <outputDirectory>bin</outputDirectory>
>        <sourceDirectory>JavaSource</sourceDirectory>
>        <testSourceDirectory>JavaSource</testSourceDirectory>
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-compiler-plugin</artifactId>
>        <configuration>
>                        <excludes>
>                                <exclude>**/*Test*.java</exclude>
>                                <exclude>**/junit/*</exclude>
>                        </excludes>
>        </configuration>
>      </plugin>
>        <plugin>
>                <groupId>org.apache.maven.plugins</groupId>
>                <artifactId>maven-surefire-plugin</artifactId>
>                <configuration>
>                  <testFailureIgnore>true</testFailureIgnore>
>                  <includes>
>                        <include>**/junit/*</include>
>                        <include>**/*Test*.java</include>
>
>                  </includes>
>                </configuration>
>        </plugin>
>
> Cheers,
>
> Rob Langridge
>
>
>
> This communication together with any attachments transmitted with it ("this E-Mail") is intended only for the use of the addressee and may contain information which is privileged and confidential.  If the reader of this E-Mail is not the intended recipient or the employee or agent responsible for delivering it to the intended recipient you are hereby notified that any use, dissemination, forwarding, printing or copying of this E-Mail is strictly prohibited.  Addressees should check this E-mail for viruses.  The Company makes no representations as regards the absence of viruses in this E-Mail.  If you have received this E-Mail in error please notify our IT Service Desk immediately by e-mail at postmaster@cpw.co.uk  Please then immediately delete, erase or otherwise destroy this E-Mail and any copies of it.
>
> Any opinions expressed in this E-Mail are those of the author and do not necessarily constitute the views of the Company.  Nothing in this E-Mail shall bind the Company in any contract or obligation.
>
> For the purposes of this E-Mail "the Company" means The Carphone Warehouse Group Plc and/or any of its subsidiaries.
>
> Please feel free to visit our website:  http:// www.carphonewarehouse.com or http://www.phonehouse.com
>
> The Carphone Warehouse Group Plc (Registered in England No. 3253714) 1 Portal Way, London W3 6RS
>
>
> ---------------------------------------------------------------------
> 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


remote touch on repository root directory

Posted by Br...@gi-de.com.
After a successful deploy onto our central project repository server I'd
like to do a "touch" onto the repository root directory in order to see
easily that the deploy finished sucessful. I'm deploying from a windows
machine up to a unix server with a simple command shell script and use scp
for the upload.
Has anyone already something like a remote command through scp or whatever
that allows a "remote touch" onto the unix server directory that I can
easily add to my command script?
Cheers
Brigitte


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