Bump enforced Maven version to 3.3.9+
[odlparent.git] / features-parent / pom.xml
index e646fc9dd7880761ba284eca45db69fd6f7469fd..7ffdb04cd6dd9cc716045ff5d0cb89f2465c4c7b 100644 (file)
     <parent>
         <groupId>org.opendaylight.odlparent</groupId>
         <artifactId>odlparent</artifactId>
-        <version>1.7.0-SNAPSHOT</version>
+        <version>1.8.0-SNAPSHOT</version>
         <relativePath>../odlparent</relativePath>
     </parent>
 
     <artifactId>features-parent</artifactId>
     <packaging>pom</packaging>
+    <name>ODL :: odlparent :: ${project.artifactId}</name>
 
     <properties>
         <features.file>features.xml</features.file>
                                             args[2] = dependencyVersion
                                             return "mvn:" + args.join("/")
                                         }
-                                        throw new IllegalArgumentException("Feature dependency $groupId:$artifactId is not a dependency of the project.")
+                                        throw new IllegalArgumentException("Feature dependency $groupId:$artifactId is not a dependency in the project pom.xml.")
                                     }
 
                                     def updateMavenDependency = { dep ->
                                             prefix = "wrap:"
                                             mvnUrl = mvnUrl.substring(5)
                                         }
-                                        if (mvnUrl.startsWith("mvn:")) {
+                                        if (mvnUrl.startsWith("mvn:") &amp;&amp; mvnUrl.indexOf(versionPlaceholder) >= 0) {
+                                            // Process property place-holders
+                                            def dollarIndex;
+                                            while ((dollarIndex = mvnUrl.indexOf("\${")) >= 0) {
+                                                def closingBrace = mvnUrl.indexOf("}", dollarIndex);
+                                                if (closingBrace > dollarIndex) {
+                                                    def propKey = mvnUrl.substring(dollarIndex + 2, closingBrace);
+                                                    def propVal = project.properties[propKey];
+                                                    mvnUrl = mvnUrl.replace("\${${propKey}}", propVal);
+                                                } else {
+                                                    println "[WARN] Malformed Maven URL: ${mvnUrl}";
+                                                    break;
+                                                }
+                                            }
                                             def components =  mvnUrl.substring(4).split("/")
                                             if (components[2].startsWith(versionPlaceholder)) {
                                                 def suffix = "";
                 <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>build-helper-maven-plugin</artifactId>
-                    <version>1.9.1</version>
+                    <version>1.10</version>
                     <executions>
                         <execution>
                         <phase>generate-resources</phase>
                 </plugin>
                 <plugin>
                     <artifactId>maven-resources-plugin</artifactId>
-                    <version>2.7</version>
+                    <version>3.0.1</version>
                     <executions>
                         <execution>
                             <id>filter</id>
                         </pluginExecution>
                         <pluginExecution>
                           <pluginExecutionFilter>
+                            <groupId>org.apache.maven.plugins</groupId>
                             <artifactId>maven-dependency-plugin</artifactId>
                             <versionRange>[0.0,)</versionRange>
                             <goals>
         <dependency>
             <groupId>org.opendaylight.odlparent</groupId>
             <artifactId>features-test</artifactId>
-            <version>1.7.0-SNAPSHOT</version>
+            <version>1.8.0-SNAPSHOT</version>
             <scope>test</scope>
         </dependency>
     </dependencies>