views:

21

answers:

1

I'm attempting to define an eclipse plugin product that includes bundles from Spring's Enterprise Bundle Repository and Eclipse's Zodiac repository. I've used Maven to download these repositories, but I can't figure out how to make the product editor aware of them.

Ideally, I'd like to make the product editor aware of a list of maven managed dependencies and allow me to add them to its dependency list. Failing that, is there an easy way to simply import the Jar's? Or am I stuck creating a dummy project and importing the contents of each Jar as an archive?

A: 

After a night's sleep, this is the answer I came up with:

I'd created an empty eclipse project and placed my *.product file in there. To that project, I added a *.target file (New > Plugin Development > Target Definition). On the definition tab of the target editor, I added my custom folder.

All of my dependency Jars are copied to that folder using the Maven Dependency Plugin:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-dependency-plugin</artifactId>
    <version>2.1</version>
    <executions>
        <execution>
        <id>copy-dependencies</id>
        <phase>process-sources</phase>
        <goals>
            <goal>copy-dependencies</goal>
        </goals>
        <configuration>
            <outputDirectory>${basedir}</outputDirectory>
            <overWriteReleases>false</overWriteReleases>
            <overWriteSnapshots>false</overWriteSnapshots>
            <overWriteIfNewer>true</overWriteIfNewer>
        </configuration>
        </execution>
    </executions>
</plugin>

Once this is all done, I clicked the "Set as Target Platform" link in the top-right corner of the target editor. Now all of my Maven downloaded Jars are visible in the product editor. Note that if you change your maven dependencies, you'll likely need to refresh the project.

Matt Pfefferle