I have a need that (I don't think) Maven supports. But I would like to hear
from the Maven developers on the feature.

My application targets different appservers. I have all my dependencies
specified under <dependencyManagement>, but I use different profiles
(appserver specific) to change which dependencies are provided by the
container. I really don't like the requirement that I must respecify the
version whose scope I am changing -- especially since the artifact is
already being globally managed.

I wish I could just either (1) omit the version and have it be inherited
from my global dependency management or (2) use a wildcard saying I don't
care what version you find.

<profile>
  <id>jboss</id>
  <dependencyManagement>
    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</groupId>
      <scope>provided</scope>
    </dependency>
  </dependencyManagement>
</profile>

I pref #1 but #2 should just be as safe since it's impossible (?) to have
duplicate group:artifact:type dependencies. The biggest hack of all, I
suppose, is to use some sort of range from [1.0,) but that's actually quite
an abuse just to get what I want.

Thoughts?

-- 
Cheers,
Paul

Reply via email to