Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Dependencies
    • Labels:
      None
    • Environment:
      None appropriate
    • Complexity:
      Intermediate
    • Number of attachments :
      0

      Description

      I'm a long time Gentoo Linux (http://www.gentoo.org/) user, and i think that Maven could adpot some idea's from gentoo's portage (http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=1).

      Gentoo has a concept of "ebuilds" (which can be compared to poms). An ebuild is an install script of sorts for installing a particular piece of software. An ebuild defines, among other things, what it's dependencies (other ebuilds) are. There are two types of dependencies: optional and required. A required depency is something that the software needs to be built or run, while an optional depency is the exact opposite... it is optional at compile and run time. Basically an optional depency is a feature that the piece of sotware supports that isn't necessary for it to function.

      There is also something in gentoo called "USE flags". Use flags are a system scope set of parameters that determine how ebuilds are built... and which features are included or excluded. For instance, "alsa" is a USE flag. If your use flags have "alsa" in them then any application that supports Alsa (Advanced Linux Sound Architecture) as an optional dependency will be compiled with support for alsa. Likewise, if your USE flags contain "-alsa" then anything that has optional support for alsa will not be compiled with support for alsa. I should also mention that if a particular ebuild requires alsa... alsa will be built as well as it (because it requires alsa at compile/run time)... but it and anything else that requires it will be the only piece of software on the machine that has alsa support. I should also note that Gentoo has what is called "profiles". Profiles contain (among other things) a default set of USE flags for the general user, so in theory a Gentoo user doesn't have to modify their USE flags whatsoever.

      My thinking is that Maven could adopt this. Poms could specify required and optional dependencies, and at a project level USE flags could be defined to filter what gets included in a project. For instance someone using the Spring Framework may not be using Hibernate... in their use flags "-hibernate" could be defined so that maven knows not to grab hibernate (and all of it's dependencies) just because they want to use the spring MVC framework.

        Activity

        Hide
        Brian C. Dilley added a comment -

        Excuse my ignorance, but does this mean that it's going to be=20
        implemented in version 2.1?

        Show
        Brian C. Dilley added a comment - Excuse my ignorance, but does this mean that it's going to be=20 implemented in version 2.1?
        Hide
        Brett Porter added a comment -

        its under consideration for 2.1.

        Show
        Brett Porter added a comment - its under consideration for 2.1.
        Hide
        Brian C. Dilley added a comment -

        Great! Let me know if i can be of assistance. I'm perfectly able to contribute code if this is a desired feature.

        Show
        Brian C. Dilley added a comment - Great! Let me know if i can be of assistance. I'm perfectly able to contribute code if this is a desired feature.
        Hide
        Trygve Laugstøl added a comment -

        Not directly related but something that you might want to take a look at Brian: http://docs.codehaus.org/display/MAVEN/Extending+Maven+2.0+Dependencies

        Show
        Trygve Laugstøl added a comment - Not directly related but something that you might want to take a look at Brian: http://docs.codehaus.org/display/MAVEN/Extending+Maven+2.0+Dependencies
        Hide
        Philipp Scholl added a comment -

        I absolutely like this Idea. What's the current Status? Did Brian already implement something?

        Show
        Philipp Scholl added a comment - I absolutely like this Idea. What's the current Status? Did Brian already implement something?
        Hide
        Stefano Lenzi added a comment -

        I think that also the following document is worth noting for the design of a better dependencies resolution and filtering system: http://docs.codehaus.org/display/MAVEN/Extending+Maven+2.0+Dependencies

        Finally, I think that we should keep into account even the needs of projects which use maven for building native-code, like maven-nar-plugin. Some information on such needs are available here: http://docs.codehaus.org/display/MAVEN/Support+for+other+languages

        Show
        Stefano Lenzi added a comment - I think that also the following document is worth noting for the design of a better dependencies resolution and filtering system: http://docs.codehaus.org/display/MAVEN/Extending+Maven+2.0+Dependencies Finally, I think that we should keep into account even the needs of projects which use maven for building native-code, like maven-nar-plugin. Some information on such needs are available here: http://docs.codehaus.org/display/MAVEN/Support+for+other+languages
        Hide
        Jason van Zyl added a comment -

        Absolutely no way. We're going down the OSGi road.

        Show
        Jason van Zyl added a comment - Absolutely no way. We're going down the OSGi road.

          People

          • Assignee:
            Unassigned
            Reporter:
            Brian C. Dilley
          • Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: