Add FraSCAti Archetype

parent bd1bcbb5
<?xml version="1.0" encoding="UTF-8"?>
<!--
* OW2 FraSCAti Archetype
*
* Copyright (c) 2012 Inria, University of Lille 1
*
* 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: Antonio Souza Neto
*
* Contributor(s):
-->
<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.ow2.frascati.mojo</groupId>
<artifactId>maven-plugins-parent</artifactId>
<version>1.5-SNAPSHOT</version>
</parent>
<groupId>org.ow2.frascati.mojo</groupId>
<artifactId>frascati-archetype</artifactId>
<packaging>maven-archetype</packaging>
<name>FraSCAti Archetype</name>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<artifactId>archetype-packaging</artifactId>
<version>2.0</version>
</extension>
</extensions>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-archetype-plugin</artifactId>
<version>2.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
<!--
* OW2 FraSCAti Archetype
*
* Copyright (c) 2012 Inria, University of Lille 1
*
* 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: Antonio Souza Neto
*
* Contributor(s):
-->
<archetype>
<id>frascati-archetype</id>
<resources>
<resource>README.txt</resource>
<resource>src/main/resources/helloworld-wired.composite</resource>
<resource>config/frascati-cxf.xml</resource>
<resource>config/logging.properties</resource>
</resources>
<sources>
<source>src/main/java/Client.java</source>
<source>src/main/java/Server.java</source>
<source>src/main/java/PrintService.java</source>
</sources>
<testSources>
<source>src/test/java/HelloworldTestCase.java</source>
</testSources>
</archetype>
The structure of this application has been created automatically by FraSCAti Archetype and contains the basic needs to construct an SCA application executing on FraSCAti.
Install your application doing "mvn clean install" in the command line.
To execute the application, do "mvn -Prun" in the command line or open the pom.xml file to see the available profiles.
A helloworld application has been created to help beginners to understand how a simple application works on FraSCAti.
A composite file describes the architecture and must to be changed to be adapted to your application.
The java files can be changed or simply deleted.
More about FraSCAti including an user guide in: http://frascati.ow2.org
<?xml version="1.0"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<!-- This is an empty Apache CXF configuration. -->
<!-- See at http://cxf.apache.org/docs/configuration.html for details on how to configure Apache CXF. -->
</beans>
############################################################
# Default Logging Configuration File
#
# You can use a different file by specifying a filename
# with the java.util.logging.config.file system property.
# For example java -Djava.util.logging.config.file=myfile
############################################################
############################################################
# Global properties
############################################################
# "handlers" specifies a comma separated list of log Handler
# classes. These handlers will be installed during VM startup.
# Note that these classes must be on the system classpath.
# By default we only configure a ConsoleHandler, which will only
# show messages at the INFO and above levels.
handlers= java.util.logging.ConsoleHandler
# To also add the FileHandler, use the following line instead.
#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
# Default global logging level.
# This specifies which kinds of events are logged across
# all loggers. For any given facility this global level
# can be overridden by a facility specific level
# Note that the ConsoleHandler also has a separate level
# setting to limit messages printed to the console.
.level=INFO
############################################################
# Handler specific properties.
# Describes specific configuration info for Handlers.
############################################################
# default file output is in user's home directory.
java.util.logging.FileHandler.pattern = %h/java%u.log
java.util.logging.FileHandler.limit = 50000
java.util.logging.FileHandler.count = 1
java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
############################################################
# Facility specific properties.
# Provides extra control for each logger.
############################################################
org.ow2.frascati.level = INFO
org.ow2.frascati.assembly.factory.level = INFO
# org.ow2.frascati.assembly.factory.manager.level = OFF
# org.ow2.frascati.assembly.factory.manager.AssemblyFactoryManager.level = OFF
org.ow2.frascati.assembly.factory.processor.level = INFO
# org.ow2.frascati.assembly.factory.processor.ScaBindingProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaBindingScaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentPropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentReferenceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaComponentServiceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositePropertyProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeReferenceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaCompositeServiceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationCompositeProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationJavaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaImplementationProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaInterfaceJavaProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaInterfaceProcessor.level = OFF
# org.ow2.frascati.assembly.factory.processor.ScaPropertyTypeJavaProcessor.level = OFF
org.ow2.frascati.component.factory.level = INFO
org.ow2.frascati.component.factory.juliac.level = INFO
org.ow2.frascati.property.jaxb.level = INFO
org.ow2.frascati.binding.level = INFO
org.ow2.frascati.binding.factory.level = INFO
org.ow2.frascati.binding.jms.level = INFO
org.objectweb.fractal.bf.connectors.jms.level = INFO
org.ow2.frascati.implementation.level = INFO
org.ow2.frascati.implementation.bpel.level = INFO
org.ow2.frascati.implementation.bpel.easybpel.level = INFO
org.ow2.frascati.parser.level = INFO
org.ow2.frascati.tinfi.level = INFO
org.ow2.frascati.wsdl.level = INFO
com.ebmwebsourcing.level = INFO
com.sun.level = INFO
<?xml version="1.0" encoding="UTF-8"?>
<!--
* This pom has been created automatically by FraSCAti Archetype
* and contains the basic needs to construct an SCA application
* executing on FraSCAti.
* You can add or change any information you need, such as
* dependencies, repositories and others.
*
*
-->
<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>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<packaging>jar</packaging>
<version>${version}</version>
<url>http://frascati.ow2.org/</url>
<properties>
<composite.file>helloworld-wired</composite.file>
<service.name>r</service.name>
<method.name>run</method.name>
<frascati.version>1.5-SNAPSHOT</frascati.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<config.directory>config</config.directory>
<java.util.logging.config.file>${config.directory}/logging.properties</java.util.logging.config.file>
<cxf.config.file>${config.directory}/frascati-cxf.xml</cxf.config.file>
<org.ow2.frascati.class>org.ow2.frascati.FraSCAti</org.ow2.frascati.class>
<org.ow2.frascati.bootstrap>org.ow2.frascati.bootstrap.FraSCAti</org.ow2.frascati.bootstrap>
<org.ow2.frascati.composite>org.ow2.frascati.FraSCAti</org.ow2.frascati.composite>
<xerces.version>2.9.1</xerces.version>
</properties>
<!-- ===== -->
<!-- Build -->
<!-- ===== -->
<build>
<defaultGoal>package</defaultGoal>
<extensions>
<!-- Enabling the use of SSH -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ssh</artifactId>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<skipTests>false</skipTests>
<useSystemClassLoader>false</useSystemClassLoader>
<systemPropertyVariables>
<org.ow2.frascati.class>${org.ow2.frascati.class}</org.ow2.frascati.class>
<org.ow2.frascati.bootstrap>${org.ow2.frascati.bootstrap}</org.ow2.frascati.bootstrap>
<org.ow2.frascati.composite>${org.ow2.frascati.composite}</org.ow2.frascati.composite>
<org.ow2.frascati.binding.uri.base>${org.ow2.frascati.binding.uri.base}</org.ow2.frascati.binding.uri.base>
<java.util.logging.config.file>${java.util.logging.config.file}</java.util.logging.config.file>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!-- Compile with Java 1.5 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<!-- Compile the SCA composite. -->
<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>
<loggingConfFile>${java.util.logging.config.file}</loggingConfFile>
<composite>${composite.file}</composite>
</configuration>
<!-- Required for FraSCAti EasyBPEL integration. -->
<dependencies>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>${xerces.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
<!-- Execute Java. -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<!-- Use version 1.1.1 instead of 1.2 to be sure that provided artifacts are added to the classpath. -->
<version>1.1.1</version>
<configuration>
<!-- Define Java system properties for FraSCAti. -->
<systemProperties>
<systemProperty>
<key>org.ow2.frascati.class</key>
<value>${org.ow2.frascati.class}</value>
</systemProperty>
<systemProperty>
<key>org.ow2.frascati.bootstrap</key>
<value>${org.ow2.frascati.bootstrap}</value>
</systemProperty>
<systemProperty>
<key>org.ow2.frascati.composite</key>
<value>${org.ow2.frascati.composite}</value>
</systemProperty>
<systemProperty>
<key>org.ow2.frascati.binding.uri.base</key>
<value>${org.ow2.frascati.binding.uri.base}</value>
</systemProperty>
<systemProperty>
<key>fscript-factory</key>
<value>org.ow2.frascati.fscript.jsr223.FraSCAtiScriptEngineFactory</value>
</systemProperty>
<systemProperty>
<key>java.util.logging.config.file</key>
<value>${java.util.logging.config.file}</value>
</systemProperty>
<!-- Set the Apache CXF configuration file to load. -->
<systemProperty>
<key>cxf.config.file.url</key>
<value>file:${cxf.config.file}</value>
</systemProperty>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.ow2.frascati.mojo</groupId>
<artifactId>frascati-launcher-plugin</artifactId>
<version>${frascati.version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<!-- ============ -->
<!-- Dependencies -->
<!-- ============ -->
<!-- Some dependencies are commented because they are not used in the default application.-->
<!-- You can uncomment the dependencies you need in your application or add others. -->
<dependencies>
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-runtime-factory</artifactId>
<version>${frascati.version}</version>
<!-- scope is provided to allow to compile examples but -->
<!-- to avoid to put FraSCAti systematically into generated WAR/ZIP/etc. -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-explorer-api</artifactId>
<version>${frascati.version}</version>
<!-- scope is provided to allow to compile FraSCAti Explorer plugins of examples but -->
<!-- to avoid to put FraSCAti Explorer systematically into generated WAR/ZIP/etc. -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
<version>4.8.2</version>
</dependency>
<!-- OW2 FraSCAti Fractal Implementation. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-implementation-fractal</artifactId>
<version>${project.version}</version>
</dependency>-->
<!-- OW2 FraSCAti Velocity Implementation. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-implementation-velocity</artifactId>
<version>${project.version}</version>
</dependency>-->
<!-- OW2 FraSCAti Binding JMS Module. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-jms</artifactId>
<version>${project.version}</version>
</dependency>-->
<!-- OW2 FraSCAti Interface WSDL Module. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-interface-wsdl</artifactId>
<version>${project.version}</version>
</dependency>-->
<!-- OW2 FraSCAti Java RMI Binding. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-rmi</artifactId>
<version>${project.version}</version>
</dependency>-->
<!-- OW2 FraSCAti Rest Binding. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-rest</artifactId>
<version>${project.version}</version>
</dependency>-->
<!-- OW2 FraSCAti Http Binding. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-http</artifactId>
<version>${project.version}</version>
</dependency>-->
<!-- OW2 FraSCAti WS Binding. -->
<!--<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-binding-ws</artifactId>
<version>${project.version}</version>
</dependency> -->
</dependencies>
<!-- ======== -->
<!-- Profiles -->
<!-- ======== -->
<profiles>
<!-- To execute an SCA composite type 'mvn -Prun'. -->
<profile>
<id>run</id>
<build>
<defaultGoal>org.ow2.frascati.mojo:frascati-launcher-plugin:exec</defaultGoal>
<plugins>
<plugin>
<groupId>org.ow2.frascati.mojo</groupId>
<artifactId>frascati-launcher-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<loggingConfFile>${java.util.logging.conf.file}</loggingConfFile>
<composite>${composite.file}</composite>
<service>${service.name}</service>
<method>${method.name}</method>
<methodParams>${method.params}</methodParams>
<systemProperties>
<org.ow2.frascati.class>${org.ow2.frascati.class}</org.ow2.frascati.class>
<org.ow2.frascati.bootstrap>${org.ow2.frascati.bootstrap}</org.ow2.frascati.bootstrap>
<org.ow2.frascati.composite>${org.ow2.frascati.composite}</org.ow2.frascati.composite>
<!-- Set the Apache CXF configuration file to load. -->
<cxf.config.file.url>file:${cxf.config.file}</cxf.config.file.url>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- To execute an SCA composite with FraSCAti Explorer type 'mvn -Pexplorer'. -->
<profile>
<id>explorer</id>
<dependencies>
<!-- here FraSCAti Explorer is put in the classpath. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-explorer-core</artifactId>
<version>${frascati.version}</version>
</dependency>
</dependencies>
<properties>
<org.ow2.frascati.bootstrap>org.ow2.frascati.bootstrap.FraSCAtiFractal</org.ow2.frascati.bootstrap>
</properties>
<build>
<defaultGoal>exec:java</defaultGoal>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<configuration>
<mainClass>org.ow2.frascati.explorer.FrascatiExplorerLauncher</mainClass>
<arguments>
<argument>${composite.file}</argument>
</arguments>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- To execute an SCA composite with FraSCAti Explorer and the FScript plugin
type 'mvn -Pexplorer-fscript'. -->
<profile>
<id>explorer-fscript</id>
<dependencies>
<!-- here FraSCAti Explorer is put in the classpath. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-explorer-core</artifactId>
<version>${frascati.version}</version>
</dependency>
<!-- Add OW2 FraSCAti Explorer FScript plugin -->
<dependency>
<groupId>org.ow2.frascati</groupId>