I was thinking about this thread: http://www.mail-archive.com/[email protected]/msg44176.html
and thought I'd be on the safer side with maven:get. I didn't know about the problem with dots, I'll revert my commit.
Thanks for the watch-out! -Lukas Arnaud HERITIER wrote:
In theory if you are reading properties in the current plugin you don't need to use maven:get You can access to them with ${my.property} But be careful it works only with properties for the current plugin If you need to create a new variable in your script you musn't use dots (.) in its name. Arnaud On 11/26/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
