Although not ready for public release, I figured due to the number of
responses there was some interest amongst readers of the dev list. Do to
complications (my incompetence? who knows) this is not out on codehaus,
however, may move there shortly.

In the interim, the code for two plugins (the component factory and the RDoc
extractor) is available here:
http://ladolcelatte.com/svn/mavenruby/

Here is a test ruby mojo class to place in src/main/scripts:
# @goal rubytest
class RubyTest < Mojo
    def execute
        print "tested!!";
    end
end
run_mojo RubyTest;

with a POM similar to:
<project>
  <modelVersion>4.0.0</modelVersion>
  <groupId>gid</groupId>
  <artifactId>maven-rubytest-plugin</artifactId>
  <packaging>maven-plugin</packaging>
  <version>1-SNAPSHOT</version>
  <build>
    <plugins>
     <plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-plugin-plugin</artifactId>
       <dependencies>
        <dependency>
          <groupId>net.propellors</groupId>
          <artifactId>maven-plugin-tools-ruby</artifactId>
          <version>0.1-alpha-SNAPSHOT</version>
        </dependency>
      </dependencies>
     </plugin>
    </plugins>
  </build>
</project>

If the previous plugin override does not work, try adding this to
maven-plugin-plugin POM dep list and rebuilding (is this a bug, or a defect
in my setup?).
<dependency>
  <groupId>net.propellors</groupId>
  <artifactId>maven-plugin-tools-ruby</artifactId>
  <version>0.1-alpha-SNAPSHOT</version>
</dependency>


Naturally, you must have ruby installed... currently must also be added to
your classpath.

Enjoy!
Eric


On 11/26/05, Eric Redmond <[EMAIL PROTECTED]> wrote:
>
> Maven developers:
>
> I have just completed a couple projects to add Ruby support for Maven 2,
> allowing one to write mojos in Ruby as well as generate mojo descriptors
> based upon RDoc markup. But I have run into a hurdle. I currently am making
> the plugin:descriptor run my RubyExtractor by adding the
> maven-plugin-tools-ruby project to the maven-plugin-plugin dependency list.
> I figured when running the descriptor goal on the plugin project, it
> populates the mojoDescriptorExtractors with those injected by Plexus, which
> naturally must exist in the classpath space (I believe I am correct here).
>
> So my question is: is there another way I am missing in which to add my
> RubyExtractor to the plugin "descriptor" which does not include modifying
> the maven-plugin-plugin project in any way?
>
> Thanks!
> Eric
>
>

Reply via email to