You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/09/16 19:16:51 UTC
svn commit: r695979 [2/2] - in /tuscany/branches/sca-equinox:
demos/bigbank-stockquote/ demos/workpool-distributed/
distribution/features/all/ distribution/features/all/src/main/components/
distribution/features/core/ distribution/features/core/src/mai...
Modified: tuscany/branches/sca-equinox/samples/helloworld-ws-sdo/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/helloworld-ws-sdo/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/helloworld-ws-sdo/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/helloworld-ws-sdo/pom.xml Tue Sep 16 10:16:37 2008
@@ -75,7 +75,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/helloworld-ws-service-secure/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/helloworld-ws-service-secure/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/helloworld-ws-service-secure/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/helloworld-ws-service-secure/pom.xml Tue Sep 16 10:16:37 2008
@@ -64,7 +64,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/helloworld-ws-service/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/helloworld-ws-service/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/helloworld-ws-service/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/helloworld-ws-service/pom.xml Tue Sep 16 10:16:37 2008
@@ -59,7 +59,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/pom.xml Tue Sep 16 10:16:37 2008
@@ -59,7 +59,9 @@
<module>calculator-ws-webapp</module>
<module>callback-ws-client</module>
<module>callback-ws-service</module>
+ <!--
<module>customer-dojo</module>
+ -->
<module>databinding-echo</module>
<module>domain-management</module>
<module>feed-aggregator</module>
@@ -99,7 +101,9 @@
<module>store-distributed</module>
<module>supplychain</module>
<module>web-resource</module>
+ <!--
<module>zipcode-jaxws</module>
+ -->
</modules>
</profile>
</profiles>
Modified: tuscany/branches/sca-equinox/samples/simple-bigbank-spring/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/simple-bigbank-spring/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/simple-bigbank-spring/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/simple-bigbank-spring/pom.xml Tue Sep 16 10:16:37 2008
@@ -170,7 +170,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/simple-callback-ws/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/simple-callback-ws/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/simple-callback-ws/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/simple-callback-ws/pom.xml Tue Sep 16 10:16:37 2008
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/spring-bigbank-stockquote/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/spring-bigbank-stockquote/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/spring-bigbank-stockquote/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/spring-bigbank-stockquote/pom.xml Tue Sep 16 10:16:37 2008
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/store-distributed/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/store-distributed/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/store-distributed/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/store-distributed/pom.xml Tue Sep 16 10:16:37 2008
@@ -98,7 +98,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/store/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/store/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/store/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/store/pom.xml Tue Sep 16 10:16:37 2008
@@ -85,7 +85,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/samples/web-resource/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/samples/web-resource/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/samples/web-resource/pom.xml (original)
+++ tuscany/branches/sca-equinox/samples/web-resource/pom.xml Tue Sep 16 10:16:37 2008
@@ -58,7 +58,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java (original)
+++ tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleMojo.java Tue Sep 16 10:16:37 2008
@@ -220,7 +220,7 @@
} catch (IOException e) {
throw new MojoExecutionException(e.getMessage(), e);
}
- if (bundleName == null) {
+ if (bundleName == null || true) {
if (artifact.getFile().exists()) {
log.info("Adding third party jar: " + artifact);
jarFiles.add(artifact.getFile());
Modified: tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java (original)
+++ tuscany/branches/sca-equinox/tools/maven/maven-tuscany-bundle-plugin/src/main/java/org/apache/tuscany/tools/sca/tuscany/bundle/plugin/LibraryBundleUtil.java Tue Sep 16 10:16:37 2008
@@ -75,11 +75,19 @@
}
static Pattern pattern = Pattern.compile("-([0-9.]+)");
+ static Pattern pattern2 = Pattern.compile("_([0-9.]+)");
private static String version(String jarFile) {
- Matcher matcher = pattern.matcher(jarFile);
String version = "1.0.0";
+ boolean found = false;
+ Matcher matcher = pattern2.matcher(jarFile);
if (matcher.find()) {
+ found = true;
+ } else {
+ matcher = pattern.matcher(jarFile);
+ found = matcher.find();
+ }
+ if (found) {
version = matcher.group();
if (version.endsWith(".")) {
version = version.substring(1, version.length() - 1);
@@ -91,24 +99,31 @@
}
private static void addPackages(File jarFile, Set<String> packages) throws IOException {
- String version = ";version=" + version(jarFile.getPath());
- ZipInputStream is = new ZipInputStream(new FileInputStream(jarFile));
- ZipEntry entry;
- while ((entry = is.getNextEntry()) != null) {
- String entryName = entry.getName();
- if (!entry.isDirectory() && entryName != null
- && entryName.length() > 0
- && !entryName.startsWith(".")
- && entryName.endsWith(".class") // Exclude resources from Export-Package
- && entryName.lastIndexOf("/") > 0
- && Character.isJavaIdentifierStart(entryName.charAt(0))) {
- String pkg = entryName.substring(0, entryName.lastIndexOf("/")).replace('/', '.');
- if (!("org.apache.commons.lang.enum".equals(pkg))) {
- packages.add(pkg + version);
+ if (getBundleName(jarFile) == null) {
+ String version = ";version=" + version(jarFile.getPath());
+ ZipInputStream is = new ZipInputStream(new FileInputStream(jarFile));
+ ZipEntry entry;
+ while ((entry = is.getNextEntry()) != null) {
+ String entryName = entry.getName();
+ if (!entry.isDirectory() && entryName != null
+ && entryName.length() > 0
+ && !entryName.startsWith(".")
+ && entryName.endsWith(".class") // Exclude resources from Export-Package
+ && entryName.lastIndexOf("/") > 0
+ && Character.isJavaIdentifierStart(entryName.charAt(0))) {
+ String pkg = entryName.substring(0, entryName.lastIndexOf("/")).replace('/', '.');
+ if (!("org.apache.commons.lang.enum".equals(pkg))) {
+ packages.add(pkg + version);
+ }
}
}
+ is.close();
+ } else {
+ Set<String> exportedPackages = getExportedPackages(jarFile);
+ if (exportedPackages != null) {
+ packages.addAll(exportedPackages);
+ }
}
- is.close();
}
static Manifest libraryManifest(Set<File> jarFiles, String name, String version, boolean copyJars)
@@ -191,9 +206,9 @@
write(attributes, BUNDLE_NAME, dos);
write(attributes, BUNDLE_VERSION, dos);
write(attributes, DYNAMICIMPORT_PACKAGE, dos);
- write(attributes, EXPORT_PACKAGE, dos);
- write(attributes, IMPORT_PACKAGE, dos);
write(attributes, BUNDLE_CLASSPATH, dos);
+ write(attributes, IMPORT_PACKAGE, dos);
+ write(attributes, EXPORT_PACKAGE, dos);
dos.flush();
}
@@ -249,6 +264,59 @@
return bundleName;
}
+ /**
+ * Returns the packages exported by a bundle.
+ *
+ * @param file
+ * @return
+ * @throws IOException
+ */
+ static Set<String> getExportedPackages(File file) throws IOException {
+ if (!file.exists()) {
+ return null;
+ }
+ String exports = null;
+ if (file.isDirectory()) {
+ File mf = new File(file, "META-INF/MANIFEST.MF");
+ if (mf.isFile()) {
+ Manifest manifest = new Manifest(new FileInputStream(mf));
+ exports = manifest.getMainAttributes().getValue(EXPORT_PACKAGE);
+ }
+ } else {
+ JarFile jar = new JarFile(file, false);
+ Manifest manifest = jar.getManifest();
+ exports = manifest.getMainAttributes().getValue(EXPORT_PACKAGE);
+ jar.close();
+ }
+ if (exports == null) {
+ return null;
+ }
+ System.out.println("##### Exports: " + exports);
+ Set<String> exportedPackages = new HashSet<String>();
+ StringBuffer export = new StringBuffer();
+ boolean q = false;
+ for (int i =0, n = exports.length(); i <n; i++) {
+ char c = exports.charAt(i);
+ if (c == '\"') {
+ q = !q;
+ }
+ if (!q) {
+ if (c == ',') {
+ exportedPackages.add(export.toString());
+ System.out.println("##### Package: " + export);
+ export = new StringBuffer();
+ continue;
+ }
+ }
+ export.append(c);
+ }
+ if (export.length() != 0) {
+ exportedPackages.add(export.toString());
+ System.out.println("##### Package: " + export);
+ }
+ return exportedPackages;
+ }
+
public static String string(Bundle b, boolean verbose) {
StringBuffer sb = new StringBuffer();
sb.append(b.getBundleId()).append(" ").append(b.getSymbolicName());
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/defaultbinding/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/defaultbinding/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/defaultbinding/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/defaultbinding/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/multisoapbindings/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/multisoapbindings/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/multisoapbindings/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/multisoapbindings/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/promoted/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/promoted/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/promoted/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/promoted/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/soapversion/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/soapversion/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/soapversion/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/nowsdl/soapversion/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/service/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/service/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/service/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/service/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/binding/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/binding/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/binding/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/binding/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/port/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/port/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/port/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/port/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>
Modified: tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/service/pom.xml
URL: http://svn.apache.org/viewvc/tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/service/pom.xml?rev=695979&r1=695978&r2=695979&view=diff
==============================================================================
--- tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/service/pom.xml (original)
+++ tuscany/branches/sca-equinox/vtest/wsbinding/wsdlelement/service/pom.xml Tue Sep 16 10:16:37 2008
@@ -43,7 +43,7 @@
<dependency>
<groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-host-tomcat</artifactId>
+ <artifactId>tuscany-host-jetty</artifactId>
<version>1.4-SNAPSHOT</version>
<scope>runtime</scope>
</dependency>