You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Rene A <li...@hotmail.com> on 2009/01/28 14:13:06 UTC

Unable to exclude Selenium tests from my war

Hi, I'm trying to exclude my Selenium tests from the production .war, here is
my structure

Projet
|pom.xml
|-src
|  `--main
|      `--webapp
|           `--selenium
|      `--resources
|      `--java

and so on.

i'm using profiles to help me clean my war, so that when it goes into
production, it doesn't have any of our tests.

so here is my profile
<profile>
    <id>config-Prod</id>
	<build>
	       <plugins>
      			<plugin>
       				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-war-plugin</artifactId>
				<version>2.0</version>
				<configuration>
					<packagingExcludes>src/main/webapp/selenium*.html</packagingExcludes> 
				</configuration>
			</plugin>         						
		</plugins>
	</build>
</profile>

i also tried in the <configuration> the following :
<webResources>
   	<resource>
               <directory>src/main/webapp/selenium</directory>
		        <excludes>
		        	<exclude>*.html</exclude>
		        </excludes>
	</resource>
</webResources>


Does anybody know why the exclusion doesn't work ? 

Thanks


-- 
View this message in context: http://www.nabble.com/Unable-to-exclude-Selenium-tests-from-my-war-tp21705434p21705434.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: Unable to exclude Selenium tests from my war

Posted by Rene A <li...@hotmail.com>.
Thanks, but moving my selenium tests to src/test improve my structure and by
doing so, clean's my .war

Regards

Rene


Jeff MAURY wrote:
> 
> According to the Maven conventions, you selenium tests should be under the
> src/test subdirectory and not inside your webapp. So that; the Maven WAR
> plugin will not include them in the resulting WAR.
> 
> Regards
> Jeff MAURY
> 
> On Wed, Jan 28, 2009 at 2:13 PM, Rene A <li...@hotmail.com> wrote:
> 
>>
>> Hi, I'm trying to exclude my Selenium tests from the production .war,
>> here
>> is
>> my structure
>>
>> Projet
>> |pom.xml
>> |-src
>> |  `--main
>> |      `--webapp
>> |           `--selenium
>> |      `--resources
>> |      `--java
>>
>> and so on.
>>
>> i'm using profiles to help me clean my war, so that when it goes into
>> production, it doesn't have any of our tests.
>>
>> so here is my profile
>> <profile>
>>    <id>config-Prod</id>
>>        <build>
>>               <plugins>
>>                        <plugin>
>>                               
>> <groupId>org.apache.maven.plugins</groupId>
>>                                <artifactId>maven-war-plugin</artifactId>
>>                                <version>2.0</version>
>>                                <configuration>
>>
>>  <packagingExcludes>src/main/webapp/selenium*.html</packagingExcludes>
>>                                </configuration>
>>                        </plugin>
>>                </plugins>
>>        </build>
>> </profile>
>>
>> i also tried in the <configuration> the following :
>> <webResources>
>>        <resource>
>>               <directory>src/main/webapp/selenium</directory>
>>                        <excludes>
>>                                <exclude>*.html</exclude>
>>                        </excludes>
>>        </resource>
>> </webResources>
>>
>>
>> Does anybody know why the exclusion doesn't work ?
>>
>> Thanks
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Unable-to-exclude-Selenium-tests-from-my-war-tp21705434p21705434.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
>>
>>
> 
> 
> -- 
> La mélancolie c'est communiste
> Tout le monde y a droit de temps en temps
> La mélancolie n'est pas capitaliste
> C'est même gratuit pour les perdants
> La mélancolie c'est pacifiste
> On ne lui rentre jamais dedans
> La mélancolie oh tu sais ça existe
> Elle se prend même avec des gants
> La mélancolie c'est pour les syndicalistes
> Il faut juste sa carte de permanent
> 
> Miossec (2006)
> 
> http://www.jeffmaury.com
> http://riadiscuss.jeffmaury.com
> http://www.lastfm.fr/listen/user/jeffmaury/personal
> Mes CDs à récupérer:
> http://spreadsheets.google.com/ccc?key=pNeg4Doa_oCsh7CepKPaPTA&hl=en
> 
> 
> -----
> http://riadiscuss.blogspot.com 
> 

-- 
View this message in context: http://www.nabble.com/Unable-to-exclude-Selenium-tests-from-my-war-tp21705434p21746925.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: Unable to exclude Selenium tests from my war

Posted by Jeff MAURY <je...@jeffmaury.com>.
According to the Maven conventions, you selenium tests should be under the
src/test subdirectory and not inside your webapp. So that; the Maven WAR
plugin will not include them in the resulting WAR.

Regards
Jeff MAURY

On Wed, Jan 28, 2009 at 2:13 PM, Rene A <li...@hotmail.com> wrote:

>
> Hi, I'm trying to exclude my Selenium tests from the production .war, here
> is
> my structure
>
> Projet
> |pom.xml
> |-src
> |  `--main
> |      `--webapp
> |           `--selenium
> |      `--resources
> |      `--java
>
> and so on.
>
> i'm using profiles to help me clean my war, so that when it goes into
> production, it doesn't have any of our tests.
>
> so here is my profile
> <profile>
>    <id>config-Prod</id>
>        <build>
>               <plugins>
>                        <plugin>
>                                <groupId>org.apache.maven.plugins</groupId>
>                                <artifactId>maven-war-plugin</artifactId>
>                                <version>2.0</version>
>                                <configuration>
>
>  <packagingExcludes>src/main/webapp/selenium*.html</packagingExcludes>
>                                </configuration>
>                        </plugin>
>                </plugins>
>        </build>
> </profile>
>
> i also tried in the <configuration> the following :
> <webResources>
>        <resource>
>               <directory>src/main/webapp/selenium</directory>
>                        <excludes>
>                                <exclude>*.html</exclude>
>                        </excludes>
>        </resource>
> </webResources>
>
>
> Does anybody know why the exclusion doesn't work ?
>
> Thanks
>
>
> --
> View this message in context:
> http://www.nabble.com/Unable-to-exclude-Selenium-tests-from-my-war-tp21705434p21705434.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
>
>


-- 
La mélancolie c'est communiste
Tout le monde y a droit de temps en temps
La mélancolie n'est pas capitaliste
C'est même gratuit pour les perdants
La mélancolie c'est pacifiste
On ne lui rentre jamais dedans
La mélancolie oh tu sais ça existe
Elle se prend même avec des gants
La mélancolie c'est pour les syndicalistes
Il faut juste sa carte de permanent

Miossec (2006)

http://www.jeffmaury.com
http://riadiscuss.jeffmaury.com
http://www.lastfm.fr/listen/user/jeffmaury/personal
Mes CDs à récupérer:
http://spreadsheets.google.com/ccc?key=pNeg4Doa_oCsh7CepKPaPTA&hl=en