From ed7a2e5645b1b0849159ee4384a1db68a158758c Mon Sep 17 00:00:00 2001 From: cbrun Date: Wed, 22 Jun 2016 14:28:58 +0200 Subject: [PATCH] update readme --- README.md | 123 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/README.md b/README.md index 1beff8a..1e23985 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ All these factors are especially relevant for our core user base which is fairly Since version 0.14, Tycho (which integrates Maven and Eclipse based technologies) provide a generic way to launch any Equinox application through the tycho-eclipserun-plugin. Tycho-eclipserun allow the definition of extra dependencies retrieved through p2. +We recommend the use of the Acceleo Launcher with Tycho 0.24+ as this version made the specification of application arguments more rebust to spurious line endings. + From a runtime point of view, the application is launched in an equinox runtime and as such every "auto-wiring" of the EPackages and Resource factories would work out of the box in the exact same way they works in Eclipse. The **Acceleo Equinox Launcher** can be dynamically provisionned by **Tycho** using a simple `pom.xml` and configured to: @@ -34,3 +36,124 @@ Each example is independant and is in the sub-directory: * [All-in-One](./building-and-using-generator/): building a metamodel, a generator, and launching the generation on top of a dynamic instance as part of the Maven build. A scenario which is quite complex but enable a given development team to easily share a reproducible model driven process with no additional infrastructure. +# Configuration + +The launcher can be configured using several arguments specified through `` tags in the `` section. + +```xml + + -consoleLog + -application + org.eclipse.acceleo.equinox.AcceleoLauncher + -data + ${project.build.directory}/wks + -models + https://git.eclipse.org/c/umlgen/org.eclipse.umlgen.git/plain/org.eclipse.umlgen.gen.embedded.c/tests/org.eclipse.umlgen.gen.embedded.c.tests/models/NonRegressionModel.uml + -output + ./src-gen + -actions + generate:org.eclipse.umlgen.gen.embedded.c/org.eclipse.umlgen.gen.embedded.c.main.Uml2ec + + +``` + +In order to launch a generator you need to make sure all its dependencies can be installed. This can be done by specifying p2 repositories: + +```xml + + + Neon update site + p2 + http://download.eclipse.org/releases/neon/ + + + Website Generator + p2 + http://www.obeo.fr/download/release/designer/9.0/community/latest/repository + + + +``` +and then expliciting the dependencies + +```xml + + + + org.eclipse.acceleo.equinox.launcher + + eclipse-feature + + + + fr.obeo.dsl.designer.gen.html.feature + + eclipse-feature + + + + org.eclipse.emf.ecoretools.design + eclipse-feature + + +``` + +A dependency which can't be resolved will lead to a failed build. + + +Please note that you can also specify dependencies on plugins without needing a Feature using the type **eclipse-plugin**: + +```xml + + org.eclipse.mylyn.docs.intent.markup.gen + eclipse-plugin + + +``` + + +## -models URI1 URI2 + +Specify the models to use as inputs of the generation. Relative paths might be used or absolute uris to target the host environment like `platform:/resource/someProject/model/someModel.ecore` for instance. + +Several models can be specified when their URI are separated by spaces. + +## -actions ACTION1 ACTION2 + +Specify the actions to execute, for instance `generate:org.generator.plugin.id/org.generator.plugin.ClassName` to launch an Acceleo code generator. + +The action `launch:/NonRegressionModel/generateJavaFromUML.launch` can be used to start a .launch file. + +The action `generate:org.eclipse.emf.codegen.ecore/org.eclipse.emf.codegen.ecore.generator.Generator` can be used to start the EMF Core Java code generation. + + +Several actions can be specified with their value separated by spaces. + +## -data PATH + +Specify the folder which will keep the workspace. The default value for this parameter is set by *Tycho* and is the current project folder, in our case it generally is a bad default value as that could easily lead to trying to import a project in a workspace which is in one of its sub-directories. + +You should always specify this argument, the value `${project.build.directory}/wks` should work in most cases. + +## -consoleLog + +Log messages in the console. You should specify that flag in order to be able to troubleshoot any issue arising during the build. + +## -output PATH + +Specifiy the root folder to generate to, default is the application working folder. + +This parameter might not be required depending on the generator. + +## -projects-paths PATH + +Specify paths to search for project and import those in the workspace. + +## -jobs-wait-timeout INTEGER + +Specify the duration before timeout when waiting for eclipse Jobs completion. + +## -parameters P1 P2 + +Parameters to pass to the generators. They should be passed in the order they are expected from the generator.