You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@continuum.apache.org by Wendy Smoak <ws...@gmail.com> on 2009/02/26 19:25:37 UTC

Re: svn commit: r709300 [2/3] - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/continuum/purge/ continuum-api/src/main/java/org/apache/continuum/taskqueue/ continuum-api/src/main/java

After upgrading to 1.3.x, I'm getting notification emails with the subject line:

[continuum] PREPARE BUILD SUCCESSFUL: ${projectScmRoot.scmRootAddress}

Other than the subject, the notification looks the same as we used to
get for normal scheduled builds.  We did enable parallel builds after
upgrading.  Given that, what would have changed wrt notifications?
What does "PREPARE" mean here?

This seems to be hard coded in MailContinuumNotifier.java, and was
added below in the merge from the transient state branch.  Previously,
the subject was configurable in
        ./apps/continuum/WEB-INF/classes/META-INF/plexus/application.xml
with
        <subject-format>[continuum] BUILD ${state}:
${project.projectGroup.name} - ${project.name} -
${build.buildDefinition.description}</subject-format>
.

It seems like either the projectScmRoot.scmRootAddress is not getting
populated on an upgrade from 1.2.x, or that's not the correct
expression.  In the log files I see a Velocity warning that
subjectPattern ${projectScmRoot.scmRootAddress} is not a valid
reference.

Any ideas?

Thanks,
-- 
Wendy

On Thu, Oct 30, 2008 at 5:01 PM,  <ct...@apache.org> wrote:
...
> Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
> URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?rev=709300&r1=709299&r2=709300&view=diff
> ==============================================================================
> --- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java (original)
> +++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java Thu Oct 30 17:01:38 2008
...
> @@ -489,6 +572,23 @@
>
>         return writer.toString();
>     }
> +
> +    private String generateSubject( ProjectScmRoot projectScmRoot )
> +        throws Exception
> +    {
> +        String state = getState( projectScmRoot );
> +        subjectFormat = "[continuum] PREPARE BUILD ${state}: ${projectScmRoot.scmRootAddress}";
> +
> +        VelocityContext context = new VelocityContext();
> +        context.put( "projectScmRoot", projectScmRoot );
> +        context.put( "state", state );
> +
> +        StringWriter writer = new StringWriter();
> +
> +        boolean velocityResults = velocity.getEngine().evaluate( context, writer, "subjectPattern", subjectFormat );
> +
> +        return writer.toString();
> +    }
>
>     private String getState( Project project, BuildResult build )
>     {
...

Re: svn commit: r709300 [2/3] - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/continuum/purge/ continuum-api/src/main/java/org/apache/continuum/taskqueue/ continuum-api/src/main/java

Posted by Wendy Smoak <ws...@gmail.com>.
On Thu, Feb 26, 2009 at 8:04 PM, Marica Tan <ct...@exist.com> wrote:
> On Fri, Feb 27, 2009 at 2:25 AM, Wendy Smoak <ws...@gmail.com> wrote:
>
>> After upgrading to 1.3.x, I'm getting notification emails with the subject
>> line:
>>
>> [continuum] PREPARE BUILD SUCCESSFUL: ${projectScmRoot.scmRootAddress}
>>
>> Other than the subject, the notification looks the same as we used to
>> get for normal scheduled builds.  We did enable parallel builds after
>> upgrading.  Given that, what would have changed wrt notifications?
>> What does "PREPARE" mean here?
>>
>
> Since i separated the preparation of build ( cleaning of directory, updating
> ) from the actual build, that's what PREPARE means, which now seems
> confusing. Any suggestions?

The notification looked to me like it was for the actual build, not
just for preparing it.  There is still only one notification per
build, correct?

>> This seems to be hard coded in MailContinuumNotifier.java, and was
>> added below in the merge from the transient state branch.  Previously,
>> the subject was configurable in
>>        ./apps/continuum/WEB-INF/classes/META-INF/plexus/application.xml
>> with
>>        <subject-format>[continuum] BUILD ${state}:
>> ${project.projectGroup.name} - ${project.name} -
>> ${build.buildDefinition.description}</subject-format>
>> .
>>
>> It seems like either the projectScmRoot.scmRootAddress is not getting
>> populated on an upgrade from 1.2.x, or that's not the correct
>> expression.  In the log files I see a Velocity warning that
>> subjectPattern ${projectScmRoot.scmRootAddress} is not a valid
>> reference.
>>
>> Any ideas?
>
> Hmm i need to look more into this. Could you create an issue for this ?

Done. http://jira.codehaus.org/browse/CONTINUUM-2102

Thanks,
-- 
Wendy

Re: svn commit: r709300 [2/3] - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/continuum/purge/ continuum-api/src/main/java/org/apache/continuum/taskqueue/ continuum-api/src/main/java

Posted by Marica Tan <ct...@exist.com>.
On Fri, Feb 27, 2009 at 2:25 AM, Wendy Smoak <ws...@gmail.com> wrote:

> After upgrading to 1.3.x, I'm getting notification emails with the subject
> line:
>
> [continuum] PREPARE BUILD SUCCESSFUL: ${projectScmRoot.scmRootAddress}
>
> Other than the subject, the notification looks the same as we used to
> get for normal scheduled builds.  We did enable parallel builds after
> upgrading.  Given that, what would have changed wrt notifications?
> What does "PREPARE" mean here?
>

Since i separated the preparation of build ( cleaning of directory, updating
) from the actual build, that's what PREPARE means, which now seems
confusing. Any suggestions?



> This seems to be hard coded in MailContinuumNotifier.java, and was
> added below in the merge from the transient state branch.  Previously,
> the subject was configurable in
>        ./apps/continuum/WEB-INF/classes/META-INF/plexus/application.xml
> with
>        <subject-format>[continuum] BUILD ${state}:
> ${project.projectGroup.name} - ${project.name} -
> ${build.buildDefinition.description}</subject-format>
> .
>
> It seems like either the projectScmRoot.scmRootAddress is not getting
> populated on an upgrade from 1.2.x, or that's not the correct
> expression.  In the log files I see a Velocity warning that
> subjectPattern ${projectScmRoot.scmRootAddress} is not a valid
> reference.
>
> Any ideas?


Hmm i need to look more into this. Could you create an issue for this ?

Thanks,
--
Marica


>
>
> On Thu, Oct 30, 2008 at 5:01 PM,  <ct...@apache.org> wrote:
> ...
> > Modified:
> continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
> > URL:
> http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?rev=709300&r1=709299&r2=709300&view=diff
> >
> ==============================================================================
> > ---
> continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
> (original)
> > +++
> continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
> Thu Oct 30 17:01:38 2008
> ...
> > @@ -489,6 +572,23 @@
> >
> >         return writer.toString();
> >     }
> > +
> > +    private String generateSubject( ProjectScmRoot projectScmRoot )
> > +        throws Exception
> > +    {
> > +        String state = getState( projectScmRoot );
> > +        subjectFormat = "[continuum] PREPARE BUILD ${state}:
> ${projectScmRoot.scmRootAddress}";
> > +
> > +        VelocityContext context = new VelocityContext();
> > +        context.put( "projectScmRoot", projectScmRoot );
> > +        context.put( "state", state );
> > +
> > +        StringWriter writer = new StringWriter();
> > +
> > +        boolean velocityResults = velocity.getEngine().evaluate(
> context, writer, "subjectPattern", subjectFormat );
> > +
> > +        return writer.toString();
> > +    }
> >
> >     private String getState( Project project, BuildResult build )
> >     {
> ...
>