You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jean-Louis MONTEIRO <je...@atosorigin.com> on 2010/01/04 10:29:16 UTC

Re: openejb maven plugin

Hi,

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.

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?

Jean-Louis




Mohammad Nour El-Din wrote:
> 
> IMHO I think it is a very good idea, speacially OpenEJB is used most
> of the time as embedded container either for production deployment of
> applications or for testing deployment applications, so having Maven
> plugin which makes such operations more easy is a great advantage to
> OpenEJB.
> 
> On Wed, Sep 23, 2009 at 10:47 PM, Jean-Louis MONTEIRO
> <je...@atosorigin.com> wrote:
>>
>> Hi,
>>
>> I would like to propose a maven plugin to startup/shut
>> down/deploy/undeploy.
>>
>> Any thoughts?
>>
>> Jean-Louis
>> --
>> View this message in context:
>> http://www.nabble.com/openejb-maven-plugin-tp25531289p25531289.html
>> Sent from the OpenEJB Dev mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Thanks
> - Mohammad Nour
> - LinkedIn: http://www.linkedin.com/in/mnour
> ----
> "Life is like riding a bicycle. To keep your balance you must keep moving"
> - Albert Einstein
> 
> 

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

Re: openejb maven plugin

Posted by Jean-Louis MONTEIRO <je...@atosorigin.com>.
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 <
> jean-louis.monteiro@atosorigin.com> 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.

Re: openejb maven plugin

Posted by Jonathan Gallimore <jo...@gmail.com>.
On Mon, Jan 4, 2010 at 9:29 AM, Jean-Louis MONTEIRO <
jean-louis.monteiro@atosorigin.com> 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