Back to the office ...

Committed to
https://svn.apache.org/repos/asf/openejb/trunk/sandbox/maven-openejb-plugin
After getting it installed in your local repository, you can just run
something like
> mvn openejb:start
> mvn openejb:run -Dexec.args="cipher -h"

Would like to get your opinion cause i have been facing some problems with
commons-cli usage.
Basically, the o.a.o.cli.MainImpl class contains something like:
        // create the Options
        Options options = new Options();
        options.addOption(null, "version", false, "");

So, running a command leads to 
java.lang.IllegalArgumentException: opt is null
        at org.apache.commons.cli.Option.validateOption(Option.java:159)
        at org.apache.commons.cli.Option.<init>(Option.java:250)
        at org.apache.commons.cli.Options.addOption(Options.java:157)
        at org.apache.openejb.cli.MainImpl.main(MainImpl.java:76)
        at org.apache.openejb.cli.Bootstrap.main(Bootstrap.java:103)
        at org.apache.maven.plugins.StartMojo.execute(StartMojo.java:43)

I fixed it locally with
        // create the Options
        Options options = new Options();
        options.addOption("v", "version", false, "");

The javadoc says
Validates whether opt is a permissable Option shortOpt. The rules that
specify if the opt is valid are:

  opt is not NULL 
  a single character opt that is either ' '(special case), '?', '@' or a
letter 
  a multi character opt that only contains letters. 
Parameters:
  opt The option string to validate
Throws:
  IllegalArgumentException - if the Option is not valid.

Before creating a JIRA and commit a patch, i'd like to know how it works for
you.

Jean-Louis


Jonathan Gallimore-2 wrote:
> 
> On Mon, Jan 4, 2010 at 9:29 AM, Jean-Louis MONTEIRO <
> [email protected]> wrote:
> 
>>
>> There is a Maven OpenEJB Plugin committed to a sandbox.
>> I looked into and it's just a skeleton. I didn't saw that before so i try
>> creating my own Maven Plugin relying on Maven Exec plugin.
>>
> 
> I've noticed that in the past, I don't think its used for anything at the
> moment.
> 
> 
>>
>> For now, i just created the Start command to share with you.
>> I can definitely change it to rely on Groovy instead.
>>
>> By the way, i also noticed an issue OPENEJB-618
>> Actually, my maven plugin just wraps our available command.
>>
>> How can i share it with you?
>> Can i remove the sandbox version to commit a new one?
>>
> 
> That sounds ok to me. We'd be able to get the old version back from SVN
> anyway. I'll look out for your commit and give it a try. I created an
> Archetype for OpenEJB not too long ago (which I could get committed to the
> sandbox if anyone is interested in having a go with it) and I could extend
> it to use your plugin.
> 
> Jon
> 
> 

-- 
View this message in context: 
http://n4.nabble.com/openejb-maven-plugin-tp988833p1289351.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

Reply via email to