You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brett Porter <br...@apache.org> on 2005/11/26 00:51:47 UTC

Re: svn commit: r349037 - /maven/maven-1/plugins/trunk/announcement/plugin.jelly

Lukas,

Are you sure this works?

Dotted vars generally get treated as object references when used like
below, I thought, and the blow is actually longer :) maven:get was
really meant to peek and poke other plugins, not itself.

Cheers,
Brett

ltheussl@apache.org wrote:
> Author: ltheussl
> Date: Fri Nov 25 15:46:44 2005
> New Revision: 349037
> 
> URL: http://svn.apache.org/viewcvs?rev=349037&view=rev
> Log:
> Replace context.getVariable by maven:get
> 
> Modified:
>     maven/maven-1/plugins/trunk/announcement/plugin.jelly
> 
> Modified: maven/maven-1/plugins/trunk/announcement/plugin.jelly
> URL: http://svn.apache.org/viewcvs/maven/maven-1/plugins/trunk/announcement/plugin.jelly?rev=349037&r1=349036&r2=349037&view=diff
> ==============================================================================
> --- maven/maven-1/plugins/trunk/announcement/plugin.jelly (original)
> +++ maven/maven-1/plugins/trunk/announcement/plugin.jelly Fri Nov 25 15:46:44 2005
> @@ -42,7 +42,11 @@
>  
>      <!-- If from email address is empty, find the first non empty email 
>           address from the POM. -->
> -    <j:if test="${context.getVariable('maven.announcement.mail.from') == null}">
> +    <maven:get
> +        var="maven.announcement.mail.from"
> +        plugin="maven-announcement-plugin"
> +        property="maven.announcement.mail.from"/>
> +    <j:if test="${maven.announcement.mail.from == null}">
>         <j:forEach var="developer" items="${pom.developers}">
>            <j:if test="${not empty(developer.email)}">
>               <j:set var="maven.announcement.mail.from" value="${developer.email}"/>
> @@ -213,8 +217,12 @@
>        <maven:param-check value="${maven.announcement.mail.to}" fail="true">The To address must be specified using the maven.announcement.mail.to property</maven:param-check> 
>        
>        <!-- Resolve dynamic %% templates from maven.announcement.mail.subject -->
> +      <maven:get
> +        var="maven.announcement.mail.subject"
> +        plugin="maven-announcement-plugin"
> +        property="maven.announcement.mail.subject"/>
>        <j:set var="maven.announcement.mail.subject"
> -          value="${stringUtils.replace(context.getVariable('maven.announcement.mail.subject'), '%VERSION%', versionVariable)}"/>
> +          value="${stringUtils.replace(maven.announcement.mail.subject, '%VERSION%', versionVariable)}"/>
>        
>        <echo>Sending mail using SMTP server "${maven.announcement.mail.server}", client ${maven.announcement.mail.client} and subject "${maven.announcement.mail.subject}"...</echo>
>        <echo>Sending from "${maven.announcement.mail.from}" to "${maven.announcement.mail.to}"...</echo>
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org