diff --git a/gradle_plugins/src/main/groovy/org/ros/gradle_plugins/CatkinPlugin.groovy b/gradle_plugins/src/main/groovy/org/ros/gradle_plugins/CatkinPlugin.groovy
index dca1678f35d1af0954969293768bb5714dab6678..c4fe340459e7c7b72ae781638accb05a12774aea 100644
--- a/gradle_plugins/src/main/groovy/org/ros/gradle_plugins/CatkinPlugin.groovy
+++ b/gradle_plugins/src/main/groovy/org/ros/gradle_plugins/CatkinPlugin.groovy
@@ -86,12 +86,18 @@ class CatkinPackages {
     
     def generate() {
         if ( this.pkgs.size() == 0 ) {
-            println("Catkin plugin is generating the catkin package tree...")
             this.workspaces.each { workspace ->
                 def manifestTree = project.fileTree(dir: workspace, include: '**/package.xml')
                 manifestTree.each { file -> 
                     def pkg = new CatkinPackage(file)
-                    this.pkgs.put(pkg.name, pkg)
+                    if(this.pkgs.containsKey(pkg.name)) {
+                        if(this.pkgs[pkg.name].version < pkg.version) {
+                            println("Catkin generate tree: replacing older version of " + pkg.name + "[" + this.pkgs[pkg.name].version + "->" + pkg.version + "]") 
+                            this.pkgs[pkg.name] = pkg
+                        }
+                    } else {
+                        this.pkgs.put(pkg.name, pkg)
+                    }
                 }
             }
         }