Commit 2e8c36d8 authored by Christophe Demarey's avatar Christophe Demarey
Browse files

tags reorganization.

parents 9d211b80 e17b1282
============================================================================
OW2 FraSCAti Assembly Factory.
Copyright (C) 2007-2009 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: Damien Fournier
Philippe Merle
Nicolas Dolet
Christophe Demarey
============================================================================
============================================================================
OW2 FraSCAti Assembly Factory.
Copyright (C) 2007-2009 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: Damien Fournier
Philippe Merle
Nicolas Dolet
Christophe Demarey
============================================================================
Assembly Factory 1.1
--------------------
The Assembly Factory provides support for creating SCA components from SCA
assembly definitions which comply with the SCA architecture description
language specification 1.0. The Assembly Factory parses assembly definitions,
validates them, then performs calls to the Tinfi kernel and the Fractal Binding
Factory in order to generate SCA components implementation and/or create
component instances.
Table of Content
----------------
1. Requirements
2. Introduction
3. Compiling and installing Assembly Factory artifacts
4. Running the sample applications
5. Using the Assembly Factory to generate SCA assemblies
6. Using the Assembly Factory to instantiate SCA assemblies
7. References
1. Requirements
---------------
Maven 2.0.9 is required to compile and run the Assembly Factory.
See http://maven.apache.org for instructions on downloading and using Maven.
2. Introduction
---------------
The Assembly Factory is composed of three main Maven artifacts:
- the core-factory : This is the main module containing implementation
of the assembly factory allowing to build SCA component instances.
- the generate-factory : This is a personality of the assembly factory
which allows to generate and compile SCA components. The generate factory
is compiled as a Maven plugin. It permits to generate easily SCA component
code. Since the core factory does not generate SCA components, building
SCA component instances with the core factory always requires to use the
generate factory plugin in the build of your maven project.
- the runtime factory : This module combines both the advantages of the core
and generate modules. It generates, compiles components and executes the
application.
Several sample applications are also available in the assembly-factory/
examples directory.
3. Compiling and installing Assembly Factory artifacts
------------------------------------------------------
To compile and install the core, generate, and runtime factory modules in your
Maven local repository, from the root directory of the Assembly factory, type:
mvn clean install
4. Running the sample applications
----------------------------------
Sample applications are available in the assembly-factory/examples
directory. Those samples can be installed into your local Maven
directory by typing "mvn install" from the examples directory.
Each sample can be run separately from their directory using the command
"mvn -Pfactory:run"
TODO: mvn -Pfactory:launcher
5. Using the Assembly Factory to generate SCA assemblies
--------------------------------------------------------
Since the generate-factory plug-in provides support for generating SCA
components source code, it can be used for your own FraSCAti project.
To use the generate-factory plug-in, just add the following lines into
the build description of your Maven project:
01 <plugin>
02 <groupId>org.ow2.frascati.factory</groupId>
03 <artifactId>frascati-factory-tools</artifactId>
04 <version>1.1</version>
05 <executions>
06 <execution>
07 <id>generate-factory</id>
08 <phase>generate-sources</phase>
09 <goals>
10 <goal>compile</goal>
11 </goals>
12 </execution>
13 </executions>
14 <configuration>
15 <factory>GenerateFactory</factory>
16 <srcs>
17 <src>src/main/java</src>
18 </srcs>
19 <libs>
20 <lib>src/main/resources</lib>
21 </libs>
22 <composite>composite</composite>
23 </configuration>
24 </plugin>
Additionally, you have to configure the plugin according to your Maven
project. You have to define your own <configuration> section, five XML
tags can be specified:
- <factory>
is the name of the factory to use, "GenerateFactory" will only generate
and compile component code, while "AssemblyFactory" will create component
instances. "RuntimeFactory" will generate and execute components.
"GenerateFactory" is taken as default.
- <srcs>
is a list of directories containing the source code of
the application. Default is "src/main/java"
- <libs>
is a list of directories/jar files which are given as additional
libraries. Default is "src/main/resources". Note project dependencies
are automatically added as librairies to be used by frascati factory plug in
- <composite>
is the name or the path to your SCA application main composite.
- <service> (Optional)
A service to retrieve when starting the composite.
- <method> (Optional)
A method to invoke on the given <service> when starting the composite.
Will exit FraSCAti once service has been invoked.
6. Using the Assembly Factory to create SCA assembly instances from Java
------------------------------------------------------------------------
The assembly factory (runtime-module) can be called through a Java class.
The factory API offers two methods which create SCA component instances.
new Factory().getComposite(String composite)
Return an instance of the composite specified by the "composite" parameter.
The "composite" parameter value can be a path to a composite name (if the
composite is a resource available in your current Java classpath), a file
on your local directory, or an URL.
new Factory().getComposite(String composite, URL [] jars)
Like the previous method, return an instance of the composite specified by
the "composite" parameter. But also enable to give URL of jar files to be
loaded into the used class loader.
For a detailed example of assembly factory usage, you can take a look at
the HelloWorld in the assembly-factory/examples/helloworld directory.
7. Using the Assembly Factory to load SCA contribution
------------------------------------------------------
The assembly factory (runtime-module) also offers partial support for
loading sca contribution archives (refers to SCA assembly model specification
for more details). Loading contribution archives from a Java program could be
done using :
new Factory().getContribution(String contribution)
Where 'contribution' is the file path to your contribution archive.
Currently the assembly factory support contributions package as zip files.
The archive must at least contains a contribution descriptor named
'sca-contribution.xml'. If jar libraries are present into the contribution
package, they will be automatically added to the assembly factory class loader.
The assembly factory will creates SCA composites instances for 'deployable'
defined in the contribution descriptor.
8. References
-------------
- FraSCAti : http://frascati.ow2.org
- Maven : http://maven.apache.org
- SCA : http://www.osoa.org
- SCOrWare : http://www.scorware.org
For any question concerning the Assembly Factory, please contact
frascati@ow2.org
Date of creation of this file: May 27, 2008.
Last modified: July 22, 2009.
Assembly Factory 1.1.1
--------------------
* Add a CXF-based servlet to embed FraSCAti in a WAR
* Support for scripted component implementation
* RMI Binding available in the FraSCAti model
* Use Apache CXF 2.2.3
* Support RESTful binding
* Partial support for contribution archive
* Use Binding Factory 0.7
* Use Tinfi 1.1.2
* Use Juliac 2.2.3
Released on November 24, 2009
Assembly Factory 1.0.1
----------------------
* Use Binding Factory RMI Connector 0.6.1
* Update the FraSCAti server mode
Released on July 23, 2009
Assembly Factory 1.0
--------------------
* Change FraSCAti command line usage
* Use SCA model from Eclipse STP project version 2.0.0 (tag 3.5GA)
* Use Tinfi 1.0.1
* Use Binding Factory 0.6
* Domain support (Local domain)
* Use namespaces with composite implmentation plugin
* Fix bug #313562 (classpath issue with frascati maven plugin)
* Fix bug #313805 and #312823 for Intents on service/references interfaces
Released on June 22, 2009
Assembly Factory 0.5
--------------------
* Use FRASCATI_GENERATED environment variable for output directory when exist
* Plug-able interface type architecture
* Resolve promoted interface type for service/reference
* Use SCA extensible model from Eclipse STP project version 1.1.0
* Move to org.ow2.frascati for artifacts and Java packages
* Use Tinfi 0.4.4
* Use Binding Factory 0.5
Released on March 2, 2008
Assembly Factory 0.4
--------------------
* Preliminary support for Spring implementation.
See examples/helloworld-spring
* Partial support for composite properties
See examples/helloworld-property
* Support for Fractal implementation.
See examples/helloworld-fractal-impl
* Support for complex properties on components.
See examples/helloworld-property-complex
* Use Tinfi 0.4.3
* Use Binding Factory 0.4
Released on November 21, 2008
Assembly Factory 0.3
--------------------
* Enable SCA Model Validation
* Run with Java 1.5 and 1.6
* SCA Composites run in separate containers
* Solve naming bug when promoting services or references
* Resolve promote and target attributes with missing service/reference name
* Register binding types on first processing
* Runtime component generation support
* Introspection for Java based components
* Plug-able binding type architecture
* Plug-able implementation type architecture
* Support Java RMI binding
* Use SCA model from Eclipse STP project version 1.0
* Use Tinfi 0.3.2
* Use Binding Factory 0.3
Released on July 25, 2008
Assembly Factory 0.2.1
----------------------
* Correct simple property bug discovered by Nicolas Dolet
Released on June 5, 2008
Assembly Factory 0.2
--------------------
* Support loading from external composite and jar files
* Improve SCA specification support (wires, includes)
* Resolve several bugs with Web service binding
* Improve logging
* Use SCA model from Eclipse STP project version 0.8
* Use Tinfi 0.2.1
* Use Binding Factory 0.2
Released on June 4, 2008
Assembly Factory 0.1
--------------------
* First prototype release
* Based on built-in SCA model
* Use Tinfi 0.1
* Use Binding Factory 0.1
Note: SVN Revision 454
Assembly Factory TODO List
* Implement model completion (at parse time)
Done : - Retrieve Service and references from annotations
- Resolve promote and target attributes with missing service/reference name
What else?
* Define Frascati distribution and application packaging
* Improve conformance with spec SCA 1.0
- Callback interfaces
- ComponentContext from API
- Which ?
* Policy / intent integration
- WIP Intent
* Model validation through OCL engine
* Support for monitoring ?
* Allow automatic plug-in integration (auto binding for implementation or binding plug-in)
Done - Configurable architecture
- Need to support lazy loading for plugins
* Put java implementation resolver into separated module
* Move to Fractel 3.2 and use LifeCycle annotation in asynchronous mode
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
* ====================================================================
*
* SCOrWare Assembly Factory.
* Copyright (C) 2008 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: Philippe.Merle@inria.fr
*
* Author: Philippe Merle
-->
<assembly>
<id>bin</id>
<formats>
<format>zip</format>
<format>dir</format>
</formats>
<fileSets>
<fileSet>
<directory>src/main/scripts</directory>
<outputDirectory>/bin</outputDirectory>
<fileMode>755</fileMode>
</fileSet>
<fileSet>
<directory>target</directory>
<includes>
<include>*.jar</include>
</includes>
<outputDirectory>/lib</outputDirectory>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<includes>
<include>*:jar</include>
</includes>
</dependencySet>
</dependencySets>
</assembly>
<?xml version="1.0"?>
<!--
* OW2 FraSCAti: Core Factory
*
* Copyright (c) 2008-2009 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: Damien Fournier
*
* Contributor(s): Christophe Demarey
* Nicolas Dolet
* Pierre Carton
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>parent</artifactId>
<groupId>org.ow2.frascati.factory</groupId>
<version>1.1.1</version>
</parent>
<groupId>org.ow2.frascati.factory</groupId>
<artifactId>frascati-af-core</artifactId>
<name>FraSCAti Assembly Factory: Core Factory Module</name>
<url>http://frascati.ow2.org/</url>
<inceptionYear>2007</inceptionYear>
<developers>
<developer>
<id>fournier</id>
<name>Damien Fournier</name>
<email>Damien.Fournier@inria.fr</email>
<organization>INRIA</organization>
<organizationUrl>http://www.inria.fr</organizationUrl>
<roles>
<role>Architect</role>
<role>Developer</role>
</roles>
</developer>
</developers>
<!-- ======= -->
<!-- Build -->
<!-- ======= -->
<build>
<defaultGoal>install</defaultGoal>
<plugins>
<!-- To compile ${java.version} source code. -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<fork>true</fork>
<meminitial>64m</meminitial>
<maxmem>512m</maxmem>
<source>1.5</source>
<target>1.5</target>
<systemProperties>
<property>
<name>java.util.logging.config.file</name>
<value>src/main/conf/logging.properties</value>
</property>
</systemProperties>
</configuration>
</plugin>
<!-- Process Fraclet annotations with Spoon. -->
<plugin>
<groupId>net.sf.alchim</groupId>
<artifactId>spoon-maven-plugin</artifactId>
<version>0.7.1</version>
<dependencies>
<dependency>
<groupId>fr.inria.gforge.spoon</groupId>
<artifactId>spoon-core</artifactId>
<version>1.4.2</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>recompile</goal>
</goals>
</execution>
</executions>
</plugin>
<!--
Compile the Fractal architecture of the SCOrWare assembly
factory with JuliaC.
-->
<plugin>
<groupId>org.objectweb.fractal.juliac</groupId>
<artifactId>maven-juliac-plugin</artifactId>
<version>${juliac.version}</version>
<executions>
<execution>
<id>juliac-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<configuration>
<opt>OO</opt>
<srcs>
<src>target/generated-sources/spoon</src>
</srcs>
<mixins>
<mixin>org.objectweb.fractal.julia:julia-mixins:${julia-mixins.version}:sources</mixin>
</mixins>
<adls>
<adl>org.ow2.frascati.factory.Frascati</adl>
</adls>
<debug>false</debug>
</configuration>
<dependencies>
<dependency>
<groupId>org.objectweb.fractal.juliac</groupId>
<artifactId>juliac-core</artifactId>
<version>${juliac.version}</version>
</dependency>
<dependency>
<groupId>org.objectweb.fractal.juliac</groupId>
<artifactId>juliac-jdt</artifactId>
<version>${juliac.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- Plugin for image generation representing the dependencies graph -->
<!-- To use this plugin, type: 'mvn depgraph:depgraph' -->
<!-- This plugin requires the 'dot' library, provided by the -->
<!-- GraphViz software (http://www.graphviz.org ) -->
<plugin>
<groupId>ch.elca.el4j.maven.plugins</groupId>
<artifactId>maven-depgraph-plugin</artifactId>
<configuration>
<outDir>target/site/images</outDir>
<outFile>${pom.artifactId}.png</outFile>
</configuration>
<version>1.1</version>
</plugin>
<!-- Build the binary assembly. -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<version>2.2-beta-1</version>
<configuration>
<descriptors>
<descriptor>assembly-bin.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
</plugin>
</plugins>
</reporting>
<!-- ============ -->