You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Steinar Bang <sb...@dod.no> on 2007/01/28 21:26:28 UTC

dependency:copy-dependencies and the exclude* parameters

Platform: Intel Pentium M, Ubuntu Dapper,
	  maven 2.0.4,
	  dependency plugin 2.0-alpha-1

I'm using dependency:copy-dependencies to copy an OSGi bundle, and its
depdencencies, and I'm trying, without success, to exclude some
dependencies from the list of copied files, using the exclude*
parameters listed in the documentation:
	http://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html

The dependencies I'm trying to exclude, are this:
  <groupId>org.eclipse</groupId>
  <artifactId>osgi</artifactId>
  <version>3.1.2</version>
and this
  <groupId>org.eclipse.osgi</groupId>
  <artifactId>services</artifactId>
  <version>3.1.2</version>

I've tried using the <excludeArtifactIds> parameter and I've tried
using the <excludeGroupIds> parameter, and neither have had any
effect. 

I tried using <excludeScope>compile</excludeScope>, but that had the
effect that _no_ dependencies are copied.

Does anyone know what the problem might be?  Will the approach I'm
using not work?  Is it a bug in the plugin?

Thanx!


- Steinar

the pom.xml I'm attempting to use, follows:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 <modelVersion>4.0.0</modelVersion> 
 <parent>
  <groupId>com.somecompany.eclipse</groupId>
  <artifactId>pde_target_platform</artifactId>
  <version>1</version>
 </parent>
 <artifactId>build-ccr-target-platform</artifactId>
 <name>Additional API PDE target platform</name>
 <packaging>pom</packaging>
 <dependencies>
  <dependency>
   <groupId>com.somecompany.somegroup</groupId>
   <artifactId>somebundle</artifactId>
   <version>0.1.0</version>
  </dependency>
 </dependencies>
 <build>
  <plugins>
   <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <executions>
     <execution>
      <id>copy-dependencies</id>
      <phase>validate</phase>
      <goals>
       <goal>copy-dependencies</goal>
      </goals>
      <configuration>
       <outputDirectory>${target.plugin.dir}</outputDirectory>
       <excludeGroupIds>org.eclipse,org.eclipse.osgi</excludeGroupIds>
      </configuration>
     </execution>
    </executions>
   </plugin>
  </plugins>
 </build>
</project>

The target.plugin.dir parameter is defined in the parent, like this:
 <properties>
  <target.platform.dir>${user.home}/pde_target_platform_test</target.platform.dir>
  <target.plugin.dir>${target.platform.dir}/plugins</target.plugin.dir>
 </properties>


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