The copy mojo doesn't care about the scope because it will copy the
artifacts listed in the artifactItems element. The scope is used by
copy-dependencies to decide which ones from the project need to be
copied since it starts from the entire dependency element. If you don't
specify a scope, it will include all. 

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of Steinar Bang
Sent: Monday, November 20, 2006 9:04 AM
To: [email protected]
Subject: Re: Pulling jars into local repository

>>>>> Steinar Bang <[EMAIL PROTECTED]>:

>>>>> "Tom Huybrechts" <[EMAIL PROTECTED]>:
>> On 11/10/06, Steinar Bang <[EMAIL PROTECTED]> wrote:

>>> Now, I need to find out if I can make maven pull in the eclipse 
>>> bundles neccessary for the runtime, as well.  This would avoid this 
>>> as a copying step.

>> Declare them as runtime dependencies ?

> Yes, that is the obvious approach.  My problem is that I don't know 
> exactly which eclipse bundles to depend on, and from where.

I've now tried changing the <scope> of the dependencies from "compile"
to "provided".  Maven still copied the offending jar files (an OSGi
framwork incompatible with the version delivered with the eclipse IDE)
were still copied to the eclipse PDE platform directory.

I also tried changing the <scope> to "test", and this did succeed in
making maven not copy the jar files to the eclipse PDE platform
directory, but the bundle compilation failed because of a missing OSGi
framework.

Here are the <dependency> elements from the bundles' top level
pom.xml: 

   <dependency>
      <groupId>org.eclipse</groupId>
      <artifactId>osgi</artifactId>
      <version>3.1.2</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.eclipse.osgi</groupId>
      <artifactId>services</artifactId>
      <version>3.1.2</version>
      <scope>compile</scope>
    </dependency>

Here are the copy-dependencies settings from the same file:

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dependency-maven-plugin</artifactId>
        <executions>
         <execution>
          <id>copy-dependencies</id>
          <phase>package</phase>
          <goals>
           <goal>copy-dependencies</goal>
          </goals>
          <configuration>
 
<outputDirectory>${user.home}/pde_target_platform/plugins</outputDirecto
ry>
           <excludeTransitive>true</excludeTransitive>
          </configuration>
         </execution>
         <execution>
          <id>copy</id>
          <phase>package</phase>
          <goals>
           <goal>copy</goal>
          </goals>
          <configuration>
           <artifactItems>
              <artifactItem>
                <groupId>${project.groupId}</groupId>
                <artifactId>${project.artifactId}</artifactId>
                <version>${project.version}</version>
                <type>${project.packaging}</type>
              </artifactItem>
           </artifactItems>
 
<outputDirectory>${user.home}/pde_target_platform/plugins</outputDirecto
ry>
          </configuration>
         </execution>
        </executions>
      </plugin>

Do I need to add a <scope> to the <artifactItem>, I wonder?


---------------------------------------------------------------------
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]

Reply via email to