summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-02-07 18:14:41 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-02-07 18:14:41 +0000
commit4059c569aeec41f10e459ed65dd683cd5e50599c (patch)
tree146c6c852c8c5e533ca9d817ffac2e67c4a7e141 /java/sca
parent5208e4719b6e4b56505aaf156e2395310f1ec62b (diff)
Update the name for generated manifest to be tuscany-sca-manifest.jar and tuscany-sca-equinox-manifest.jar
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@741924 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca')
-rw-r--r--java/sca/samples/calculator-equinox/build.xml6
-rw-r--r--java/sca/samples/calculator-osgi/build.xml6
-rw-r--r--java/sca/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java46
3 files changed, 37 insertions, 21 deletions
diff --git a/java/sca/samples/calculator-equinox/build.xml b/java/sca/samples/calculator-equinox/build.xml
index 0343dbcd86..75c4839cfa 100644
--- a/java/sca/samples/calculator-equinox/build.xml
+++ b/java/sca/samples/calculator-equinox/build.xml
@@ -32,7 +32,7 @@
target="1.5">
<classpath>
<fileset dir="../../features">
- <include name="manifest.jar" />
+ <include name="tuscany-sca-manifest.jar" />
</fileset>
</classpath>
</javac>
@@ -44,7 +44,7 @@
</target>
<target name="run" depends="compile">
- <java jar="../../features/manifest.jar" fork="true">
+ <java jar="../../features/tuscany-sca-manifest.jar" fork="true">
<jvmarg value="-Djava.util.logging.config.file=../logging.properties"/>
<!-- optional to set the deployable composite -->
<arg value="-composite"/>
@@ -57,7 +57,7 @@
</target>
<target name="run-equinox" depends="compile">
- <java jar="../../features/equinox-manifest.jar" fork="true">
+ <java jar="../../features/tuscany-sca-equinox-manifest.jar" fork="true">
<jvmarg value="-Djava.util.logging.config.file=../logging.properties"/>
<arg value="-composite"/>
<arg value="Calculator.composite"/>
diff --git a/java/sca/samples/calculator-osgi/build.xml b/java/sca/samples/calculator-osgi/build.xml
index 33b8570e4d..46522211f9 100644
--- a/java/sca/samples/calculator-osgi/build.xml
+++ b/java/sca/samples/calculator-osgi/build.xml
@@ -32,7 +32,7 @@
target="1.5">
<classpath>
<fileset dir="../../features">
- <include name="manifest.jar" />
+ <include name="tuscany-sca-manifest.jar" />
</fileset>
</classpath>
</javac>
@@ -44,7 +44,7 @@
</target>
<target name="run" depends="compile">
- <java jar="../../features/manifest.jar" fork="true">
+ <java jar="../../features/tuscany-sca-manifest.jar" fork="true">
<jvmarg value="-Djava.util.logging.config.file=../logging.properties"/>
<!-- optional to set the deployable composite -->
<arg value="-composite"/>
@@ -57,7 +57,7 @@
</target>
<target name="run-equinox" depends="compile">
- <java jar="../../features/equinox-manifest.jar" fork="true">
+ <java jar="../../features/tuscany-sca-equinox-manifest.jar" fork="true">
<jvmarg value="-Djava.util.logging.config.file=../logging.properties"/>
<arg value="-composite"/>
<arg value="Calculator.composite"/>
diff --git a/java/sca/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java b/java/sca/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java
index a5f70cf2da..40b4f4d08f 100644
--- a/java/sca/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java
+++ b/java/sca/tools/maven/maven-bundle-plugin/src/main/java/org/apache/tuscany/sca/tools/bundle/plugin/ModuleBundlesBuildMojo.java
@@ -123,11 +123,16 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
/**
* Target directory.
*
- * @parameter expression="${project.build.directory}/plugins"
+ * @parameter expression="${project.build.directory}/modules"
*/
private File targetDirectory;
/**
+ * @parameter default-value="features"
+ */
+ private String featuresName = "features";
+
+ /**
* Directories containing artifacts to exclude.
*
* @parameter
@@ -202,6 +207,17 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
* @parameter default-value="true"
*/
private boolean generateManifestJar = true;
+
+ /**
+ * @parameter default-value="tuscany-sca-manifest.jar"
+ */
+ private String manifestJarName = "tuscany-sca-manifest.jar";
+
+ /**
+ * @parameter default-value="tuscany-sca-equinox-manifest.jar"
+ */
+ private String equinoxManifestJarName = "tuscany-sca-equinox-manifest.jar";
+
/**
* @parameter default-value="true"
@@ -524,10 +540,10 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
private void generateANTPath(ProjectSet jarNames, File root, Log log) throws FileNotFoundException, IOException {
for (Map.Entry<String, Set<String>> e : jarNames.nameMap.entrySet()) {
Set<String> jars = e.getValue();
- File feature = new File(root, "../features/" + (useDistributionName ? trim(e.getKey()) : ""));
+ File feature = new File(root, "../" + featuresName + "/" + (useDistributionName ? trim(e.getKey()) : ""));
feature.mkdirs();
File antPath = new File(feature, "build-path.xml");
- log.info("Generating ANT build path: " + antPath);
+ log.info("Generating ANT build path: " + antPath.getCanonicalPath());
FileOutputStream fos = new FileOutputStream(antPath);
PrintStream ps = new PrintStream(fos);
// ps.println(XML_PI);
@@ -535,7 +551,7 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
String name = trim(e.getKey());
ps.println("<project name=\"tuscany."+name+"\">");
ps.println(" <property name=\"tuscany.distro\" value=\"" + name + "\"/>");
- ps.println(" <property name=\"tuscany.manifest\" value=\"" + new File(feature, "manifest.jar").getCanonicalPath()
+ ps.println(" <property name=\"tuscany.manifest\" value=\"" + new File(feature, manifestJarName).getCanonicalPath()
+ "\"/>");
ps.println(" <path id=\"" + "tuscany.path" + "\">");
ps.println(" <fileset dir=\"" + root.getCanonicalPath() + "\">");
@@ -552,10 +568,10 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
for (Map.Entry<String, Set<String>> e : jarNames.nameMap.entrySet()) {
MavenProject pom = jarNames.getProject(e.getKey());
Set<String> jars = e.getValue();
- File feature = new File(root, "../features/" + (useDistributionName ? trim(e.getKey()) : ""));
+ File feature = new File(root, "../" + featuresName + "/" + (useDistributionName ? trim(e.getKey()) : ""));
feature.mkdirs();
- File mfJar = new File(feature, "manifest.jar");
- log.info("Generating manifest jar: " + mfJar);
+ File mfJar = new File(feature, manifestJarName);
+ log.info("Generating manifest jar: " + mfJar.getCanonicalPath());
FileOutputStream fos = new FileOutputStream(mfJar);
Manifest mf = new Manifest();
StringBuffer cp = new StringBuffer();
@@ -586,10 +602,10 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
return;
}
Set artifacts = resolveTransitively(artifact).getArtifacts();
- File feature = new File(root, "../features/");
+ File feature = new File(root, "../" + featuresName + "/");
feature.mkdirs();
- File mfJar = new File(feature, "equinox-manifest.jar");
- log.info("Generating manifest jar: " + mfJar);
+ File mfJar = new File(feature, equinoxManifestJarName);
+ log.info("Generating equinox manifest jar: " + mfJar.getCanonicalPath());
FileOutputStream fos = new FileOutputStream(mfJar);
Manifest mf = new Manifest();
StringBuffer cp = new StringBuffer();
@@ -620,14 +636,14 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
jos.close();
}
- private void generateEquinoxConfig(ProjectSet bundleLocations, File root, Log log) throws FileNotFoundException {
+ private void generateEquinoxConfig(ProjectSet bundleLocations, File root, Log log) throws IOException {
for (Map.Entry<String, Set<String>> e : bundleLocations.nameMap.entrySet()) {
Set<String> locations = e.getValue();
- File feature = new File(root, "../features/" + (useDistributionName ? trim(e.getKey()) : ""));
+ File feature = new File(root, "../" + featuresName + "/" + (useDistributionName ? trim(e.getKey()) : ""));
File config = new File(feature, "configuration");
config.mkdirs();
File ini = new File(config, "config.ini");
- log.info("Generating configuation: " + ini);
+ log.info("Generating configuation: " + ini.getCanonicalPath());
FileOutputStream fos = new FileOutputStream(ini);
PrintStream ps = new PrintStream(fos);
ps.print("osgi.bundles=");
@@ -651,10 +667,10 @@ public class ModuleBundlesBuildMojo extends AbstractMojo {
for (Map.Entry<String, Set<String>> e : bundleSymbolicNames.nameMap.entrySet()) {
Set<String> bundles = e.getValue();
String name = trim(e.getKey());
- File feature = new File(root, "../features/" + (useDistributionName ? name : ""));
+ File feature = new File(root, "../" + featuresName + "/" + (useDistributionName ? name : ""));
feature.mkdirs();
File target = new File(feature, "tuscany.target");
- log.info("Generating target definition: " + target);
+ log.info("Generating target definition: " + target.getCanonicalPath());
FileOutputStream targetFile = new FileOutputStream(target);
if (!bundles.contains("org.eclipse.osgi")) {
bundles.add("org.eclipse.osgi");