Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] How do I import a bundle-packaged project into Eclipse for debug?

Have a look at tycho wiki [1], pomfirst-thirdparty is an example of what
I called "wrapper" bundle. In your case, you have bundle that "wraps"
guava. You just import such projects as existing Maven Projects in
eclipse, and everything should just work.

[1] https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts

--
Regards,
Igor

On 2014-10-24, 15:35, Lee Carver wrote:
Igor -

How do I create the "wrapper" bundle?  Just including the dependency on
the BundleGuava "bundling" project does not get the Eclipse workspace right.

Do I need to create a separate Eclipse project?  Exactly how should it
be set up?  Is there an example in the m2e code base?

Thanks
    Lee

On Fri, Oct 24, 2014 at 12:12 PM, Igor Fedorenko <igor@xxxxxxxxxxxxxx
<mailto:igor@xxxxxxxxxxxxxx>> wrote:

    Sadly, PDE does not provide API to implement this, but there are two
    workarounds

    * If you have m2e/tycho integration installed, you can import your
    "wrapper" bundles in Eclipse workspace and these bundle projects should
    become available for other projects. This is what I usually do.

    * Alternatively, you can copy these wrapper bundle to
    <eclipse-install>/dropins folder. They should become available for other
    workspace projects after eclipse restart.

    --
    Regards,
    Igor


    On 2014-10-24, 15:02, Lee Carver wrote:

        I'm trying to use Maven and m2e to develop an RCP client that
        includes
        several third-partly libraries. In the past, I've been able to
        use the
        custom plugin builds and a local repository of third-party jars,
        but I
        was hoping to do better with Maven.

        As a minimal example, I've tried to package a recent Google Guava
        release as a third-party OSGi component.  I create the component
        with
        "bundle" packages, and the target/../BundleGuava..jar has all the
        expected components.  The rest of the details are in the
        attached zip,
        but the bundle instructions are:

                <plugin>
                  <groupId>org.apache.felix</__groupId>
                  <artifactId>maven-bundle-__plugin</artifactId>
                  <version>2.5.3</version>
                  <extensions>true</extensions>
                  <configuration>
                    <instructions>
                      <Embed-Dependency>*</Embed-__Dependency>
                      <Export-Package>
                        com.google.common.*
                      </Export-Package>
                      <_nouses>true</_nouses>
                      <_removeheaders>
                        Embed-Dependency,
                        Embedded-Artifacts,
                        Import-Package,
                        Private-Package
                      </_removeheaders>
                    </instructions>
                  </configuration>
                </plugin>

        However, I cannot get the client plugin, GuavaUser, to properly
        accept
        the new module.  I thought that the following dependency would
        make the
        artifact from above available in Eclipse.

            <dependencies>
              <dependency>
                <groupId>org.demo.bundle</__groupId>
                <artifactId>BundleGuava</__artifactId>
                <version>1.0.0-SNAPSHOT</__version>
              </dependency>
            </dependencies>

        The Maven build appears to work fine, but Eclipse reports
        problems.  The
        sample call for Joiner.on(", ").join("Hello", "world") turns into an
        ClassNotFoundException.

        I'd like to do most of my debugging in the Eclipse IDE
        environment, but
        that would require successful launches from the Eclipse
        debugger.  What
        is the best way to make the bundled third-party library
        available to the
        Eclipse IDE.


        _________________________________________________
        tycho-user mailing list
        tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
        To change your delivery options, retrieve your password, or
        unsubscribe from this list, visit
        https://dev.eclipse.org/__mailman/listinfo/tycho-user
        <https://dev.eclipse.org/mailman/listinfo/tycho-user>

    _________________________________________________
    tycho-user mailing list
    tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
    To change your delivery options, retrieve your password, or
    unsubscribe from this list, visit
    https://dev.eclipse.org/__mailman/listinfo/tycho-user
    <https://dev.eclipse.org/mailman/listinfo/tycho-user>




_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user



Back to the top