Difference between revisions of "IAM Buckminster Maven Actor"

From Eclipsepedia

Jump to: navigation, search
(Maven actor syntax)
(Maven actor syntax)
Line 23: Line 23:
 
** <b>executionParameters</b>. This is an optional list of execution parameters for the specified goal. This list must follow the same syntax as in console Maven (but it's also fine to remove the "-D" prefix in the key-value pairs).
 
** <b>executionParameters</b>. This is an optional list of execution parameters for the specified goal. This list must follow the same syntax as in console Maven (but it's also fine to remove the "-D" prefix in the key-value pairs).
 
** <b>profiles</b>. Here you can choose a list of profiles to be active during the goal execution. These profiles must be defined inside the project's pom.xml.
 
** <b>profiles</b>. Here you can choose a list of profiles to be active during the goal execution. These profiles must be defined inside the project's pom.xml.
** <b>deactiveProfiles</b>. If set to true, this option will cause the goal to be executed without taking into account any active profile (except for those which may be specified in the <b>profiles</b> property).
+
** <b>deactivateProfiles</b>. If set to true, this option will cause the goal to be executed without taking into account any active profile (except for those which may be specified in the <b>profiles</b> property).
  
 
Here you have some valid examples:
 
Here you have some valid examples:

Revision as of 10:17, 10 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

The Maven actor is capable of the following right now. Expect the list to grow!

  • Execution of Maven goals:
    • Without parameters (install, eclipse:eclipse)
    • With parameters (archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DgroupId=com.mycompany.app artifactId=my-app)
    • Without an existing Maven project (archetype:generate ...)
  • Profiles selection

Maven actor syntax

This is the supported Maven actor syntax at the moment:

  • The actor name (to be used in the actions' "actor" attribute) is maven.
  • Actor properties:
    • goal. The desired Maven goal goes here.
  • Properties:
    • executionParameters. This is an optional list of execution parameters for the specified goal. This list must follow the same syntax as in console Maven (but it's also fine to remove the "-D" prefix in the key-value pairs).
    • profiles. Here you can choose a list of profiles to be active during the goal execution. These profiles must be defined inside the project's pom.xml.
    • deactivateProfiles. If set to true, this option will cause the goal to be executed without taking into account any active profile (except for those which may be specified in the profiles property).

Here you have some valid examples:

<cs:actions>
   <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: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="install"/>
      </cs:actorProperties>
      <cs:properties>
         <cs:property key="profiles" value="profile-1 profile-2 profile-3"/>
         <cs:property key="deactivateProfiles" value="true"/>
      </cs:properties>
   </cs:public>
</cs:actions>