RE: Sending mail with Maven

2003-07-08 Thread Jason van Zyl
On Tue, 2003-07-08 at 04:37, Michal Maczka wrote:

> The problem is that postGoal concept is very limited in that sense, 
> that there can be only one preGoal/postGoal of given goal.
> So IMHO adding any functionality to postGoal should be practiced only on
> project level (maven.xml file) and mustn't be used on plugin level. And this
> means that such extension can be hardly implemented in the way which allows
> reusing them.
> 

BTW, all the changes to Werkz have been checked in. And
http://www.apache.org/~jvanzyl/maven.tgz uses these changes i.e. use the
listener to alter the context in which a goal is attained.

> -- 
> jvz.
> 
> Jason van Zyl
> [EMAIL PROTECTED]
> http://tambora.zenplex.org
> 
> In short, man creates for himself a new religion of a rational
> and technical order to justify his work and to be justified in it.
>   
>   -- Jacques Ellul, The Technological Society


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sending mail with Maven

2003-07-08 Thread Jason van Zyl
On Tue, 2003-07-08 at 04:37, Michal Maczka wrote:

> I agree that this "thing" does not belong to test plugin.
> 
> The problem is that postGoal concept is very limited in that sense, 
> that there can be only one preGoal/postGoal of given goal.
> So IMHO adding any functionality to postGoal should be practiced only on
> project level (maven.xml file) and mustn't be used on plugin level. And this
> means that such extension can be hardly implemented in the way which allows
> reusing them.
> 
> 
> 
> I have some ideas regarding "goals" for feature version of Maven
> (maven-new?)
> 
> Wouldn't it be better to use goal listeners instead or pre/post goals?
> 
> e.g something like
> interface GoalListeners
> {
> void goalStarted(...)
> void goalFinished(...)
> }

I have already added this to Werkz and was necessary to allow the use of
separate contexts during the attainment of goals. There is an
AttainGoalListener when I use to set the context (classloaders, jelly
contexts and whatever else I might need in the future) before a goal is
attained and I pop the context off the stack when it's done.

> 
> This will allow using unlimited number of goal decorators.
> 

Yes, when there are non-Jelly plugins, most definitely.

> So there can be more tools like "build observers", and those tools.
> can be used in parallel.
> 
> E.g Mail notifiers and this, what Vincent has described in his post: 
> <<[Idea] Historical data and "best-behaving"/dashboard reports>>  
> belongs to this category(build observers).
> 
> 
> 
> Other issue with goals:
> 
> I believe that we need something like "namespaces" for plugins.
> This is needed if we are going to support versioned plugins (so user can
> choose which version of particular plugin he wants to use). So e.g. when
> user calls "ejb:ejb" goal - Maven will know that this goal is mapped to ejb
> plugin. 
> In next step maven will check user's preferred version of this plugin
> and "load/execute" the goal from say: maven-ejb-plugin-1.1
> If user has no "preferred" version of given plugin we can use always
> the newest version. 
> 
> 
> 
> Michal
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sending mail with Maven

2003-07-08 Thread Michal Maczka


> -Original Message-
> From: Jason van Zyl [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 1:26 AM
> To: Maven Users List
> Subject: RE: Sending mail with Maven
> 
> On Mon, 2003-07-07 at 18:36, Vincent Massol wrote:
> > Hi Brett,
> >
> > Just some thoughts. Is that something that is best placed in the test
> > plugin or would it be better placed as either a plugin in itself or as a
> > build listener (as in Ant)?
> >
> > More generally, the feature I would be looking for is: "send an email
> > when the build fails". I think this covers your use case + some others.
> >
> > Thoughts?
> 
> You guys might want to chat to Aslak as he's started a Maven continuous
> integration project called Damage Control. You could certainly do it
> with a post goal and a check but it definitely doesn't belong in the
> test plugin.
> 

I agree that this "thing" does not belong to test plugin.

The problem is that postGoal concept is very limited in that sense, 
that there can be only one preGoal/postGoal of given goal.
So IMHO adding any functionality to postGoal should be practiced only on
project level (maven.xml file) and mustn't be used on plugin level. And this
means that such extension can be hardly implemented in the way which allows
reusing them.



I have some ideas regarding "goals" for feature version of Maven
(maven-new?)

Wouldn't it be better to use goal listeners instead or pre/post goals?

e.g something like
interface GoalListeners
{
void goalStarted(...)
void goalFinished(...)
}


This will allow using unlimited number of goal decorators.


So there can be more tools like "build observers", and those tools.
can be used in parallel.

E.g Mail notifiers and this, what Vincent has described in his post: 
<<[Idea] Historical data and "best-behaving"/dashboard reports>>  
belongs to this category(build observers).



Other issue with goals:

I believe that we need something like "namespaces" for plugins.
This is needed if we are going to support versioned plugins (so user can
choose which version of particular plugin he wants to use). So e.g. when
user calls "ejb:ejb" goal - Maven will know that this goal is mapped to ejb
plugin. 
In next step maven will check user's preferred version of this plugin
and "load/execute" the goal from say: maven-ejb-plugin-1.1
If user has no "preferred" version of given plugin we can use always
the newest version. 



Michal

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sending mail with Maven

2003-07-07 Thread Jason van Zyl
On Mon, 2003-07-07 at 18:36, Vincent Massol wrote:
> Hi Brett,
> 
> Just some thoughts. Is that something that is best placed in the test
> plugin or would it be better placed as either a plugin in itself or as a
> build listener (as in Ant)?
> 
> More generally, the feature I would be looking for is: "send an email
> when the build fails". I think this covers your use case + some others.
> 
> Thoughts?

You guys might want to chat to Aslak as he's started a Maven continuous
integration project called Damage Control. You could certainly do it
with a post goal and a check but it definitely doesn't belong in the
test plugin.

> Thanks
> -Vincent
> 
> > -Original Message-
> > From: Brett Porter [mailto:[EMAIL PROTECTED]
> > Sent: 08 July 2003 00:32
> > To: 'Maven Users List'
> > Subject: RE: Sending mail with Maven
> > 
> > I'm currently planning to add mailing support to the junit tests via
> some
> > property and nagEmailAddress. I've done the work, but I'm using a XSL
> for
> > the email that I'm not happy with.
> > 
> > What other mailouts would you be looking for? I don't see any reason
> why
> > we
> > can't send all reports via the mechanism actually - except that you
> don't
> > want to receive them if they were successful.
> > 
> > - Brett
> > 
> > -Original Message-
> > From: Paul Libbrecht [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, 8 July 2003 7:08 AM
> > To: Maven Users List
> > Subject: Re: Sending mail with Maven
> > 
> > 
> > [EMAIL PROTECTED] wrote:
> > > I'm trying to send build notification emails.  I've configured
> > nagEmailAddress
> > > in project.xml.  But I'd like to know what else needs to be done to
> have
> > Maven
> > > send emails.
> > 
> > Don't know if there's anything done for that, grepping through the
> > plugins seems to be using it only for gump and genapp...
> > 
> > It shouldn't be too hard to make a maven.xml goal for that containing
> as
> > prerequisites the goal you intend to run (or something better that
> > ignores failures) and as body something based on the jelly mail
> library.
> > 
> > Hope that helps.
> > 
> > Paul
> > 
> > 
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
jvz.

Jason van Zyl
[EMAIL PROTECTED]
http://tambora.zenplex.org

In short, man creates for himself a new religion of a rational
and technical order to justify his work and to be justified in it.
  
  -- Jacques Ellul, The Technological Society


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sending mail with Maven

2003-07-07 Thread Brett Porter
I think we both have the goal of doing automated integration testing with
Maven :)

Currently I have something in CVS that will allow that to some extent. I
have added a list of failed projects to the reactor and maven:maven so when
you specify ignoreFailures, you can find out what failed and do such
notifications.

However, I haven't been able to capture the output of the reactor, and this
obviously doesn't support just a straight maven execution.

I believe the actually mail out is probably something that goes with the
reports, and the reports should set a flag to indicate their success or
failure (as some reports won't ever fail: eg the CVS based activity
reports). Then, build log should be a report.

I will add the following issues to JIRA, hopefully getting a chance to
implement them myself:
1) add mail out capability to reports
2) add build listener support (like Ant)
3) add report for build listener

How does that sound?

Here is how I think the mail out should work:
1) report element in POM takes a "nag" property - send to nag email address
if true, or specify custom nag email address for that report
2) reports that fail will mail out by default, but can flag "mail on
success", especially for receiving activity reports, for example.
3) default is for all registered reports to mail out on failure only, as
long as nagEmailAddress is set

Cheers,
Brett

-Original Message-
From: Vincent Massol [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 8 July 2003 8:37 AM
To: 'Maven Users List'
Subject: RE: Sending mail with Maven


Hi Brett,

Just some thoughts. Is that something that is best placed in the test
plugin or would it be better placed as either a plugin in itself or as a
build listener (as in Ant)?

More generally, the feature I would be looking for is: "send an email
when the build fails". I think this covers your use case + some others.

Thoughts?

Thanks
-Vincent

> -Original Message-
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2003 00:32
> To: 'Maven Users List'
> Subject: RE: Sending mail with Maven
> 
> I'm currently planning to add mailing support to the junit tests via
some
> property and nagEmailAddress. I've done the work, but I'm using a XSL
for
> the email that I'm not happy with.
> 
> What other mailouts would you be looking for? I don't see any reason
why
> we
> can't send all reports via the mechanism actually - except that you
don't
> want to receive them if they were successful.
> 
> - Brett
> 
> -Original Message-
> From: Paul Libbrecht [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 8 July 2003 7:08 AM
> To: Maven Users List
> Subject: Re: Sending mail with Maven
> 
> 
> [EMAIL PROTECTED] wrote:
> > I'm trying to send build notification emails.  I've configured
> nagEmailAddress
> > in project.xml.  But I'd like to know what else needs to be done to
have
> Maven
> > send emails.
> 
> Don't know if there's anything done for that, grepping through the
> plugins seems to be using it only for gump and genapp...
> 
> It shouldn't be too hard to make a maven.xml goal for that containing
as
> prerequisites the goal you intend to run (or something better that
> ignores failures) and as body something based on the jelly mail
library.
> 
> Hope that helps.
> 
> Paul
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: Sending mail with Maven

2003-07-07 Thread Vincent Massol
Hi Brett,

Just some thoughts. Is that something that is best placed in the test
plugin or would it be better placed as either a plugin in itself or as a
build listener (as in Ant)?

More generally, the feature I would be looking for is: "send an email
when the build fails". I think this covers your use case + some others.

Thoughts?

Thanks
-Vincent

> -Original Message-
> From: Brett Porter [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2003 00:32
> To: 'Maven Users List'
> Subject: RE: Sending mail with Maven
> 
> I'm currently planning to add mailing support to the junit tests via
some
> property and nagEmailAddress. I've done the work, but I'm using a XSL
for
> the email that I'm not happy with.
> 
> What other mailouts would you be looking for? I don't see any reason
why
> we
> can't send all reports via the mechanism actually - except that you
don't
> want to receive them if they were successful.
> 
> - Brett
> 
> -Original Message-
> From: Paul Libbrecht [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 8 July 2003 7:08 AM
> To: Maven Users List
> Subject: Re: Sending mail with Maven
> 
> 
> [EMAIL PROTECTED] wrote:
> > I'm trying to send build notification emails.  I've configured
> nagEmailAddress
> > in project.xml.  But I'd like to know what else needs to be done to
have
> Maven
> > send emails.
> 
> Don't know if there's anything done for that, grepping through the
> plugins seems to be using it only for gump and genapp...
> 
> It shouldn't be too hard to make a maven.xml goal for that containing
as
> prerequisites the goal you intend to run (or something better that
> ignores failures) and as body something based on the jelly mail
library.
> 
> Hope that helps.
> 
> Paul
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Sending mail with Maven

2003-07-07 Thread Brett Porter
I'm currently planning to add mailing support to the junit tests via some
property and nagEmailAddress. I've done the work, but I'm using a XSL for
the email that I'm not happy with.

What other mailouts would you be looking for? I don't see any reason why we
can't send all reports via the mechanism actually - except that you don't
want to receive them if they were successful.

- Brett

-Original Message-
From: Paul Libbrecht [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 8 July 2003 7:08 AM
To: Maven Users List
Subject: Re: Sending mail with Maven


[EMAIL PROTECTED] wrote:
> I'm trying to send build notification emails.  I've configured
nagEmailAddress
> in project.xml.  But I'd like to know what else needs to be done to have
Maven
> send emails.

Don't know if there's anything done for that, grepping through the 
plugins seems to be using it only for gump and genapp...

It shouldn't be too hard to make a maven.xml goal for that containing as 
prerequisites the goal you intend to run (or something better that 
ignores failures) and as body something based on the jelly mail library.

Hope that helps.

Paul


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Sending mail with Maven

2003-07-07 Thread Paul Libbrecht
[EMAIL PROTECTED] wrote:
I'm trying to send build notification emails.  I've configured nagEmailAddress
in project.xml.  But I'd like to know what else needs to be done to have Maven
send emails.
Don't know if there's anything done for that, grepping through the 
plugins seems to be using it only for gump and genapp...

It shouldn't be too hard to make a maven.xml goal for that containing as 
prerequisites the goal you intend to run (or something better that 
ignores failures) and as body something based on the jelly mail library.

Hope that helps.

Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]