On 29/01/2008, Fabio Braga de Oliveira <[EMAIL PROTECTED]> wrote:
>
> Hi list!
Hi Fabio,
Anyone did a sucessful build of a eclipse plugin, using the
> maven-bundle-plugin?
yes :)
If yes, can you share the pom.xml or some tips of
> how to do? Or the right direction? I'm trying right now, but some pieces
> doesn't work very well. Some tips of what to do with the plugin.xml,
> build.properties and the MANIFEST.MF files, how to put in the right
> position to use the PDE tools are welcome.
1) to get the MANIFEST.MF file in the right place you can use the
manifestLocation setting:
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>1.2.0</version>
<extensions>true</extensions>
<!--
the following instructions build a simple set of public/private
classes into an OSGi bundle
-->
<configuration>
<manifestLocation>META-INF</manifestLocation>
<instructions>
<!--
...your specific BND instructions to create the bundle...
-->
</instructions>
</configuration>
</plugin>
2) to get the plugin.xml file (stored in the project root) into your final
bundle, use:
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>.</directory>
<includes>
<include>plugin.xml</include>
</includes>
</resource>
</resources>
and the bundleplugin will include it automatically to the right place in the
bundle.
3) you don't actually need a build.properties file as maven is building the
bundle
4) to create the Eclipse project metadata use:
mvn clean package eclipse:eclipse -Declipse.pde install
(note the install after the eclipse goal is to fix the manifest, because the
eclipse plugin
can corrupt it by adding a blank line in the middle of the file rather than
at the end...)
you should now be able to import your new plugin into Eclipse as an existing
project.
(read http://maven.apache.org/plugins/maven-eclipse-plugin for other useful
goals)
Maybe this is a very common question. We can create a how to or include
> this information in the FAQ section.
it's already part of the bundleplugin docs:
http://felix.apache.org/site/maven-bundle-plugin-bnd.html
( fed from the wiki: http://cwiki.apache.org/confluence/x/aX )
which also includes notes on embedding dependencies inside Eclipse plugins,
but we could add a link to it from the FAQ
HTH
Thanks in advance!
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
--
Cheers, Stuart