Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tycho-user] Transitive dependencies from pom-(first|only) builds to jars in p2 repos Re: Sharing code with Tycho eclipse-plugin and normal Maven project using Eclipse

So you want to have plain maven project that depends on a bundle
produced by a tycho build and have indirect dependencies resolved?
Nobody has figured out how to do this and personally I am convinced it
is not possible.

When resolving project dependencies, Maven and Tycho use different
methods to calculate dirty (i.e. with duplicates and conflicts)
dependency tree and to resolve any ambiguities and conflicts in the
dirty tree. Mixed Maven/Tycho dependency resolution like you ask, would
require a dirty tree constructed using Maven for some branches and using
Tycho for other branches, which may be doable. Resolving conflicts in
such a mixed tree in a sane way is almost certainly not possible.

--
Regards,
Igor

On 12-01-04 5:09 AM, Jörg von Frantzius wrote:
I'm talking about using a <dependency> on a bundle, with tycho resolving
that dependency and its transitive closure from a p2 repository.

This would enable using any Eclipse bundles in pom-only (and maybe
pom-first) builds.

I understood your posting from 2011/12/9 further down as that not being
supported.

Regards,
Jörg

2012/1/3 Igor Fedorenko <igor@xxxxxxxxxxxxxx <mailto:igor@xxxxxxxxxxxxxx>>

    What feature are you talking about?

    --
    Regards,
    Igor


    On 12-01-03 2:29 PM, Jörg von Frantzius wrote:

        Hi,

        IMHO it would be great if tycho would support this. Currently
        it's very
        cumbersome to build anything using maven that depends on jars
        accessible
        only in p2 repositories. Some folks seem to push selected
        Eclipse jars
        into public maven repositories, but that's only very selectively and
        restricted in versions.

        Do you think it does make any sense to file a feature request
        for this?

        Regards,
        Jörg

        2011/12/9 Igor Fedorenko <igor@xxxxxxxxxxxxxx
        <mailto:igor@xxxxxxxxxxxxxx> <mailto:igor@xxxxxxxxxxxxxx
        <mailto:igor@xxxxxxxxxxxxxx>>>


            Transitive dependencies won't work, but otherwise you should
        be able to
            have <dependency> on manifest-first bundles. Have not tried
        this myself,
            kinda pointless without indirect dependencies.

            --
            Regards,
            Igor


            On 11-12-08 10:51 PM, David Erickson wrote:

                Sorry, export classes so they can be consumed by other
        POM-first or
                regular jar packaged Maven projects.

                -D

                On 12/8/2011 7:09 PM, Igor Fedorenko wrote:

                    Share classes in what sense?

                    --
                    Regards,
                    Igor

                    On 11-12-08 7:21 PM, David Erickson wrote:

                        Igor-
                        I ran into another similar question, is it
        possible to
                        share classes
                        from a manifest-first bundle
        (packaging=eclipse-plugin)
                        with POM-first
                        or regular jar packaged Maven projects?

                        Thanks,
                        David

                        On 12/08/2011 03:41 PM, David Erickson wrote:

                            Great that worked perfectly for building/running
                            from Eclipse for both
                            projects, and building and running from
        Maven for
                            the regular Java
                            project, haven't had a chance to build the OSGi
                            project from Maven at
                            the command line but that isn't in my
        immediate work
                            flow so I can sort
                            it out later.

                            Thanks!
                            David

                            On 12/08/2011 02:33 PM, Igor Fedorenko wrote:

                                Use maven project as explained in
                                maven-bundle-plugin wiki (see [1] in
                                my previous reply).

                                m2e/tycho provides integration between
        m2e, pde and
                                maven-bundle-plugin.

                                Forgot to mention, this integration is
        fairly
                                recent addition to all
                                tools involved, so make sure to use the
                                following versions

                                maven-bundle-plugin 2.3.6
                                PDE 3.8M3 (comes with eclipse sdk 3.8M3)
                                m2e 1.1M3 (can be installed from juno
        release
                                repository)
                                m2e/tycho 0.6.0.201112050222 (can be
        installed from
                                Preferences->Maven->Discovery)

                                --
                                Regards,
                                Igor

                                On 11-12-08 5:01 PM, David Erickson wrote:

                                    Hi Igor,
                                    Thanks for the reply. What type of
        project
                                    would I create in Eclipse
                                    for
                                    the common code? Would it be a Maven
        Project
                                    or a Plug-in Project?
                                    And
                                    if BND is creating the MANIFEST
        after the
                                    fact how would Eclipse
                                    pick up
                                    the project for inclusion into OSGi
        launches?

                                    Thanks,
                                    D

                                    On 12/08/2011 01:16 PM, Igor
        Fedorenko wrote:

                                        I am not sure about product
        export from
                                        eclipse, it never worked
                                        for me
                                        reliably, so I gave up long time
        ago.
                                        Everything else is supposed to
        "just work" with Eclipse PDE 3.8M3 and
                                        m2e 1.1M3 -- just move the
                                        common
                                        code to a separate project and use
                                        maven-bundle-plugin [1] to
                                        generate
                                        bundle manifest.

                                        For command line build see [2]

                                        [1]
        http://felix.apache.org/site/____apache-felix-maven-bundle-____plugin-bnd.html
        <http://felix.apache.org/site/__apache-felix-maven-bundle-__plugin-bnd.html>
        <http://felix.apache.org/site/__apache-felix-maven-bundle-__plugin-bnd.html
        <http://felix.apache.org/site/apache-felix-maven-bundle-plugin-bnd.html>>

                                        [2]
        https://docs.sonatype.org/____display/TYCHO/Dependency+on+____pom-first+artifacts
        <https://docs.sonatype.org/__display/TYCHO/Dependency+on+__pom-first+artifacts>

        <https://docs.sonatype.org/__display/TYCHO/Dependency+on+__pom-first+artifacts
        <https://docs.sonatype.org/display/TYCHO/Dependency+on+pom-first+artifacts>>





                                        --
                                        Regards,
                                        Igor

                                        On 11-12-08 4:00 PM, David
        Erickson wrote:

                                            Hi all-
                                            I've got a project using
        Tycho that
                                            has multiple eclipse OSGi
                                            plugins
                                            that are assembled into a stand
                                            alone product but I don't
                                            believe is
                                            using any special Tycho
        building in
                                            Eclipse (call it project A), I
                                            also
                                            have a regular Java Maven
        project
                                            that builds a standalone
                                            executable
                                            jar file for execution (call it
                                            project B). What I'd like to
        do is
                                            share
                                            some common code between the two
                                            projects and enable the
        following:

                                            -Eclipse auto-builds both
        project A
                                            and B
                                            -Able to run project A and B
        within
                                            Eclipse
                                            -Able to export the project
        A using
                                            Eclipse product export
                                            including
                                            the
                                            common code without any
        intermediate
                                            build steps
                                            -Able to build project A/B using
                                            Maven on the command line,
                                            ideally it
                                            auto builds and includes common
                                            code, but I am willing to run
                                            another
                                            build step if needed

                                            What I really want to avoid is
                                            having to build common code
        into a
                                            jar,
                                            regenerate the target, and
        re-import
                                            it into Eclipse.. too much
                                            work.

                                            Help is greatly appreciated.

                                            Thanks,
                                            David

          ___________________________________________________
                                            tycho-user mailing list
        tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>
        <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>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>
        <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>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>
        <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>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>
        <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>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>
        <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>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>
        <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>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>
        <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>
        <mailto:tycho-user@xxxxxxxxxxx <mailto:tycho-user@xxxxxxxxxxx>__>
        https://dev.eclipse.org/____mailman/listinfo/tycho-user
        <https://dev.eclipse.org/__mailman/listinfo/tycho-user>

        <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>
        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>
    https://dev.eclipse.org/__mailman/listinfo/tycho-user
    <https://dev.eclipse.org/mailman/listinfo/tycho-user>




_______________________________________________
tycho-user mailing list
tycho-user@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/tycho-user


Back to the top