From 819465bc2e7a9d4cccb7bc10b107abac1cadd979 Mon Sep 17 00:00:00 2001 From: vmassol Date: Mon, 29 Sep 2003 13:08:58 +0000 Subject: [PATCH] Initial commit of new caller plugin. The caller plugin is useful to isolate a plugin from other plugins it calls so that different implementation can be seamlessly introduced. git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114119 13f79535-47bb-0310-9956-ffa450edef68 --- caller/.cvsignore | 5 +++ caller/plugin.jelly | 39 ++++++++++++++++++++++++ caller/plugin.properties | 8 +++++ caller/project.properties | 7 +++++ caller/project.xml | 31 +++++++++++++++++++ caller/xdocs/changes.xml | 17 +++++++++++ caller/xdocs/goals.xml | 34 +++++++++++++++++++++ caller/xdocs/index.xml | 61 +++++++++++++++++++++++++++++++++++++ caller/xdocs/navigation.xml | 17 +++++++++++ caller/xdocs/properties.xml | 28 +++++++++++++++++ 10 files changed, 247 insertions(+) create mode 100644 caller/.cvsignore create mode 100644 caller/plugin.jelly create mode 100644 caller/plugin.properties create mode 100644 caller/project.properties create mode 100644 caller/project.xml create mode 100644 caller/xdocs/changes.xml create mode 100644 caller/xdocs/goals.xml create mode 100644 caller/xdocs/index.xml create mode 100644 caller/xdocs/navigation.xml create mode 100644 caller/xdocs/properties.xml diff --git a/caller/.cvsignore b/caller/.cvsignore new file mode 100644 index 00000000..4133073a --- /dev/null +++ b/caller/.cvsignore @@ -0,0 +1,5 @@ +target +maven.log +velocity.log +.classpath +.project diff --git a/caller/plugin.jelly b/caller/plugin.jelly new file mode 100644 index 00000000..77389fa3 --- /dev/null +++ b/caller/plugin.jelly @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/caller/plugin.properties b/caller/plugin.properties new file mode 100644 index 00000000..222fa12e --- /dev/null +++ b/caller/plugin.properties @@ -0,0 +1,8 @@ + +# List of Well-Known Goal Interface (WKGI). +# +# compile-java : compile the source code in ${maven.compile.src.set} (i.e. the +# sources in ${pom.build.sourceDirectory}). + +# Default implementation goals for the WKGIs +maven.caller.call.compile-java = java:compile diff --git a/caller/project.properties b/caller/project.properties new file mode 100644 index 00000000..df6f93f4 --- /dev/null +++ b/caller/project.properties @@ -0,0 +1,7 @@ +# ------------------------------------------------------------------- +# P R O J E C T P R O P E R T I E S +# ------------------------------------------------------------------- +maven.xdoc.date=left +maven.xdoc.version=${pom.currentVersion} +maven.license.licenseFile=${basedir}/../../../LICENSE.txt + diff --git a/caller/project.xml b/caller/project.xml new file mode 100644 index 00000000..5603361c --- /dev/null +++ b/caller/project.xml @@ -0,0 +1,31 @@ + + + + ../project.xml + 3 + maven-caller-plugin + Maven Caller Plugin + 1.0-SNAPSHOT + Interface to isolate calls between plugins + Maven Caller plugin + http://maven.apache.org/reference/plugins/caller/ + /www/maven.apache.org/reference/plugins/caller/ + + scm:cvs:pserver:anoncvs@cvs.apache.org:/home/cvspublic:maven/src/plugins-build/caller/ + http://cvs.apache.org/viewcvs/maven/src/plugins-build/caller/ + + + + Vincent Massol + vmassol + vmassol@pivolis.com + Pivolis + + Creator + Developer + Release Manager + + + + + diff --git a/caller/xdocs/changes.xml b/caller/xdocs/changes.xml new file mode 100644 index 00000000..26310df2 --- /dev/null +++ b/caller/xdocs/changes.xml @@ -0,0 +1,17 @@ + + + + Caller Plugin + Vincent Massol + + + + + + Initial creation of plugin. + + + + + + diff --git a/caller/xdocs/goals.xml b/caller/xdocs/goals.xml new file mode 100644 index 00000000..158d2528 --- /dev/null +++ b/caller/xdocs/goals.xml @@ -0,0 +1,34 @@ + + + + + Maven Caller plugin goals + Vincent Massol + + + +
+ + + + + + + + + + +
GoalDescription
call + Call a Well-Known Goal Interface (WKGI). For example + <caller:call goalInterface="compile-java"/>. + The list of WKGIs are found on the + properties page. +
set + Rewire a WKGI implementation. For example + <caller:set goalInterface="compile-java" goal="aspectj:compile"/>. + You can also directly set the corresponding Maven property: + maven.caller.call.[WKGI name]. +
+
+ +
diff --git a/caller/xdocs/index.xml b/caller/xdocs/index.xml new file mode 100644 index 00000000..b202356a --- /dev/null +++ b/caller/xdocs/index.xml @@ -0,0 +1,61 @@ + + + + + Maven Caller plugin + Vincent Massol + + + +
+

+ The Caller plugin is an interface abstraction for goals. It defines + several Well-Known Goal Interfaces (WKGI). This allows a plugin + to call another plugin through this Caller plugin. The benefit is + that it is then possible to rewire the implementation of a WKGI. +

+

+ Here's a typical scenario. Imagine you wish to implement an aspectj + plugin. This plugin will compile the Java sources using the Aspectj + compiler. However, the project you wish to use the aspectj plugin on + is a webapp and thus you will need call the war:war. + Alas, the war:war goal has a hard-wired call to + java:compile. What you would like is redirect this call + to your aspectj:compile goal. The solution: the Caller + plugin. +

+

+ Here's what you would write. In the war plugin's + plugin.jelly, you would replace the call to +

+ +]]> +

+ by +

+ +]]> +

+ Then, in your Aspectj plugin, you would call +

+ +]]> +

+ Thus, when, as a user you will call the war:war + goal, your aspectj:compile goal will be called. +

+

+ For more information on the functionality provided by this plugin, + please see the Goals document. +

+

+ For more information on how to customise the functionality provided + by this plugin, please see the properties + document. +

+
+ +
diff --git a/caller/xdocs/navigation.xml b/caller/xdocs/navigation.xml new file mode 100644 index 00000000..e748546e --- /dev/null +++ b/caller/xdocs/navigation.xml @@ -0,0 +1,17 @@ + + + + Maven Caller Plugin + Vincent Massol + + + + + + + + + + + + diff --git a/caller/xdocs/properties.xml b/caller/xdocs/properties.xml new file mode 100644 index 00000000..ddbe282a --- /dev/null +++ b/caller/xdocs/properties.xml @@ -0,0 +1,28 @@ + + + + + Maven Caller plugin properties + Vincent Massol + + + +
+ + + + + + + + + + + +
Property nameOptional?Description
maven.caller.call.compile-javaYes + Defines the implementing goal for the "compile-java" WKGI. + The default value is java:compile. +
+
+ +