You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Stuart McCulloch <st...@jayway.net> on 2008/03/07 05:36:06 UTC

Re: Eclipse plugin build using maven-bundle-plugin

On 29/01/2008, Fabio Braga de Oliveira <fa...@simula.com.br> wrote:
>
> Stuart,
>
> Thanks a lot! You salved days of work! One more question... Are you
> doing RCP applications? If yes, did you add the eclipse dependencies to
> the POM? There is a repository with the necessary eclipse plugins, or I
> need to add them all in a internal repository?
>
> Thanks, thanks, and thanks again.


I typically add eclipse dependencies to the pom and there are several
eclipse jars now on the central maven repository - btw, you can also add
plug-ins from your Eclipse installation to your local repository by using:

   mvn eclipse:make-artifacts -DeclipseDir=<installation-directory>

also if you see errors about version ranges, try removing the org/eclipse
directory from your local maven repository - there were some problems
early on with some of the plug-ins deployed to central, but I believe this
has now been fixed.

HTH

Stuart McCulloch wrote:
> > On 29/01/2008, Fabio Braga de Oliveira <fa...@simula.com.br> 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: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >
>
>
> --
>
> Fabio Braga de Oliveira
> Gerente de Projetos de Software
> Work:   +55 19 3295-2111
> Mobile: +55 11 9769-6990
> E-mail: fabio@simula.com.br
>
> Símula Sistemas de Planejamento e Comércio Ltda.
> Url:     http://www.simula.com.br
> Address: Av. José Bonifácio, 2510
>           Zipcode 13093-240
>           Campinas - SP - Brazil
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>



-- 
Cheers, Stuart