Commit 2a8f1950 authored by Philippe Merle's avatar Philippe Merle
Browse files

* SCA componentization of FraSCAti FScript (still WIP)

  - added dependency to frascati-implementation-fractal
  - compiled the FraSCAti composite containing FraSCAti FScript
  - added FraSCAti.composite and FScript.composite
  - added an empty frontend class FraSCAtiFScript.java
  - made client interfaces optional in .fractal
  - updated test cases to bootstrap with FraSCAtiFractal
* Cosmetic updates of pom.xml
parent 26899d14
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
* OW2 FraSCAti explorer * OW2 FraSCAti FScript
* Copyright (c) 2009 INRIA * Copyright (c) 2009-2010 INRIA, University of Lille 1
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<artifactId>frascati-fscript</artifactId> <artifactId>frascati-fscript</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>FraSCAti personality for FScript</name> <name>OW2 FraSCAti FScript</name>
<version>1.3-SNAPSHOT</version> <version>1.3-SNAPSHOT</version>
<inceptionYear>2009</inceptionYear> <inceptionYear>2009</inceptionYear>
...@@ -43,7 +43,14 @@ ...@@ -43,7 +43,14 @@
<dependency> <dependency>
<groupId>org.ow2.frascati</groupId> <groupId>org.ow2.frascati</groupId>
<artifactId>frascati-runtime-factory</artifactId> <artifactId>frascati-runtime-factory</artifactId>
<version>${project.version}</version> <version>${frascati.version}</version>
</dependency>
<!-- OW2 FraSCAti <frascati:implementation.fractal> -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-implementation-fractal</artifactId>
<version>${frascati.version}</version>
</dependency> </dependency>
<dependency> <dependency>
...@@ -71,10 +78,12 @@ ...@@ -71,10 +78,12 @@
<dependency> <dependency>
<groupId>org.objectweb.fractal.fscript</groupId> <groupId>org.objectweb.fractal.fscript</groupId>
<artifactId>fscript</artifactId> <artifactId>fscript</artifactId>
<version>${fscript.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.objectweb.fractal.fscript</groupId> <groupId>org.objectweb.fractal.fscript</groupId>
<artifactId>fscript-console</artifactId> <artifactId>fscript-console</artifactId>
<version>${fscript.version}</version>
</dependency> </dependency>
<!-- Test --> <!-- Test -->
...@@ -86,14 +95,14 @@ ...@@ -86,14 +95,14 @@
<dependency> <dependency>
<groupId>org.ow2.frascati</groupId> <groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-rmi</artifactId> <artifactId>frascati-binding-rmi</artifactId>
<version>${project.version}</version> <version>${frascati.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.ow2.frascati.intent</groupId> <groupId>org.ow2.frascati.intent</groupId>
<artifactId>frascati-debug</artifactId> <artifactId>frascati-debug</artifactId>
<version>${project.version}</version> <version>${frascati.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
...@@ -120,6 +129,27 @@ ...@@ -120,6 +129,27 @@
<useSystemClassLoader>false</useSystemClassLoader> <useSystemClassLoader>false</useSystemClassLoader>
</configuration> </configuration>
</plugin> </plugin>
<!--
Compile SCA composites with OW2 FraSCAti Assembly Factory.
-->
<plugin>
<groupId>org.ow2.frascati.mojo</groupId>
<artifactId>frascati-compiler-plugin</artifactId>
<version>${frascati.version}</version>
<executions>
<execution>
<id>compile-composite</id>
<phase>generate-sources</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<composite>org/ow2/frascati/FraSCAti</composite>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
......
/***
* OW2 FraSCAti FScript
* Copyright (C) 2010 INRIA, USTL
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Contact: frascati@ow2.org
*
* Author: Philippe Merle
*
* Contributor(s):
*/
package org.ow2.frascati.fscript;
import org.osoa.sca.annotations.Reference;
import org.ow2.frascati.assembly.factory.api.ClassLoaderManager;
import org.ow2.frascati.assembly.factory.api.CompositeManager;
import org.ow2.frascati.util.AbstractActiveComponent;
/**
* Implementation of the OW2 FraSCAti FScript component.
*
* @author Philippe Merle.
*/
public class FraSCAtiFScript
extends AbstractActiveComponent
{
/**
* Reference to the OW2 FraSCAti composite manager.
*/
@Reference(name = "composite-manager")
protected CompositeManager compositeManager;
/**
* Reference to the OW2 classloader manager.
*/
@Reference(name = "classloader-manager")
protected ClassLoaderManager classLoaderManger;
/**
* Body of the component.
*/
public void run()
{
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti FScript -->
<!-- Copyright (C) 2010 INRIA, USTL -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Philippe Merle -->
<!-- -->
<!-- Contributor(s): -->
<!-- -->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:fscript="org/ow2/frascati/fscript"
name="org.ow2.frascati.FraSCAti">
<component name="fscript">
<implementation.composite name="fscript:FScript.composite"/>
<reference name="composite-manager" target="assembly-factory/composite-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.CompositeManager"/>
</reference>
<reference name="classloader-manager" target="assembly-factory/classloader-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.ClassLoaderManager"/>
</reference>
<reference name="binding-factory" target="binding-factory/binding-factory">
<interface.java interface="org.objectweb.fractal.bf.BindingFactory"/>
</reference>
</component>
</composite>
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti FScript -->
<!-- Copyright (C) 2010 INRIA, USTL -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Philippe Merle -->
<!-- -->
<!-- Contributor(s): -->
<!-- -->
<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
xmlns:frascati="http://frascati.ow2.org/xmlns/sca/1.1"
name="org.ow2.frascati.fscript.FScript">
<reference name="composite-manager" promote="fscript/composite-manager fscript-engine/domain-composite-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.CompositeManager"/>
</reference>
<reference name="classloader-manager" promote="fscript/classloader-manager fscript-engine/domain-classloader-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.ClassLoaderManager"/>
</reference>
<reference name="binding-factory" promote="fscript-engine/binding-factory">
<interface.java interface="org.objectweb.fractal.bf.BindingFactory"/>
</reference>
<component name="fscript">
<implementation.java class="org.ow2.frascati.fscript.FraSCAtiFScript"/>
<!--
<reference name="sca-node-factory" target="fscript-engine/sca-node-factory">
<interface.java interface="org.ow2.frascati.fscript.model.NodeFactory"/>
</reference>
<reference name="engine" target="fscript-engine/engine">
<interface.java interface="org.objectweb.fractal.fscript.FScriptEngine"/>
</reference>
<reference name="loader" target="fscript-engine/loader">
<interface.java interface="org.objectweb.fractal.fscript.ScriptLoader"/>
</reference>
-->
<reference name="composite-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.CompositeManager"/>
</reference>
<reference name="classloader-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.ClassLoaderManager"/>
</reference>
</component>
<component name="fscript-engine">
<frascati:implementation.fractal definition="org.ow2.frascati.fscript.FraSCAtiScriptCore"/>
<service name="sca-node-factory">
<interface.java interface="org.ow2.frascati.fscript.model.NodeFactory"/>
</service>
<service name="engine">
<interface.java interface="org.objectweb.fractal.fscript.FScriptEngine"/>
</service>
<service name="loader">
<interface.java interface="org.objectweb.fractal.fscript.ScriptLoader"/>
</service>
<reference name="domain-composite-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.CompositeManager"/>
</reference>
<reference name="domain-classloader-manager">
<interface.java interface="org.ow2.frascati.assembly.factory.api.ClassLoaderManager"/>
</reference>
<reference name="binding-factory">
<interface.java interface="org.objectweb.fractal.bf.BindingFactory"/>
</reference>
</component>
</composite>
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
role="server" role="server"
signature="org.ow2.frascati.fscript.model.NodeFactory" /> signature="org.ow2.frascati.fscript.model.NodeFactory" />
<interface name="domain-composite-manager" role="client" <interface name="domain-composite-manager" role="client" contingency="optional"
signature="org.ow2.frascati.assembly.factory.api.CompositeManager" /> signature="org.ow2.frascati.assembly.factory.api.CompositeManager" />
<interface name="domain-classloader-manager" role="client" <interface name="domain-classloader-manager" role="client" contingency="optional"
signature="org.ow2.frascati.assembly.factory.api.ClassLoaderManager" /> signature="org.ow2.frascati.assembly.factory.api.ClassLoaderManager" />
<interface name="binding-factory" role="client" <interface name="binding-factory" role="client" contingency="optional"
signature="org.objectweb.fractal.bf.BindingFactory" /> signature="org.objectweb.fractal.bf.BindingFactory" />
<!-- The model to use --> <!-- The model to use -->
......
...@@ -26,13 +26,13 @@ ...@@ -26,13 +26,13 @@
role="client" role="client"
signature="org.objectweb.fractal.adl.Factory" /> signature="org.objectweb.fractal.adl.Factory" />
<interface name="domain-composite-manager" role="client" <interface name="domain-composite-manager" role="client" contingency="optional"
signature="org.ow2.frascati.assembly.factory.api.CompositeManager" /> signature="org.ow2.frascati.assembly.factory.api.CompositeManager" />
<interface name="domain-classloader-manager" role="client" <interface name="domain-classloader-manager" role="client" contingency="optional"
signature="org.ow2.frascati.assembly.factory.api.ClassLoaderManager" /> signature="org.ow2.frascati.assembly.factory.api.ClassLoaderManager" />
<interface name="binding-factory" role="client" <interface name="binding-factory" role="client" contingency="optional"
signature="org.objectweb.fractal.bf.BindingFactory" /> signature="org.objectweb.fractal.bf.BindingFactory" />
<!-- Implementation --> <!-- Implementation -->
......
...@@ -48,6 +48,7 @@ public abstract class HelloWorldBasedTest { ...@@ -48,6 +48,7 @@ public abstract class HelloWorldBasedTest {
if (currentProvider == null || currentProvider.length() == 0) { if (currentProvider == null || currentProvider.length() == 0) {
System.setProperty("fractal.provider", "org.objectweb.fractal.julia.Julia"); System.setProperty("fractal.provider", "org.objectweb.fractal.julia.Julia");
} }
System.setProperty("org.ow2.frascati.bootstrap", "org.ow2.frascati.bootstrap.FraSCAtiFractal");
} }
@Before @Before
......
...@@ -46,6 +46,7 @@ public class ScaNewActionTest { ...@@ -46,6 +46,7 @@ public class ScaNewActionTest {
if (currentProvider == null || currentProvider.length() == 0) { if (currentProvider == null || currentProvider.length() == 0) {
System.setProperty("fractal.provider", "org.objectweb.fractal.julia.Julia"); System.setProperty("fractal.provider", "org.objectweb.fractal.julia.Julia");
} }
System.setProperty("org.ow2.frascati.bootstrap", "org.ow2.frascati.bootstrap.FraSCAtiFractal");
} }
@Test @Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment