Announcement Announcement Module
Collapse
No announcement yet.
Adding OSGI bundle project nature Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Adding OSGI bundle project nature

    Hi everyone,

    I need help,
    how to add bundle nature to a plugin project, but without directly use of spring tool (by clicking on the button "add bundle nature").

    I saw somewhere discussion about configuration "settings" in pom.xml. I am sure that it is possible, or I am in wrong ?

    I tried to do that using "mvn eclipse:eclipse" and adding the following lines of code in project pom.xml:

    ------------------------------------------------
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-eclipse-plugin</artifactId>

    <configuration>

    <classpathContainers>
    <classpathContainer>org.eclipse.jdt.launching.JRE_ CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.Standar dVMType/JavaSE-1.6</classpathContainer>
    <classpathContainer>org.eclipse.pde.core.requiredP lugins</classpathContainer>
    </classpathContainers>

    <buildcommands>
    <buildcommand>org.eclipse.wst.common.project.facet .core.builder</buildcommand>
    <buildcommand>org.eclipse.jdt.core.javabuilder</buildcommand>
    <buildcommand>org.eclipse.pde.ManifestBuilder</buildcommand>
    <buildcommand>org.eclipse.pde.SchemaBuilder</buildcommand>
    <buildcommand>org.springframework.ide.eclipse.core .springbuilder</buildcommand>
    </buildcommands>

    <projectnatures>
    <projectnature>com.springsource.server.ide.facet.c ore.bundlenature</projectnature>
    <projectnature>org.springframework.ide.eclipse.cor e.springnature</projectnature>
    <projectnature>org.eclipse.pde.PluginNature</projectnature>
    <projectnature>org.eclipse.jdt.core.javanature</projectnature>
    <projectnature>org.eclipse.wst.common.project.face t.core.nature</projectnature>
    </projectnatures>

    </configuration>
    </plugin>

    ----------------------------------------

    but something is missing in configuration.

    This plugin and this configuration don't create the following files in .settings using by configuration for eclipse plugin:
    org.eclipse.wst.common.project.facet.core.xml
    org.eclipse.jdt.core.prefs

    and

    ---add on a build path

    <classpathentry kind="var" path="M2_REPO/org/eclipse/osgi/org.eclipse.osgi_/3.6.0/org.eclipse.osgi_-3.6.0-gs4tr.jar"/>

    and similar staffs from dependencies, but I don't want to maven-plugin do that.

    Does anyone know how to fix this problem?

    Thank you,

    Ivana

  • #2
    Hi,

    I can't comment on the Maven stuff as it's quite unknown to me but with in Eclipse I can help. The OSGi bundle nature is provided as a facet which is a part of the WTP project. So, assuming you have a PDE project, you first need to make it faceted and then from the project properties, go to the facets menu and apply the OSGi bundle facet under the EclipseRT heading.

    Chris.

    Comment

    Working...
    X