You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ol...@apache.org on 2011/11/01 18:44:06 UTC
svn commit: r1196159 - in
/maven/shared/trunk/maven-script-interpreter/src/site/apt: ./ index.apt.vm
Author: olamy
Date: Tue Nov 1 17:44:06 2011
New Revision: 1196159
URL: http://svn.apache.org/viewvc?rev=1196159&view=rev
Log:
start adding basic documentation
Added:
maven/shared/trunk/maven-script-interpreter/src/site/apt/
maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm (with props)
Added: maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm?rev=1196159&view=auto
==============================================================================
--- maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm (added)
+++ maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm Tue Nov 1 17:44:06 2011
@@ -0,0 +1,69 @@
+ ------
+ Overview
+ ------
+ Olivier Lamy
+ ------
+ 2011-11-01
+ ------
+
+ ~~ Licensed to the Apache Software Foundation (ASF) under one
+ ~~ or more contributor license agreements. See the NOTICE file
+ ~~ distributed with this work for additional information
+ ~~ regarding copyright ownership. The ASF licenses this file
+ ~~ to you under the Apache License, Version 2.0 (the
+ ~~ "License"); you may not use this file except in compliance
+ ~~ with the License. You may obtain a copy of the License at
+ ~~
+ ~~ http://www.apache.org/licenses/LICENSE-2.0
+ ~~
+ ~~ Unless required by applicable law or agreed to in writing,
+ ~~ software distributed under the License is distributed on an
+ ~~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~~ KIND, either express or implied. See the License for the
+ ~~ specific language governing permissions and limitations
+ ~~ under the License.
+
+ ~~ NOTE: For help with the syntax of this file, see:
+ ~~ http://maven.apache.org/doxia/references/apt-format.html
+
+Overview
+
+ This component provides some utilities to interpret/execute some scripts for various implementations: groovy or beanshell.
+
+* Dependency declaration
+
++---------
+ <dependency>
+ <groupId>org.apache.maven.shared</groupId>
+ <artifactId>maven-script-interpreter</artifactId>
+ <version>${project.version}</version>
+ </dependency>
++---------
+
+* Interpret beanshell script
+
++---------
+
+ ScriptInterpreter interpreter = new BeanShellScriptInterpreter();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ interpreter.evaluateScript( script content, extra classPath entries,
+ Map<String, ? extends Object> globalVariables, new PrintStream( out ) );
+ out.toString() returns script output
+
++---------
+
+* Interpret a groovy script
+
++---------
+
+ ScriptInterpreter interpreter = new GroovyScriptInterpreter();
+ ByteArrayOutputStream out = new ByteArrayOutputStream();
+ interpreter.evaluateScript( script content, extra classPath entries,
+ Map<String, ? extends Object> globalVariables, new PrintStream( out ) );
+ out.toString() returns script output
+
++---------
+
+* Using ScriptRunner
+
+
Propchange: maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/shared/trunk/maven-script-interpreter/src/site/apt/index.apt.vm
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision