Fixed line break issue. Thanks to Brett!

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-1/plugins/trunk@114370 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
vmassol committed 2003-11-16 23:29:37 +00:00
1 parent 2cf4140371
commit 5541c75835
2 files changed
+28 -26

No files matched your search

@@ -62,7 +62,7 @@ import java.util.StringTokenizer;
/**
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
*
* @version $Id: Formatter.java,v 1.1 2003/11/16 22:48:57 vmassol Exp $
* @version $Id: Formatter.java,v 1.2 2003/11/16 23:29:37 vmassol Exp $
*/
public class Formatter
{
@@ -81,16 +81,12 @@ public class Formatter
}
else
{
buffer.append('\r');
buffer.append('\n');
strings.add(buffer.toString());
buffer = new StringBuffer();
buffer.append(token);
buffer.append(' ');
}
}
buffer.append('\r');
buffer.append('\n');
strings.add(buffer.toString());
return strings;
}
@@ -18,40 +18,46 @@
<j:set var="header" value="The Maven team is pleased to announce the ${pom.name} ${versionVariable} release!"/>
<j:set var="formattedHeader" value="${formatter.format(header,78)}"/>
<!-- TODO: Find out why brackets are added -->
<j:expr value="${formattedHeader}"/>
<!-- TODO: Need line break here -->
<j:expr value="${pom.url}"/>
<j:whitespace trim="false">${formattedHeader}
<!-- TODO: Need line break here -->
${pom.url}
<j:expr value="Changes in this version include (last changes first):"/>
Changes in this version include (last changes first):
</j:whitespace>
<x:forEach var="action" select="action">
<x:set var="text" select="string($action)"/>
<j:expr value="o "/>
<j:set var="counter" value=""/>
<j:forEach var="line" items="${formatter.format(text,75)}">
<!-- TODO: Need to add 3 spaces on second line and thereafter -->
<j:expr value="${line}"/>
<j:choose>
<j:when test="${counter.length() == '0'}">
<j:whitespace trim="false">
o ${line}</j:whitespace>
</j:when>
<j:otherwise>
<j:whitespace trim="false">
${line}</j:whitespace>
</j:otherwise>
</j:choose>
<!-- TODO: Add reference to issue number if there's any -->
<j:set var="counter" value="${counter}X"/>
</j:forEach>
</x:forEach>
<!-- TODO: Need line break here -->
<j:whitespace trim="false">
This plugin has been tested with Maven [TODO]. Using it with
another version of Maven is at your own risks! :-)
<j:expr value="This plugin has been tested with Maven [TODO]. Using it with"/>
<j:expr value="another version of Maven is at your own risks! :-)"/>
You can download the ${pom.name} here:
${maven.repo.remote}/${pom.groupId}/jars/${pom.artifactId}-${versionVariable}.jar
<!-- TODO: Need line break here -->
<j:expr value="You can download the ${pom.name} here:"/>
<j:expr value="${maven.repo.remote}/${pom.groupId}/jars/${pom.artifactId}-${versionVariable}.jar"/>
<!-- TODO: Need line break here -->
<j:expr value="Have fun!"/>
<j:expr value="-The development team"/>
Have fun!
-The development team
</j:whitespace>
</j:if>