X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=features-parent%2Fpom.xml;h=91af1708f9a06418001c61f6ba108ef79f31478f;hb=35925e1d9f7dbcd5f4d4667ffe6fdd98aef79954;hp=37524e25da5a1a0db856fa1132e977e0cd073212;hpb=1abbf5d0cfacb2f052143e2b4352849234c03501;p=odlparent.git diff --git a/features-parent/pom.xml b/features-parent/pom.xml index 37524e25d..91af1708f 100644 --- a/features-parent/pom.xml +++ b/features-parent/pom.xml @@ -23,12 +23,13 @@ org.opendaylight.odlparent odlparent - 1.6.0-SNAPSHOT + 1.8.0-SNAPSHOT ../odlparent features-parent pom + ODL :: odlparent :: ${project.artifactId} features.xml @@ -48,6 +49,7 @@ maven-dependency-plugin + 2.10 generate-resources @@ -135,20 +137,38 @@ args[2] = dependencyVersion return "mvn:" + args.join("/") } - throw new IllegalArgumentException("Feature dependency $groupId:$artifactId is not dependecy of project.") + throw new IllegalArgumentException("Feature dependency $groupId:$artifactId is not a dependency in the project pom.xml.") } def updateMavenDependency = { dep -> def mvnUrl = dep.text() - if (mvnUrl.startsWith("mvn:")) { - def components = mvnUrl.substring(4).split("/") - if (components[2] == versionPlaceholder) { - dep.value = updatedURLFromProject(components) + def prefix = "" + if (mvnUrl.startsWith("wrap:")) { + prefix = "wrap:" + mvnUrl = mvnUrl.substring(5) + } + if (mvnUrl.startsWith("mvn:") && 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; + } } - } else if (mvnUrl.startsWith("wrap:mvn:")) { - def components = mvnUrl.substring(9).split("/") - if (components[2] == versionPlaceholder) { - dep.value = "wrap:" + updatedURLFromProject(components) + def components = mvnUrl.substring(4).split("/") + if (components[2].startsWith(versionPlaceholder)) { + def suffix = ""; + if (components[2].length() > versionPlaceholder.length()) { + suffix = components[2].substring(versionPlaceholder.length()) + components[2] = versionPlaceholder + } + dep.value = prefix + updatedURLFromProject(components) + suffix } } } @@ -206,6 +226,7 @@ org.codehaus.mojo build-helper-maven-plugin + 1.12 generate-resources @@ -238,8 +259,8 @@ - org.apache.maven.plugins maven-resources-plugin + 3.0.1 filter @@ -251,10 +272,16 @@ - org.apache.maven.plugins maven-surefire-plugin + ${maven.surefire.version} ${skip.karaf.featureTest} + + + org.opendaylight.odlparent + opendaylight-karaf-empty + 1.8.0-SNAPSHOT + org.opendaylight.odlparent:features-test @@ -302,6 +329,12 @@ + + + org.apache.servicemix.tooling + depends-maven-plugin + maven-dependency-plugin @@ -318,11 +351,9 @@ build-helper-maven-plugin - org.apache.maven.plugins maven-resources-plugin - org.apache.maven.plugins maven-surefire-plugin @@ -333,8 +364,32 @@ org.opendaylight.odlparent features-test - 1.6.0-SNAPSHOT + 1.8.0-SNAPSHOT + test + + + + org.opendaylight.odlparent + opendaylight-karaf-empty + 1.8.0-SNAPSHOT + zip test + + + ${odl.site.url}/${project.groupId}/${stream}/${project.artifactId}/ + + + + opendaylight-site + ${nexus.site.url}/${project.artifactId}/ + +