You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2011/12/19 11:54:42 UTC
svn commit: r1220684 -
/sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AttachPartialBundleListMojo.java
Author: cziegeler
Date: Mon Dec 19 10:54:42 2011
New Revision: 1220684
URL: http://svn.apache.org/viewvc?rev=1220684&view=rev
Log:
SLING-2331 : Values in partial bundle list should be interpolated Maven style
Modified:
sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AttachPartialBundleListMojo.java
Modified: sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AttachPartialBundleListMojo.java
URL: http://svn.apache.org/viewvc/sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AttachPartialBundleListMojo.java?rev=1220684&r1=1220683&r2=1220684&view=diff
==============================================================================
--- sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AttachPartialBundleListMojo.java (original)
+++ sling/trunk/maven/maven-launchpad-plugin/src/main/java/org/apache/sling/maven/projectsupport/AttachPartialBundleListMojo.java Mon Dec 19 10:54:42 2011
@@ -16,6 +16,9 @@
*/
package org.apache.sling.maven.projectsupport;
+import static org.apache.sling.maven.projectsupport.BundleListUtils.interpolateProperties;
+import static org.apache.sling.maven.projectsupport.BundleListUtils.readBundleList;
+
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@@ -28,7 +31,6 @@ import org.codehaus.plexus.archiver.Arch
import org.codehaus.plexus.archiver.zip.ZipArchiver;
import org.codehaus.plexus.util.FileUtils;
import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
-import static org.apache.sling.maven.projectsupport.BundleListUtils.readBundleList;
/**
* Attaches the bundle list as a project artifact.
@@ -60,7 +62,7 @@ public class AttachPartialBundleListMojo
* @parameter default-value="${project.build.directory}/bundleListconfig"
*/
private File configOutputDir;
-
+
/**
* @parameter default-value="${project.build.directory}/list.xml"
*/
@@ -86,16 +88,18 @@ public class AttachPartialBundleListMojo
} else {
initializedBundleList = new BundleList();
}
-
+
addDependencies(initializedBundleList);
-
- BundleListXpp3Writer writer = new BundleListXpp3Writer();
+
+ interpolateProperties(initializedBundleList, this.project, this.mavenSession);
+
+ final BundleListXpp3Writer writer = new BundleListXpp3Writer();
try {
writer.write(new FileWriter(bundleListOutput), initializedBundleList);
} catch (IOException e) {
throw new MojoExecutionException("Unable to write bundle list", e);
}
-
+
project.getArtifact().setFile(bundleListOutput);
this.getLog().info("Attaching bundle list configuration");