Hello !

I just discovered the "import" scope in dependencyManagement. I'm
trying to use it on a large multi project team. We need to centralize
all versions of dependencies. I externalized all versions of all
dependencies in a pom, which in included in the dependencyManagement
section of all our project like this :

        <dependencyManagement>
                <dependencies>
                        <dependency>
                                <groupId>libAfc.dependencies</groupId>
                                <artifactId>dependencies</artifactId>
                                <version>0.0.1</version>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>
                </dependencies>
        </dependencyManagement>

As we have a lot of activity and a lot of projects, this pom will
change very often (at least once a day). Every time this pom is
changed, it has to be released and its version has to be updated. If
the version of our dependency pom is updated, all projects depending
on it must also be updated. As we have between 40 and 50 projects,
that is a bit too much work. I would have liked to be able to use
version ranges to always depend on the latest dependencies, but that
doesnt seem to work. If I declare it like this :

        <dependencyManagement>
                <dependencies>
                        <dependency>
                                <groupId>libAfc.dependencies</groupId>
                                <artifactId>dependencies</artifactId>
                                <version>[0.0.1,)</version>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>
                </dependencies>
        </dependencyManagement>

I get the following error :

org.apache.maven.reactor.MavenExecutionException: POM
'libAfc.dependencies:dependencies' not found in repository: Unable to
download the artifact from any repository
  libAfc.dependencies:dependencies:pom:[0.0.1,)

Is that the expected result ? Why cant I use ranges on scope=import ?
Is there a workaround ?

Thanks for your help !

   MrG

-- 
Jabber : [EMAIL PROTECTED]
Skype : Guillaume.Lederrey
Projects :
* http://rwanda.ledcom.ch/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to