Difference between revisions of "IAM Buckminster Maven Actor"

From Eclipsepedia

Jump to: navigation, search
(Maven actor syntax)
(Maven actor syntax)
Line 19: Line 19:
 
       <cs:properties>
 
       <cs:properties>
 
         <cs:property key="executionParameters"  
 
         <cs:property key="executionParameters"  
                                value="-DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app"/>
+
            value="-DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app"/>
 
       </cs:properties>
 
       </cs:properties>
 
   </cs:public>
 
   </cs:public>
Line 28: Line 28:
 
       <cs:properties>
 
       <cs:properties>
 
         <cs:property key="executionParameters"  
 
         <cs:property key="executionParameters"  
                                value="archetypeGroupId=org.apache.maven.archetypes groupId=com.mycompany.app artifactId=my-app"/>
+
            value="archetypeGroupId=org.apache.maven.archetypes groupId=com.mycompany.app artifactId=my-app"/>
 
       </cs:properties>
 
       </cs:properties>
 
   </cs:public>
 
   </cs:public>

Revision as of 11:07, 7 October 2008

< To: IAM

Introduction

An IAM-based Maven actor for Buckminster is under development and here we'll describe its features and API. If you are not familiar with Buckminster's actions and actors, here you will find detailed information.

Features

Right now, the Maven actor can execute Maven goals with or without parameters, for example: install, eclipse:eclipse, archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app artifactId=my-app, etc. Also, goals that don't need an existing project to be performed are supported (the archetype:generate goal is an example of that).

Maven actor syntax

Actor properties and regular properties can be passed to the Maven actor. Right now, there's only one supported actor property, named "goal", which specifies which Maven goal needs to be performed. Maven goals can be parametrized, and those parameters (if needed) must be specified in the "executionParameters" property. The executionParameters value must consist in a list of key-value pairs, optionally preceded by the usual "-D" prefix. Let's see some valid action examples (by the way, the Maven actor name is "maven"):

<cs:actions>
   <cs:public name="foo-action-with-parameters" actor="maven">
      <cs:actorProperties>
         <cs:property key="goal" value="archetype:generate"/>
      </cs:actorProperties>
      <cs:properties>
         <cs:property key="executionParameters" 
             value="-DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app -DartifactId=my-app"/>
      </cs:properties>
   </cs:public>
   <cs:public name="foo-action-with-parameters-2" actor="maven">
      <cs:actorProperties>
         <cs:property key="goal" value="archetype:generate"/>
      </cs:actorProperties>
      <cs:properties>
         <cs:property key="executionParameters" 
             value="archetypeGroupId=org.apache.maven.archetypes groupId=com.mycompany.app artifactId=my-app"/>
      </cs:properties>
   </cs:public>
   <cs:public name="foo-install-action" actor="maven">
      <cs:actorProperties>
         <cs:property key="goal" value="install"/>
      </cs:actorProperties>
   </cs:public>
   <cs:public name="foo-eclipse-eclipse-action" actor="maven">
      <cs:actorProperties>
         <cs:property key="goal" value="eclipse:eclipse"/>
      </cs:actorProperties>
   </cs:public>
</cs:actions>