brett 2004/04/12 16:02:30 Modified: src/java/org/apache/maven/cli Tag: MAVEN-1_0-BRANCH App.java xdocs Tag: MAVEN-1_0-BRANCH changes.xml Log: PR: MAVEN-1227 Fix newlines in output Revision Changes Path No revision No revision 1.37.4.18 +7 -5 maven/src/java/org/apache/maven/cli/App.java Index: App.java =================================================================== RCS file: /home/cvs/maven/src/java/org/apache/maven/cli/App.java,v retrieving revision 1.37.4.17 retrieving revision 1.37.4.18 diff -u -r1.37.4.17 -r1.37.4.18 --- App.java 4 Apr 2004 02:56:32 -0000 1.37.4.17 +++ App.java 12 Apr 2004 23:02:30 -0000 1.37.4.18 @@ -74,6 +74,9 @@ // C O N S T A N T S // ------------------------------------------------------------ + /** Convenience constant for new line character. */ + private static final String LS = System.getProperty( "line.separator", "\n" ); + /** Default file name for an XML-based POM. */ public static final String POM_FILE_NAME = "project.xml"; @@ -878,7 +881,7 @@ // goal, then we make the plugin description something that // makes clear there is no default goal defined msgPrefix = pluginName - + "] ( NO DEFAULT GOAL )\n" + + "] ( NO DEFAULT GOAL )" + LS + msgPrefix; } else @@ -901,7 +904,7 @@ } else { - msgPrefix = "\n[" + msgPrefix; + msgPrefix = LS + "[" + msgPrefix; } if ( hasDesc ) @@ -1051,7 +1054,6 @@ { BreakIterator bIter = BreakIterator.getWordInstance(); StringBuffer buf = new StringBuffer(); - String newLine = "\n"; String pad = " "; int currentPos = 0; bIter.setText( msg ); @@ -1071,7 +1073,7 @@ // append from the start to currentPos buf.append( msg.substring( 0, currentPos ) ); // start next line - buf.append( newLine ); + buf.append( LS ); //pad with spaces to create indent for ( int i = 0; i != wrapIndent && i < lineWidth; i++ ) No revision No revision 1.14.4.7 +1 -0 maven/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /home/cvs/maven/xdocs/changes.xml,v retrieving revision 1.14.4.6 retrieving revision 1.14.4.7 diff -u -r1.14.4.6 -r1.14.4.7 --- changes.xml 10 Apr 2004 00:53:14 -0000 1.14.4.6 +++ changes.xml 12 Apr 2004 23:02:30 -0000 1.14.4.7 @@ -25,6 +25,7 @@ </properties> <body> <release version="1.0RC3" date="in CVS"> + <action dev="brett" type="fix" issue="MAVEN-1227">use correct new lines in maven -g output</action> <action dev="brett" type="fix" due-to="Shinsuke SUGAYA" issue="MAVEN-1050">Apply patch to use system encoding for project so that xdoc transformation of POM works on non-ISO8859-1 systems.</action> <action dev="brett" type="fix" due-to="David Zeleznik" issue="MAVEN-558">Improve error handling of HttpUtils</action> </release>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]