Ok well I've published a snapshot of our maven-bundle-plugin that
allows us to generate some more meta-data for the binary distro. The
snapshot is not synched yet to the Nexus repo so I haven't committed
the distro poms that allow you to build for yourself. I've posted the
resulting zip to my p.o.a. space [1]. I notice that this is rather
large, mostly due to cruft in the samples I believe, so you probably
won't want to actually download it so here are the interesting (?)
changes...

bin/
   haven't changed
modules/
   haven't changed
lib/
   haven't changed
features/
   tuscany-base-runtime
   tuscany-binding-atom-runtime
   tuscany-binding-corba-runtime
   tuscany-binding-ejb-runtime
   tuscany-binding-jms-runtime
   tuscany-binding-jsonp-runtime
   tuscany-binding-jsonrpc-runtime
   tuscany-binding-rest-runtime
   tuscany-binding-rmi-runtime
   tuscany-binding-rss-runtime
   tuscany-binding-ws-runtime-axis2
   tuscany-implementation-bpel-runtime
   tuscany-implementation-osgi-runtime
   tuscany-implementation-script-runtime
   tuscany-implementation-spring-runtime
   tuscany-implementation-web-runtime
   tuscany-implementation-widget-runtime
samples
   mostly unchanged except...
   running-tuscany
      embedded-jse
          build.xml - updated to use different ways to ref base + ext
             all manifest
             ant filesets
             separate manifests
             would like to add aggregate jars here also

The top level feature dir still has the "all" info in it though I'd
like to move
it to a sub directory. All sub-directories have meta-data referring to modules
for example,

features/
  tuscany-binding-rmi-runtime/
      build-path.xml
      tuscany-binding-rmi-runtime-manifest.jar
      which-jars

The sample build.xml file that uses this meta-data includes
appropriate ant filesets

    <include 
file="${tuscany.home}/features/tuscany-base-runtime/build-path.xml"/>
    <include 
file="${tuscany.home}/features/tuscany-binding-ws-runtime-axis2/build-path.xml"/>
    <include 
file="${tuscany.home}/features/tuscany-binding-rmi-runtime/build-path.xml"/>

and then uses various different mechanisms

    <target name="binding-sca-calculator" depends="compile">
             <java classname="launcher.JSELauncherBindingSCACalculator"
              fork="true"
              failonerror="true">
            <classpath>
                <pathelement location="target/${jar.name}"/>
                <fileset dir="${tuscany.home}/features">
                   <include name="tuscany-sca-manifest.jar" />
                </fileset>
            </classpath>
        </java>
    </target>
        
    <target name="binding-ws-calculator" depends="compile">
        <java classname="launcher.JSELauncherBindingWSCalculator"
              fork="true"
              failonerror="true">
            <classpath>
                <pathelement location="target/${jar.name}"/>
                <path refid="tuscany-base-runtime.path"/>
                <path refid="tuscany-binding-ws-runtime-axis2.path"/>
            </classpath>
        </java>
    </target>   
        
    <target name="binding-rmi-calculator" depends="compile">
        <java classname="launcher.JSELauncherBindingRMICalculator"
              fork="true"
              failonerror="true">
            <classpath>
                <pathelement location="target/${jar.name}"/>
                <fileset dir="${tuscany.home}/features/tuscany-base-runtime">
                   <include name="tuscany-base-runtime-manifest.jar" />
                </fileset>
                <fileset
dir="${tuscany.home}/features/tuscany-binding-rmi-runtime">
                   <include name="tuscany-binding-rmi-runtime-manifest.jar" />
                </fileset>
            </classpath>
        </java>
    </target>   
        
    <!-- TODO - I'd like this to be running with aggregate JARs -->
    <target name="implementation-java-calculator" depends="compile">
        <java classname="launcher.JSELauncherImplementationJavaCalculator"
              fork="true"
              failonerror="true">
            <classpath>
                <pathelement location="target/${jar.name}"/>
                <fileset dir="${tuscany.home}/features">
                   <include name="tuscany-sca-manifest.jar" />
                </fileset>
            </classpath>
        </java>
    </target>

The base meta-data is defined in the base feature and just refers to
the modules required to
run the ASM otests less the ws binding. All the extensions are
referenced directly in the
modules dir. There is a new mojo in the bundles plugin that does the
generation with the
following configuration.

                    <execution>
                        <id>extensions-build</id>
                        <phase>process-resources</phase>
                        <goals>
                             <goal>generate-meta-data</goal>
                        </goals>
                        <configuration>
                             <generateModules>false</generateModules>
                             <useDistributionName>false</useDistributionName>
                             <generateManifestJar>true</generateManifestJar>
                             <generateConfig>false</generateConfig>
                             <generateAntScript>true</generateAntScript>

<generateTargetPlatform>false</generateTargetPlatform>

<generateAggregatedBundle>false</generateAggregatedBundle>
                             <featuresName>features</featuresName>
                             <features>
                                 <feature>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-base-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </feature>
                             </features>
                             <extensions>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-atom-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-commet-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-corba-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-ejb-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-hazelcase-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-jms-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-jsonp-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-jsonrpc-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-rest-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-rmi-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-rss-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-binding-ws-runtime-axis2</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>

                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-bpel-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-jaxes-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-osgi-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-python-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-script-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-spring-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-web-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>
                                 <extension>
                                     <groupId>org.apache.tuscany.sca</groupId>

<artifactId>tuscany-implementation-widget-runtime</artifactId>
                                     <version>2.0-SNAPSHOT</version>
                                 </extension>

                             </extensions>

It's horribly complicated as it's a hacked version of the existing
mojo but can be tidied if we decide to use it.

I'm hoping that the bin directory will be fixed to enable whatever
shell stuff we end up with.

I'm also hoping that Ant will produce a sample set of aggregate jars
so we can look at those too.

[1] http://people.apache.org/~slaws/tuscany/2.0-Beta1-RC0/

Simon

-- 
Apache Tuscany committer: tuscany.apache.org
Co-author of a book about Tuscany and SCA: tuscanyinaction.com

Reply via email to