Copy-dependencies includes all scopes by default, specify the scope you want in 
the config.

-----Original Message-----
From: youhaodeyi [mailto:[EMAIL PROTECTED] 
Sent: Saturday, April 19, 2008 6:21 AM
To: users@maven.apache.org
Subject: RE: How to filter test dependency?


It doesn't work. This is my dependency:
<dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>4.4</version>
                        <scope>test</scope>
</dependency>
I have indicated that it is in test scope. But the copy-dependencies will
include the junit-4.4.jar.


Thomas Darbois wrote:
> 
> <build>
>                 <plugins>
>                         <plugin>
>                                
> <groupId>org.apache.maven.plugins</groupId>
>                                
> <artifactId>maven-dependency-plugin</artifactId>
>                                 <executions>
>                                         <execution>
>         <id>copy-dependencies</id>
>         <phase>package</phase>
>         <goals>
>                 <goal>copy-dependencies</goal>
>                                                 </goals>
>                                                 <configuration>
>                                 <!-- excluding test dependencies from
> copying -->                                      
> <excludeScope>test</excludeScope>
>                                                 </configuration>
>                                         </execution>
>                                 </executions>
>                         </plugin>
>                 </plugins>
>         </build>
> 
> 
> Tomas Darbois
> Edifixio Grenoble - Projet ScorWare
> 04 76 29 89 27
> [EMAIL PROTECTED]
> -----Message d'origine-----
> De : youhaodeyi [mailto:[EMAIL PROTECTED]
> Envoyé : vendredi 18 avril 2008 05:35
> À : users@maven.apache.org
> Objet : How to filter test dependency?
> 
> 
> I add maven dependency plugin in my pom see below. But it will copy the
> dependencies which is in test scope. How can I filter them out?
> 
> <build>
>                 <plugins>
>                         <plugin>
>                                
> <groupId>org.apache.maven.plugins</groupId>
>                                
> <artifactId>maven-dependency-plugin</artifactId>
>                                 <executions>
>                                         <execution>
>                                                 <id>copy-dependencies</id>
>                                                 <phase>package</phase>
>                                                 <goals>
>                                                        
> <goal>copy-dependencies</goal>
>                                                 </goals>
>                                         </execution>
>                                 </executions>
>                         </plugin>
>                 </plugins>
>         </build>
> --
> View this message in context:
> http://www.nabble.com/How-to-filter-test-dependency--tp16759890s177p16759890.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-filter-test-dependency--tp16759890s177p16781649.html
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to