From 06ae9eb2432a82145225bff1b2b50f3240da5efd Mon Sep 17 00:00:00 2001 From: rfeng Date: Tue, 31 Mar 2009 21:41:15 +0000 Subject: Add the generation of PDE 3.5 target definition git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@760669 13f79535-47bb-0310-9956-ffa450edef68 --- .../bundle/plugin/ModuleBundlesBuildMojo.java | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) (limited to 'maven-plugins/trunk/maven-bundle-plugin/src/main') diff --git a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java index c7b043a74d..30a77d24fa 100644 --- a/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java +++ b/maven-plugins/trunk/maven-bundle-plugin/src/main/java/org/apache/tuscany/maven/bundle/plugin/ModuleBundlesBuildMojo.java @@ -716,6 +716,14 @@ public class ModuleBundlesBuildMojo extends AbstractMojo { } writeTarget(new PrintStream(targetFile), name, bundles, eclipseFeatures); targetFile.close(); + + // Generate the PDE target definition file for PDE 3.5 + File target35 = new File(feature, "tuscany-pde35.target"); + log.info("Generating target definition: " + target35.getCanonicalPath()); + FileOutputStream target35File = new FileOutputStream(target35); + writePDE35Target(new PrintStream(target35File), name, bundles, eclipseFeatures); + target35File.close(); + } } @@ -840,6 +848,50 @@ public class ModuleBundlesBuildMojo extends AbstractMojo { } + private void writePDE35Target(PrintStream ps, String pom, Set ids, String[] features) { + ps.println(XML_PI); + ps.println(""); + ps.println(ASL_HEADER); + + ps.println(""); + + if (executionEnvironment != null) { + ps + .println(" "); + } + + ps.println(""); + if (ids.size() > 0) { + ps.println(" "); + ps.println(" "); + for (String id : ids) { + ps.println(" "); + } + ps.println(" "); + ps.println(" "); + } + + /* + if (useDefaultLocation) { + ps.println(" "); + } + */ + + /* + if (features != null) { + for (String f : features) { + ps.println(" "); + } + } + */ + + ps.println(""); + ps.println(""); + + } + private static void writePluginXML(PrintStream ps) { ps.println(XML_PI); ps.println(""); -- cgit v1.2.3