[weld-dev] Java SE extension

Peter Royle pete at screamingcoder.com
Wed Nov 18 07:52:41 EST 2009


On Tue, 2009-11-17 at 17:42 -0500, Gavin King wrote:
> Oh and why is it -Dname=Peter to pass a parameter from Maven?
> 
> What is the significance of "name"?

Maven makes available a property (name) containing the name of the
current project (Hello World SE). As part of the configuration of the
'exec-maven-plugin' in the POM we're reusing this property as the
default commandline argument (line 41). That's why mvn -Drun gives the
output "Hello Hello World SE". So mvn -Drun -Dname=Popeye will overwrite
the value of 'name' to give "Hello Popeye". I guess we could define our
own property in the POM to use if that would make things less confusing,
and probably help avoid any nasty conflicts.

> 
> On Tue, Nov 17, 2009 at 5:25 PM, Gavin King <gavin.king at gmail.com> wrote:
> > Great work on this, Peter, it's really nice.
> >
> > I think we should let you specify an event type to raise:
> >
> >   java -Devent=my.Event
> >
> > or, perhaps, an event qualifier to be applied to the ContainerInitialized event:
> >
> >   java -Dqualifier=my.Qualifier
> >
> > that way, you have a mechanism for choosing between "main methods".
> >
> > Alternatively, we could use something EL-ish to specify a method to call:
> >
> >   java -Daction=mybean.method
> >
> > Hrm, perhaps that's the best option. Maybe my idea of using an event
> > wasn't so great after all.
> >
> > WDYT?
> >
> > --
> > Gavin King
> > gavin.king at gmail.com
> > http://in.relation.to/Bloggers/Gavin
> > http://hibernate.org
> > http://seamframework.org
> >
> 
> 
> 




More information about the weld-dev mailing list