From commitshowellcaitlin@example.net Thu Nov 01 06:37:28 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 83028 invoked from network); 1 Nov 2007 06:37:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 06:37:28 -0000 Received: (qmail 82471 invoked by uid 500); 1 Nov 2007 06:37:15 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 82407 invoked by uid 500); 1 Nov 2007 06:37:15 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 82392 invoked by uid 99); 1 Nov 2007 06:37:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 31 Oct 2007 23:37:15 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 06:37:27 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C43F61A9832; Wed, 31 Oct 2007 23:37:06 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r590913 - /maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml Date: Thu, 01 Nov 2007 06:37:06 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Wed Oct 31 23:37:05 2007 New Revision: 590913 URL: http://svn.apache.org/viewvc?rev=590913&view=rev Log: [MINSTALL-44] fixed svn props to binary to avoid file encoding corruption since it is in UTF-16 Modified: maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml (props changed) Propchange: maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream From commitshowellcaitlin@example.net Thu Nov 01 09:11:38 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 36133 invoked from network); 1 Nov 2007 09:11:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 09:11:38 -0000 Received: (qmail 89840 invoked by uid 500); 1 Nov 2007 09:11:25 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 89795 invoked by uid 500); 1 Nov 2007 09:11:25 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 89782 invoked by uid 99); 1 Nov 2007 09:11:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 02:11:25 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 09:11:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BC23B1A9832; Thu, 1 Nov 2007 02:11:16 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r590940 - /maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml Date: Thu, 01 Nov 2007 09:11:16 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Thu Nov 1 02:11:15 2007 New Revision: 590940 URL: http://svn.apache.org/viewvc?rev=590940&view=rev Log: [MINSTALL-44] removed character at the end of the file which causes problem Modified: maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml Modified: maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-install-plugin/src/test/resources/unit/install-file-with-pomFile-test/plugin-config.xml?rev=590940&r1=590939&r2=590940&view=diff ============================================================================== Binary files - no diff available. From commitshowellcaitlin@example.net Thu Nov 01 12:15:26 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 92561 invoked from network); 1 Nov 2007 12:15:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 12:15:25 -0000 Received: (qmail 95112 invoked by uid 500); 1 Nov 2007 12:15:12 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 95054 invoked by uid 500); 1 Nov 2007 12:15:12 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 95041 invoked by uid 99); 1 Nov 2007 12:15:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 05:15:12 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 12:15:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7DCE91A9832; Thu, 1 Nov 2007 05:14:53 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r590973 - in /maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src: main/java/org/apache/maven/jxr/util/DotTask.java test/java/org/apache/maven/jxr/util/DotTaskTest.java Date: Thu, 01 Nov 2007 12:14:52 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vsiveton Date: Thu Nov 1 05:14:51 2007 New Revision: 590973 URL: http://svn.apache.org/viewvc?rev=590973&view=rev Log: o make DEFAULT_OUTPUT_FORMAT protected for tests Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/main/java/org/apache/maven/jxr/util/DotTask.java maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/test/java/org/apache/maven/jxr/util/DotTaskTest.java Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/main/java/org/apache/maven/jxr/util/DotTask.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/main/java/org/apache/maven/jxr/util/DotTask.java?rev=590973&r1=590972&r2=590973&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/main/java/org/apache/maven/jxr/util/DotTask.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/main/java/org/apache/maven/jxr/util/DotTask.java Thu Nov 1 05:14:51 2007 @@ -44,13 +44,13 @@ /** Windows Graphviz download URL **/ public static final String GRAPHVIZ_WINDOWS_URL = "http://www.graphviz.org/pub/graphviz/ARCHIVE/graphviz-win-2.14.1.bin.tar.gz"; + protected static final String DEFAULT_OUTPUT_FORMAT = "svg"; + private static final String TARGZ = GRAPHVIZ_WINDOWS_URL.substring( GRAPHVIZ_WINDOWS_URL.lastIndexOf( '/' ) + 1 ); private static final String TAR = TARGZ.substring( 0, TARGZ.lastIndexOf( '.' ) ); private static final String GRAPHVIZ_DIR = "graphviz-2.14.1"; // inside the tar.gz - - private static final String DEFAULT_OUTPUT_FORMAT = "png"; /** The dot executable. */ private File dotExe; Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/test/java/org/apache/maven/jxr/util/DotTaskTest.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/test/java/org/apache/maven/jxr/util/DotTaskTest.java?rev=590973&r1=590972&r2=590973&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/test/java/org/apache/maven/jxr/util/DotTaskTest.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-utils/src/test/java/org/apache/maven/jxr/util/DotTaskTest.java Thu Nov 1 05:14:51 2007 @@ -75,7 +75,7 @@ } // Generated files - File generated = new File( out, "target.dot.png" ); + File generated = new File( out, "target.dot." + DotTask.DEFAULT_OUTPUT_FORMAT ); assertTrue( generated.exists() ); assertTrue( generated.length() > 0 ); } @@ -122,7 +122,7 @@ } // Generated files - File generated = new File( out, "graph.dot.svg" ); + File generated = new File( out, "graph.dot." + DotTask.DEFAULT_OUTPUT_FORMAT ); assertFalse( generated.exists() ); assertFalse( generated.length() > 0 ); } From commitshowellcaitlin@example.net Thu Nov 01 12:55:48 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 9614 invoked from network); 1 Nov 2007 12:55:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 12:55:48 -0000 Received: (qmail 42026 invoked by uid 500); 1 Nov 2007 12:55:35 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 41979 invoked by uid 500); 1 Nov 2007 12:55:35 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 41966 invoked by uid 99); 1 Nov 2007 12:55:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 05:55:35 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 12:56:02 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 96DB11A9832; Thu, 1 Nov 2007 05:55:23 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r590985 - /maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java Date: Thu, 01 Nov 2007 12:55:23 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vsiveton Date: Thu Nov 1 05:55:22 2007 New Revision: 590985 URL: http://svn.apache.org/viewvc?rev=590985&view=rev Log: o added -xmlencoding doclet option Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java?rev=590985&r1=590984&r2=590985&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java Thu Nov 1 05:55:22 2007 @@ -66,9 +66,12 @@ */ public static final String XMLDOCLET_DTD = "javadoc-v04draft.dtd"; - private String xmlns = ""; + private static final String USAGE = "Usage: javadoc <-xmlencoding ISO-8859-1> " + + "-o /path/to/generatedXmlFile -doclet org.apache.maven.jxr.java.doc.XMLDoclet ..."; + + private static final String DEFAULT_ENCODING_FORMAT = "ISO-8859-1"; - private String encodingFormat = "ISO-8859-1"; + private String xmlns = ""; private String localName = "javadoc"; @@ -81,9 +84,10 @@ * * @param root of the Javadoc structure information * @param outputXML the XML file generated by this doclet. + * @param xmlencoding the encoding for the XML file generated by this doclet. * @throws Exception if any */ - protected XMLDoclet( RootDoc root, String outputXML ) + protected XMLDoclet( RootDoc root, String outputXML, String xmlencoding ) throws Exception { SAXTransformerFactory tFactory = (SAXTransformerFactory) TransformerFactory.newInstance(); @@ -106,8 +110,10 @@ handler = tFactory.newTransformerHandler(); Transformer serializer = handler.getTransformer(); - serializer.setOutputProperty( OutputKeys.ENCODING, encodingFormat ); + serializer.setOutputProperty( OutputKeys.ENCODING, ( xmlencoding == null ? DEFAULT_ENCODING_FORMAT + : xmlencoding ) ); serializer.setOutputProperty( OutputKeys.INDENT, "yes" ); + serializer.setOutputProperty( OutputKeys.METHOD, "xml" ); serializer.setOutputProperty( OutputKeys.DOCTYPE_PUBLIC, "-//APACHE//DTD JavaDoc V0.4//EN" ); serializer.setOutputProperty( OutputKeys.DOCTYPE_SYSTEM, XMLDOCLET_DTD ); @@ -137,8 +143,7 @@ String outputXML = opt[1]; if ( outputXML == null || outputXML.length() == 0 ) { - reporter - .printError( "Usage: javadoc -o /path/to/generatedXmlFile -doclet org.apache.maven.jxr.java.doc.XMLDoclet ..." ); + reporter.printError( USAGE ); return false; } File outputXMLFile = new File( outputXML ); @@ -155,12 +160,29 @@ foundOutputDirOption = true; } + boolean foundEncodingOption = false; + if ( opt[0].equals( "-xmlencoding" ) ) + { + if ( foundEncodingOption ) + { + reporter.printError( "Only one -xmlencoding option allowed." ); + return false; + } + + String xmlEncodingOption = opt[1]; + if ( xmlEncodingOption == null || xmlEncodingOption.length() == 0 ) + { + reporter.printError( USAGE ); + return false; + } + + foundEncodingOption = true; + } } if ( !foundOutputDirOption ) { - reporter - .printError( "Usage: javadoc -o /path/to/generatedXmlFile -doclet org.apache.maven.jxr.java.doc.XMLDoclet ..." ); + reporter.printError( USAGE ); return false; } @@ -170,8 +192,16 @@ /** @see Doclet#optionLength(String) */ public static int optionLength( String option ) { - // -o generatedXmlFile - return 2; + option = option.toLowerCase(); + if ( option.equals( "-o" ) ) + { + return 2; + } + if ( option.equals( "-xmlencoding" ) ) + { + return 2; + } + return -1; } /** @see Doclet#start(RootDoc) */ @@ -179,7 +209,7 @@ { try { - new XMLDoclet( root, getOutputDir( root.options() ) ); + new XMLDoclet( root, getOutputDir( root.options() ), getXmlEncoding( root.options() ) ); } catch ( Exception e ) { @@ -206,6 +236,20 @@ } throw new IllegalArgumentException( "No output option specified." ); + } + + private static String getXmlEncoding( String[][] options ) + { + for ( int i = 0; i < options.length; i++ ) + { + String[] opt = options[i]; + if ( opt[0].equals( "-xmlencoding" ) ) + { + return opt[1]; + } + } + + return null; } /** From commitshowellcaitlin@example.net Thu Nov 01 13:10:18 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 13147 invoked from network); 1 Nov 2007 13:10:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 13:10:18 -0000 Received: (qmail 60089 invoked by uid 500); 1 Nov 2007 13:10:05 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 60038 invoked by uid 500); 1 Nov 2007 13:10:05 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 60025 invoked by uid 99); 1 Nov 2007 13:10:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 06:10:05 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 13:10:17 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 17D2F1A9832; Thu, 1 Nov 2007 06:09:55 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r590989 - in /maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src: main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java test/java/org/apache/maven/jxr/java/doc/XMLDocletTest.java Date: Thu, 01 Nov 2007 13:09:54 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vsiveton Date: Thu Nov 1 06:09:53 2007 New Revision: 590989 URL: http://svn.apache.org/viewvc?rev=590989&view=rev Log: o updated test cases and javadoc Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/XMLDocletTest.java Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java?rev=590989&r1=590988&r2=590989&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/XMLDoclet.java Thu Nov 1 06:09:53 2007 @@ -61,15 +61,15 @@ public class XMLDoclet extends Doclet { - /** - * The specified DTD for the generated Javadoc XML. - */ + /** The specified DTD for the generated Javadoc XML. */ public static final String XMLDOCLET_DTD = "javadoc-v04draft.dtd"; - private static final String USAGE = "Usage: javadoc <-xmlencoding ISO-8859-1> " + /** The Doclet usage. */ + protected static final String USAGE = "Usage: javadoc <-xmlencoding ISO-8859-1> " + "-o /path/to/generatedXmlFile -doclet org.apache.maven.jxr.java.doc.XMLDoclet ..."; - private static final String DEFAULT_ENCODING_FORMAT = "ISO-8859-1"; + /** Default encoding format for the generated XML. */ + protected static final String DEFAULT_ENCODING_FORMAT = "ISO-8859-1"; private String xmlns = ""; Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/XMLDocletTest.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/XMLDocletTest.java?rev=590989&r1=590988&r2=590989&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/XMLDocletTest.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/XMLDocletTest.java Thu Nov 1 06:09:53 2007 @@ -20,6 +20,8 @@ */ import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; import java.io.PrintWriter; import java.io.StringWriter; import java.util.Iterator; @@ -29,6 +31,7 @@ import junit.framework.TestCase; import org.codehaus.plexus.util.FileUtils; +import org.codehaus.plexus.util.IOUtil; import org.codehaus.plexus.util.StringUtils; import com.sun.tools.javadoc.Main; @@ -62,25 +65,80 @@ args.add( "-package" ); args.add( "-sourcepath" ); args.add( srcDir.getAbsolutePath() ); + args.add( "-xmlencoding" ); + args.add( "UTF-8" ); args.add( "-o" ); args.add( outputXML.getAbsolutePath() ); - List packages = FileUtils.getDirectoryNames( srcDir, null, DEFAULT_EXCLUDES, false ); - for ( Iterator it = packages.iterator(); it.hasNext(); ) - { - String p = (String) it.next(); - if ( StringUtils.isEmpty( p ) ) - { - continue; - } + addPackages( args, srcDir ); - if ( FileUtils.getFileNames( new File( srcDir, p ), "*.java", "", false ).isEmpty() ) - { - continue; - } + StringWriter err = new StringWriter(); + StringWriter warn = new StringWriter(); + StringWriter notice = new StringWriter(); + int exit = Main.execute( "javadoc", new PrintWriter( err ), new PrintWriter( warn ), new PrintWriter( notice ), + XMLDoclet.class.getName(), (String[]) args.toArray( new String[0] ) ); - args.add( StringUtils.replace( p, File.separator, "." ) ); - } + assertEquals( err.toString(), exit, 0 ); + + // Generated files + assertTrue( outputXML.exists() ); + assertTrue( outputXML.length() > 0 ); + String content = IOUtil.toString( new FileInputStream( outputXML ) ); + assertTrue( content.indexOf( "\"UTF-8\"" ) != -1 ); + File dtd = new File( BASEDIR, "target/unit/xmldoclet-default/" + XMLDoclet.XMLDOCLET_DTD ); + assertTrue( dtd.exists() ); + assertTrue( dtd.length() > 0 ); + } + + /** + * Call Javadoc tool with XML doclet without out option. + * + * @throws Exception if any + */ + public void testMissingOptionsExecute() + throws Exception + { + File srcDir = new File( BASEDIR, "src/test/resources/javasrc" ); + + // test phase is after compile phase, so we are sure that classes dir exists + List args = new LinkedList(); + args.add( "-package" ); + args.add( "-sourcepath" ); + args.add( srcDir.getAbsolutePath() ); + + addPackages( args, srcDir ); + + StringWriter err = new StringWriter(); + StringWriter warn = new StringWriter(); + StringWriter notice = new StringWriter(); + int exit = Main.execute( "javadoc", new PrintWriter( err ), new PrintWriter( warn ), new PrintWriter( notice ), + XMLDoclet.class.getName(), (String[]) args.toArray( new String[0] ) ); + + assertEquals( err.toString(), exit, 1 ); + assertTrue( err.toString().indexOf( XMLDoclet.USAGE ) != -1 ); + } + + /** + * Call Javadoc tool with XML doclet and non mandatory option. + * + * @throws Exception if any + */ + public void testNonMandatoryOptionExecute() + throws Exception + { + File srcDir = new File( BASEDIR, "src/test/resources/javasrc" ); + + File outputXML = new File( BASEDIR, "target/unit/xmldoclet-default/javadoc.xml" ); + + // test phase is after compile phase, so we are sure that classes dir exists + List args = new LinkedList(); + args.add( "-package" ); + args.add( "-sourcepath" ); + args.add( srcDir.getAbsolutePath() ); + args.add( "-o" ); + args.add( outputXML.getAbsolutePath() ); + + addPackages( args, srcDir ); StringWriter err = new StringWriter(); StringWriter warn = new StringWriter(); @@ -93,8 +151,32 @@ // Generated files assertTrue( outputXML.exists() ); assertTrue( outputXML.length() > 0 ); + String content = IOUtil.toString( new FileInputStream( outputXML ) ); + assertTrue( content.indexOf( "\"" + XMLDoclet.DEFAULT_ENCODING_FORMAT + "\"" ) != -1 ); File dtd = new File( BASEDIR, "target/unit/xmldoclet-default/" + XMLDoclet.XMLDOCLET_DTD ); assertTrue( dtd.exists() ); assertTrue( dtd.length() > 0 ); + } + + private void addPackages( List args, File srcDir ) + throws IOException + { + List packages = FileUtils.getDirectoryNames( srcDir, null, DEFAULT_EXCLUDES, false ); + for ( Iterator it = packages.iterator(); it.hasNext(); ) + { + String p = (String) it.next(); + + if ( StringUtils.isEmpty( p ) ) + { + continue; + } + + if ( FileUtils.getFileNames( new File( srcDir, p ), "*.java", "", false ).isEmpty() ) + { + continue; + } + + args.add( StringUtils.replace( p, File.separator, "." ) ); + } } } From commitshowellcaitlin@example.net Thu Nov 01 13:29:25 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 17707 invoked from network); 1 Nov 2007 13:29:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 13:29:25 -0000 Received: (qmail 93664 invoked by uid 500); 1 Nov 2007 13:29:12 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 93617 invoked by uid 500); 1 Nov 2007 13:29:12 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 93604 invoked by uid 99); 1 Nov 2007 13:29:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 06:29:12 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 13:29:12 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 57E611A9832; Thu, 1 Nov 2007 06:28:52 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r590997 - in /maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src: main/java/org/apache/maven/jxr/java/doc/ main/resources/org/apache/maven/jxr/java/doc/ test/java/org/apache/maven/jxr/java/doc/ Date: Thu, 01 Nov 2007 13:28:51 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: vsiveton Date: Thu Nov 1 06:28:51 2007 New Revision: 590997 URL: http://svn.apache.org/viewvc?rev=590997&view=rev Log: o improved the generated UML class diagram o added xsl parameters: - show for the visibility of attributes and operations - javasrcPath to link to xref dir - javadocPath to link to javadoc dir - diagramLabel - diagramEncoding o updated test cases Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/resources/org/apache/maven/jxr/java/doc/xml2dot.xsl maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/UmlDocTaskTest.java Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java?rev=590997&r1=590996&r2=590997&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/GenerateUMLDoc.java Thu Nov 1 06:28:51 2007 @@ -31,6 +31,8 @@ import java.util.List; import java.util.TimeZone; +import javax.xml.transform.OutputKeys; + import org.apache.maven.jxr.util.DotTask; import org.apache.maven.jxr.util.DotTask.DotNotPresentInPathBuildException; import org.apache.tools.ant.BuildException; @@ -53,21 +55,53 @@ */ public class GenerateUMLDoc { + private static final String NOW = new GregorianCalendar( TimeZone.getDefault() ).getTime().toString(); + /** Source directory */ private File srcDir; + /** Source file encoding name, ISO-8859-1 is the default. */ + private String encoding = "ISO-8859-1"; + /** Output file of the diagram */ private File out; - /** Temp javadoc xml file */ - private File javadocXml; + /** The class diagram encoding, ISO-8859-1 is the default. */ + private String diagramEncoding = "ISO-8859-1"; + + /** The class diagram label */ + private String diagramLabel = "Class Diagram (Generated by Maven on " + NOW + ")"; + + /** Relative path or URI to the generated Javadoc directory. */ + private String javadocPath = ""; - /** Temp xsl file */ + /** Relative path or URI to the generated Java Xref directory. */ + private String javasrcPath = ""; + + /** Temp XSL file. */ private File xml2dot; + /** Temp javadoc xml file */ + private File javadocXml; + /** Temp generated dot file */ private File dot; + /** + * Specifies the access level for classes and members to show in the generated class diagram. + * Possible values are: + * <ul> + * <li>public: shows only public classes and members</li> + * <li>protected: shows only public and protected classes and members</li> + * <li>package: shows all classes and members not marked private</li> + * <li>private: shows all classes and members</li> + * <li>"" (i.e. empty): nothing</li> + * </ul> + * + * Default value is protected. + */ + private String show = "protected"; + /** Specify verbose information */ private boolean verbose; @@ -128,6 +162,56 @@ } /** + * Getter for the diagramEncoding + * + * @return the diagramEncoding + */ + public String getDiagramEncoding() + { + return this.diagramEncoding; + } + + /** + * Getter for the diagramLabel + * + * @return the diagramLabel + */ + public String getDiagramLabel() + { + return this.diagramLabel; + } + + /** + * Getter for the encoding + * + * @return the encoding + */ + public String getEncoding() + { + return this.encoding; + } + + /** + * Getter for the javadocPath + * + * @return the relative path or URI to the generated javadoc directory + */ + public String getJavadocPath() + { + return this.javadocPath; + } + + /** + * Getter for the javasrcPath + * + * @return the relative path or URI to the generated javasrc directory + */ + public String getJavasrcPath() + { + return this.javasrcPath; + } + + /** * Getter for the destDir * * @return the destDir @@ -138,6 +222,23 @@ } /** + * Getter for the show. Possible values are: + * <ul> + * <li>public: shows only public classes and members</li> + * <li>protected: shows only public and protected classes and members</li> + * <li>package: shows all classes and members not marked private</li> + * <li>private: shows all classes and members</li> + * <li>"" (i.e. empty): nothing</li> + * </ul> + * + * @return the show + */ + public String getShow() + { + return this.show; + } + + /** * Getter for the srcDir * * @return the srcDir @@ -158,6 +259,56 @@ } /** + * Setter for the diagramEncoding + * + * @param diagramEncoding the diagramEncoding to set + */ + public void setDiagramEncoding( String diagramEncoding ) + { + this.diagramEncoding = diagramEncoding; + } + + /** + * Setter for the diagramLabel + * + * @param diagramLabel the diagramLabel to set + */ + public void setDiagramLabel( String diagramLabel ) + { + this.diagramLabel = diagramLabel; + } + + /** + * Setter for the encoding + * + * @param encoding the encoding to set + */ + public void setEncoding( String encoding ) + { + this.encoding = encoding; + } + + /** + * Setter for the javadocPath + * + * @param javadocPath the relative path or URI to the generated javadoc directory + */ + public void setJavadocPath( String javadocPath ) + { + this.javadocPath = javadocPath; + } + + /** + * Setter for the javasrcPath + * + * @param javasrcPath the relative path or URI to the generated javasrc directory + */ + public void setJavasrcPath( String javasrcPath ) + { + this.javasrcPath = javasrcPath; + } + + /** * Setter for the destDir * * @param destDir the destDir to set @@ -168,6 +319,23 @@ } /** + * Setter for the show. Possible values are: + * <ul> + * <li>public: shows only public classes and members</li> + * <li>protected: shows only public and protected classes and members</li> + * <li>package: shows all classes and members not marked private</li> + * <li>private: shows all classes and members</li> + * <li>"" (i.e. empty): nothing</li> + * </ul> + * + * @param show the show to set + */ + public void setShow( String show ) + { + this.show = show; + } + + /** * Setter for the srcDir * * @param srcDir the srcDir to set @@ -198,7 +366,8 @@ { if ( this.javadocXml == null ) { - this.javadocXml = new File( getOut().getParentFile(), "javadoc.xml" ); + this.javadocXml = new File( getOut().getParentFile(), FileUtils.removeExtension( getOut().getName() ) + + ".javadoc.xml" ); if ( !isVerbose() ) { this.javadocXml.deleteOnExit(); @@ -215,7 +384,8 @@ { if ( this.dot == null ) { - this.dot = new File( getOut().getParentFile(), "javadoc.dot" ); + this.dot = new File( getOut().getParentFile(), FileUtils.removeExtension( getOut().getName() ) + + ".javadoc.dot" ); if ( !isVerbose() ) { this.dot.deleteOnExit(); @@ -237,7 +407,7 @@ } /** - * @return xsl temp file. + * @return the xml2dot XSL file. * @throws IOException if any */ private File getXml2dot() @@ -245,7 +415,8 @@ { if ( this.xml2dot == null ) { - this.xml2dot = new File( getOut().getParentFile(), "xml2dot.xsl" ); + this.xml2dot = new File( getOut().getParentFile(), FileUtils.removeExtension( getOut().getName() ) + + ".xml2dot.xsl" ); if ( !isVerbose() ) { this.xml2dot.deleteOnExit(); @@ -284,9 +455,16 @@ + "**/.cvsignore,**/SCCS,**/SCCS/**,**/vssver.scc,**/.svn,**/.svn/**,**/.DS_Store"; List args = new LinkedList(); - args.add( "-package" ); + args.add( "-private" ); args.add( "-sourcepath" ); args.add( srcDir.getAbsolutePath() ); + if ( StringUtils.isNotEmpty( getEncoding() ) ) + { + args.add( "-encoding" ); + args.add( getEncoding() ); + args.add( "-xmlencoding" ); + args.add( getEncoding() ); + } args.add( "-o" ); args.add( getJavadocXml().getAbsolutePath() ); List packages = FileUtils.getDirectoryNames( srcDir, null, defaultExcludes, false ); @@ -328,8 +506,6 @@ private void generateJavadocDot() throws BuildException, IOException { - String now = new GregorianCalendar( TimeZone.getDefault() ).getTime().toString(); - XSLTProcess xsltTask = new XSLTProcess(); xsltTask.setProject( getAntProject() ); xsltTask.setTaskName( "xslt" ); @@ -337,10 +513,44 @@ xsltTask.setIn( getJavadocXml() ); xsltTask.setOut( getDot() ); xsltTask.setStyle( getXml2dot().getAbsolutePath() ); + + if ( StringUtils.isNotEmpty( getDiagramEncoding() ) ) + { + XSLTProcess.OutputProperty prop = xsltTask.createOutputProperty(); + prop.setName( OutputKeys.ENCODING ); + prop.setValue( getDiagramEncoding() ); + } + Param param = xsltTask.createParam(); param.setProject( getAntProject() ); param.setName( "now" ); - param.setExpression( now ); + param.setExpression( NOW ); + + param = xsltTask.createParam(); + param.setProject( getAntProject() ); + param.setName( "diagramEncoding" ); + param.setExpression( ( getDiagramEncoding() == null ? "" : getDiagramEncoding() ) ); + + param = xsltTask.createParam(); + param.setProject( getAntProject() ); + param.setName( "show" ); + param.setExpression( ( getShow() == null ? "" : getShow() ) ); + + param = xsltTask.createParam(); + param.setProject( getAntProject() ); + param.setName( "javasrcPath" ); + param.setExpression( ( getJavasrcPath() == null ? "" : getJavasrcPath() ) ); + + param = xsltTask.createParam(); + param.setProject( getAntProject() ); + param.setName( "javadocPath" ); + param.setExpression( ( getJavadocPath() == null ? "" : getJavadocPath() ) ); + + param = xsltTask.createParam(); + param.setProject( getAntProject() ); + param.setName( "diagramLabel" ); + param.setExpression( ( getDiagramLabel() == null ? "" : getDiagramLabel() ) ); + xsltTask.execute(); } @@ -361,7 +571,7 @@ } else { - format = "png"; + format = "svg"; } DotTask dotTask = new DotTask(); Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java?rev=590997&r1=590996&r2=590997&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/java/org/apache/maven/jxr/java/doc/UmlDocTask.java Thu Nov 1 06:28:51 2007 @@ -26,6 +26,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; +import org.codehaus.plexus.util.StringUtils; /** * <a href="http://ant.apache.org/">Ant</a> task to generate UML diagram. @@ -44,6 +45,36 @@ /** Output file of the diagram*/ private File out; + /** Source file encoding name. */ + private String encoding; + + /** + * Specifies the access level for classes and members to show in the generated class diagram. + * Possible values are: + * <ul> + * <li>public: shows only public classes and members</li> + * <li>protected: shows only public and protected classes and members</li> + * <li>package: shows all classes and members not marked private</li> + * <li>private: shows all classes and members</li> + * <li>"" (i.e. empty): nothing</li> + * </ul> + * + * Default value is protected. + */ + private String show; + + /** Relative path or URI to the generated Javadoc directory. */ + private String javadocPath; + + /** Relative path or URI to the generated Java Xref directory. */ + private String javasrcPath; + + /** The class diagram encoding. */ + private String diagramEncoding; + + /** The class diagram label */ + private String diagramLabel; + /** Specify verbose information */ private boolean verbose; @@ -51,13 +82,63 @@ private boolean failOnError; /** - * Set the Java source directory. + * Set fail on an error. * - * @param d Path to the directory. + * @param b true to fail on an error. */ - public void setSrcDir( File d ) + public void setFailonerror( boolean b ) { - this.srcDir = d; + this.failOnError = b; + } + + /** + * Set the class diagram encoding. + * + * @param diagramEncoding the class diagram encoding. + */ + public void setDiagramEncoding( String diagramEncoding ) + { + this.diagramEncoding = diagramEncoding; + } + + /** + * Set the class diagram label. + * + * @param diagramLabel the class diagram label. + */ + public void setDiagramLabel( String diagramLabel ) + { + this.diagramLabel = diagramLabel; + } + + /** + * Set the source file encoding name. + * + * @param encoding the source file encoding name. + */ + public void setEncoding( String encoding ) + { + this.encoding = encoding; + } + + /** + * Set the generated Javadoc directory. + * + * @param javadocPath the relative path or URI to the generated javadoc directory + */ + public void setJavadocPath( String javadocPath ) + { + this.javadocPath = javadocPath; + } + + /** + * Set the generated JavaSrc source directory. + * + * @param javasrcPath the relative path or URI to the generated javasrc directory + */ + public void setJavasrcPath( String javasrcPath ) + { + this.javasrcPath = javasrcPath; } /** @@ -71,23 +152,40 @@ } /** - * Setter for the verbose + * Set the access level for classes and members. Possible values are: + * <ul> + * <li>public: shows only public classes and members</li> + * <li>protected: shows only public and protected classes and members</li> + * <li>package: shows all classes and members not marked private</li> + * <li>private: shows all classes and members</li> + * <li>"" (i.e. empty): nothing</li> + * </ul> * - * @param verbose the verbose to set + * @param show new access level. */ - public void setVerbose( boolean verbose ) + public void setShow( String show ) { - this.verbose = verbose; + this.show = show; } /** - * Set fail on an error. + * Set the Java source directory. * - * @param b true to fail on an error. + * @param d Path to the directory. */ - public void setFailonerror( boolean b ) + public void setSrcDir( File d ) { - this.failOnError = b; + this.srcDir = d; + } + + /** + * Setter for the verbose + * + * @param verbose the verbose to set + */ + public void setVerbose( boolean verbose ) + { + this.verbose = verbose; } /** {@inheritDoc} */ @@ -116,7 +214,31 @@ try { GenerateUMLDoc generator = new GenerateUMLDoc( getSrcDir(), getOut() ); + if ( StringUtils.isNotEmpty( this.encoding ) ) + { + generator.setEncoding( this.encoding ); + } generator.setVerbose( this.verbose ); + if ( this.show != null ) + { + generator.setShow( this.show ); + } + if ( StringUtils.isNotEmpty( this.javadocPath ) ) + { + generator.setJavadocPath( this.javadocPath ); + } + if ( StringUtils.isNotEmpty( this.javasrcPath ) ) + { + generator.setJavasrcPath( this.javasrcPath ); + } + if ( StringUtils.isNotEmpty( this.diagramEncoding ) ) + { + generator.setDiagramEncoding( this.diagramEncoding ); + } + if ( StringUtils.isNotEmpty( this.diagramLabel ) ) + { + generator.setDiagramLabel( this.diagramLabel ); + } generator.generateUML(); } catch ( IllegalArgumentException e ) Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/resources/org/apache/maven/jxr/java/doc/xml2dot.xsl URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/resources/org/apache/maven/jxr/java/doc/xml2dot.xsl?rev=590997&r1=590996&r2=590997&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/resources/org/apache/maven/jxr/java/doc/xml2dot.xsl (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/main/resources/org/apache/maven/jxr/java/doc/xml2dot.xsl Thu Nov 1 06:28:51 2007 @@ -19,21 +19,61 @@ <xsl:output method="text" omit-xml-declaration="yes"/> <xsl:param name="now"/> + <!-- + show="public" Show only public classes and members + show="protected" Show protected/public classes and members (default) + show="package" Show package/protected/public classes and members + show="private" Show all classes and members + show="" Show nothing + --> + <xsl:param name="show"/> + <!-- + javasrcPath Relative path or URI to the generated Java Xref directory. + --> + <xsl:param name="javasrcPath"/> + <!-- + javadocPath Relative path or URI to the generated Javadoc directory. + --> + <xsl:param name="javadocPath"/> + <!-- + diagramLabel The label of the generated class diagram. + --> + <xsl:param name="diagramLabel"/> + <!-- + diagramEncoding The encoding of the generated class diagram. + --> + <xsl:param name="diagramEncoding"/> <xsl:template match="javadoc"> <xsl:text># -# Class Diagram - Generated by Maven JXR on </xsl:text><xsl:value-of select="$now"/><xsl:text> +# Class Diagram - Generated by Maven xml2dot on </xsl:text><xsl:value-of select="$now"/><xsl:text> # # @see http://www.graphviz.org/doc/libguide/libguide.pdf # digraph G { - // global settings + // global settings</xsl:text> + <xsl:if test="$diagramEncoding != ''"> + <xsl:text> + charset = "</xsl:text> + <xsl:value-of select="$diagramEncoding"/> + <xsl:text>";</xsl:text> + </xsl:if> + <xsl:text> ranksep = "1.5"; rankdir = "TB"; - labeljust = "left"; + labeljust = "center"; labelloc = "bottom"; - label = "Class Diagram"; + label = "</xsl:text> + <xsl:choose> + <xsl:when test="$diagramLabel != ''"> + <xsl:value-of select="$diagramLabel"/> + </xsl:when> + <xsl:otherwise> + <xsl:text>Class Diagram</xsl:text> + </xsl:otherwise> + </xsl:choose> + <xsl:text>"; edge [fontname = "Helvetica", fontsize = "9", labelfontname = "Helvetica", labelfontsize = "9"]; node [fontname = "Helvetica", fontsize = "9", shape = "record"];&#10;</xsl:text> @@ -111,7 +151,8 @@ <xsl:text> { labeljust = "center"; labelloc = "top"; - node [style = "filled"];</xsl:text> + node [style = "filled"]; + z = "1";</xsl:text> <xsl:apply-templates/> <!-- rank same, min, max, source or sink rankdir TB LR (left to right) or TB (top to bottom) @@ -129,8 +170,32 @@ label = "</xsl:text> <xsl:value-of select="@name"/> <xsl:text>"; + tooltip = "</xsl:text> + <xsl:value-of select="@name"/> + <xsl:if test="$javasrcPath != ''"> + <xsl:text>"; + URL = "</xsl:text> + <xsl:value-of select="$javasrcPath"/> + <xsl:call-template name="filepath"> + <xsl:with-param name="name" select="../@name"/> + <xsl:with-param name="parentname" select="@name"/> + </xsl:call-template> + <xsl:text>/package-summary.html</xsl:text> + </xsl:if> + <xsl:if test="$javadocPath != ''"> + <xsl:text>"; + URL = "</xsl:text> + <xsl:value-of select="$javadocPath"/> + <xsl:call-template name="filepath"> + <xsl:with-param name="name" select="../@name"/> + <xsl:with-param name="parentname" select="@name"/> + </xsl:call-template> + <xsl:text>/package-summary.html</xsl:text> + </xsl:if> + <xsl:text>"; color = "#000000"; fillcolor = "#dddddd"; + style = "filled"; } </xsl:text> </xsl:template> @@ -158,83 +223,248 @@ <!-- need to replace newline chars with \n --> <!--comment="<xsl:value-of select="doc" />" ,--> <xsl:text> - URL = "</xsl:text> - <xsl:call-template name="filepath"> + tooltip = "</xsl:text> + <xsl:call-template name="name"> <xsl:with-param name="name" select="../@name"/> <xsl:with-param name="parentname" select="@name"/> </xsl:call-template> + <xsl:if test="$javasrcPath != ''"> + <xsl:text>", + URL = "</xsl:text> + <xsl:value-of select="$javasrcPath"/> + <xsl:call-template name="filepath"> + <xsl:with-param name="name" select="../@name"/> + <xsl:with-param name="parentname" select="@name"/> + </xsl:call-template> + <xsl:text>_java.html</xsl:text> + </xsl:if> <xsl:text>", style = "filled", label = "{</xsl:text> <xsl:value-of select="@name"/> + <xsl:if test="@extensibility='abstract'"> + <xsl:text> \{ abstract \} </xsl:text> + </xsl:if> <xsl:text>\n|</xsl:text> - <xsl:if test="show"> - <xsl:for-each select="field"> + <!-- attributes --> + <xsl:for-each select="field"> + <xsl:if test="$show = 'private'"> <xsl:choose> <xsl:when test="@access='public'"> - <xsl:text>+</xsl:text> + <xsl:text> + </xsl:text> + </xsl:when> + <xsl:when test="@access='protected'"> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:when test="@access='package'"> + <xsl:text> ~ </xsl:text> </xsl:when> <xsl:when test="@access='private'"> - <xsl:text>-</xsl:text> + <xsl:text> - </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@access='public' or @access='protected' or @access='package' or @access='private'"> + <xsl:call-template name="printAttribute"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'package'"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> </xsl:when> <xsl:when test="@access='protected'"> - <xsl:text>#</xsl:text> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:when test="@access='package'"> + <xsl:text> ~ </xsl:text> </xsl:when> <xsl:otherwise> - <xsl:text>/</xsl:text> + <xsl:text/> </xsl:otherwise> </xsl:choose> - <xsl:call-template name="substring-after-last"> - <xsl:with-param name="input" select="returns/primitive/@type"/> - <xsl:with-param name="marker" select="'.'"/> - </xsl:call-template> - <xsl:call-template name="substring-after-last"> - <xsl:with-param name="input" select="returns/classref/@name"/> - <xsl:with-param name="marker" select="'.'"/> - </xsl:call-template> - <xsl:text>\n</xsl:text> - </xsl:for-each> - </xsl:if> + + <xsl:if test="@access='public' or @access='protected' or @access='package'"> + <xsl:call-template name="printAttribute"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'protected'"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> + </xsl:when> + <xsl:when test="@access='protected'"> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@access='public' or @access='protected'"> + <xsl:call-template name="printAttribute"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'public' and (@access='public')"> + <xsl:text> + </xsl:text> + + <xsl:call-template name="printAttribute"/> + </xsl:if> + </xsl:for-each> + <xsl:text>|</xsl:text> - <xsl:if test="show"> - <!-- constructor --> - <xsl:for-each select="method"> + + <!-- constructor --> + <xsl:for-each select="constructor"> + <xsl:if test="$show = 'private'"> <xsl:choose> <xsl:when test="@access='public'"> - <xsl:text>+</xsl:text> + <xsl:text> + </xsl:text> </xsl:when> <xsl:when test="@access='private'"> - <xsl:text>-</xsl:text> + <xsl:text> - </xsl:text> </xsl:when> <xsl:when test="@access='protected'"> - <xsl:text>#</xsl:text> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:when test="@access='package'"> + <xsl:text> ~ </xsl:text> </xsl:when> <xsl:otherwise> - <xsl:text>/</xsl:text> + <xsl:text/> </xsl:otherwise> </xsl:choose> - <xsl:call-template name="substring-after-last"> - <xsl:with-param name="input" select="returns/primitive/@type"/> - <xsl:with-param name="marker" select="'.'"/> - </xsl:call-template> - <xsl:call-template name="substring-after-last"> - <xsl:with-param name="input" select="returns/classref/@name"/> - <xsl:with-param name="marker" select="'.'"/> - </xsl:call-template> - <xsl:text> </xsl:text> - <xsl:value-of select="@name"/> - <xsl:text>( </xsl:text> - <xsl:for-each select="parameter"> - <xsl:value-of select="primitive/@type"/> - <xsl:call-template name="substring-after-last"> - <xsl:with-param name="input" select="classref/@name"/> - <xsl:with-param name="marker" select="'.'"/> - </xsl:call-template> - <xsl:text>,</xsl:text> - </xsl:for-each> - <xsl:text>)\n</xsl:text> - </xsl:for-each> - </xsl:if> + + <xsl:if test="@access='public' or @access='protected' or @access='package' or @access='private'"> + <xsl:call-template name="printConstructor"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'package'"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> + </xsl:when> + <xsl:when test="@access='protected'"> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:when test="@access='package'"> + <xsl:text> ~ </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@access='public' or @access='protected' or @access='package'"> + <xsl:call-template name="printConstructor"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'protected'"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> + </xsl:when> + <xsl:when test="@access='protected'"> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@access='public' or @access='protected'"> + <xsl:call-template name="printConstructor"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'public' and @access='public'"> + <xsl:text> + </xsl:text> + + <xsl:call-template name="printConstructor"/> + </xsl:if> + </xsl:for-each> + + <!-- methods --> + <xsl:for-each select="method"> + <xsl:if test="$show = 'private'"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> + </xsl:when> + <xsl:when test="@access='private'"> + <xsl:text> - </xsl:text> + </xsl:when> + <xsl:when test="@access='protected'"> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:when test="@access='package'"> + <xsl:text> ~ </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@access='public' or @access='protected' or @access='package' or @access='private'"> + <xsl:call-template name="printMethod"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'package'"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> + </xsl:when> + <xsl:when test="@access='protected'"> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:when test="@access='package'"> + <xsl:text> ~ </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@access='public' or @access='protected' or @access='package'"> + <xsl:call-template name="printMethod"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'protected'"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> + </xsl:when> + <xsl:when test="@access='protected'"> + <xsl:text> # </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + + <xsl:if test="@access='public' or @access='protected'"> + <xsl:call-template name="printMethod"/> + </xsl:if> + </xsl:if> + + <xsl:if test="$show = 'public' and @access='public'"> + <xsl:text> + </xsl:text> + + <xsl:call-template name="printMethod"/> + </xsl:if> + + </xsl:for-each> + <xsl:text>}" ];</xsl:text> </xsl:template> @@ -249,9 +479,25 @@ <xsl:text> [ color = "#9c0031", fillcolor = "#deffff", - label = "{«interface»\n</xsl:text> + label = "{\&lt;\&lt;interface\&gt;\&gt;\n</xsl:text> <xsl:value-of select="@name"/> - <xsl:text>\n}" + + <xsl:text>|</xsl:text> + <!-- operations --> + <xsl:if test="$show = 'private' or $show = 'package' or $show = 'protected' or $show = 'public'"> + <xsl:for-each select="method"> + <xsl:choose> + <xsl:when test="@access='public'"> + <xsl:text> + </xsl:text> + <xsl:call-template name="printMethod"/> + </xsl:when> + <xsl:otherwise> + <xsl:text/> + </xsl:otherwise> + </xsl:choose> + </xsl:for-each> + </xsl:if> + <xsl:text>}" ];</xsl:text> </xsl:template> @@ -265,7 +511,118 @@ <xsl:template match="method"/> + <xsl:template name="printAttribute"> + <xsl:if test="@static='true'"> + <xsl:text> $ </xsl:text> + </xsl:if> + + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="@name"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + <xsl:text> : </xsl:text> + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="primitive/@type"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="classref/@name"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + + <xsl:if test="@final='true'"> + <xsl:text> \{ final \} </xsl:text> + </xsl:if> + + <xsl:text>\n</xsl:text> + </xsl:template> + + <xsl:template name="printConstructor"> + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="@name"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + <xsl:text>(</xsl:text> + <xsl:for-each select="parameter"> + <xsl:value-of select="primitive/@type"/> + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="classref/@name"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + <xsl:if test="not(position()=last())"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text>)</xsl:text> + + <xsl:text>\n</xsl:text> + </xsl:template> + + <xsl:template name="printMethod"> + <xsl:if test="@static='true'"> + <xsl:text> $ </xsl:text> + </xsl:if> + + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="@name"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + <xsl:text>(</xsl:text> + <xsl:for-each select="parameter"> + <xsl:value-of select="primitive/@type"/> + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="classref/@name"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + <xsl:if test="not(position()=last())"> + <xsl:text>, </xsl:text> + </xsl:if> + </xsl:for-each> + <xsl:text>) : </xsl:text> + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="returns/primitive/@type"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + <xsl:call-template name="substring-after-last"> + <xsl:with-param name="input" select="returns/classref/@name"/> + <xsl:with-param name="marker" select="'.'"/> + </xsl:call-template> + + <xsl:if test="@extensibility='abstract' or @native='true' or @synchronized='true'"> + <xsl:text> \{</xsl:text> + </xsl:if> + <xsl:if test="@extensibility='abstract'"> + <xsl:text> abstract </xsl:text> + </xsl:if> + <xsl:if test="@native='true'"> + <xsl:text> native </xsl:text> + </xsl:if> + <xsl:if test="@synchronized='true'"> + <xsl:text> synchronized </xsl:text> + </xsl:if> + <xsl:if test="@extensibility='abstract' or @native='true' or @synchronized='true'"> + <xsl:text>\} </xsl:text> + </xsl:if> + + <xsl:text>\n</xsl:text> + </xsl:template> + <!-- Utilities templates --> + <xsl:template name="name"> + <xsl:param name="name"/> + <xsl:param name="parentname"/> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="$name"/> + <xsl:with-param name="replace" select="'.'"/> + <xsl:with-param name="with" select="'.'"/> + </xsl:call-template> + <xsl:if test="$parentname!=''">.</xsl:if> + <xsl:call-template name="replace-string"> + <xsl:with-param name="text" select="$parentname"/> + <xsl:with-param name="replace" select="'.'"/> + <xsl:with-param name="with" select="'.'"/> + </xsl:call-template> + </xsl:template> <xsl:template name="fullname"> <xsl:param name="name"/> Modified: maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/UmlDocTaskTest.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/UmlDocTaskTest.java?rev=590997&r1=590996&r2=590997&view=diff ============================================================================== --- maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/UmlDocTaskTest.java (original) +++ maven/sandbox/trunk/jxr/maven-jxr/maven-jxr-java/src/test/java/org/apache/maven/jxr/java/doc/UmlDocTaskTest.java Thu Nov 1 06:28:51 2007 @@ -22,6 +22,9 @@ import java.io.File; import org.apache.tools.ant.Project; +import org.apache.tools.ant.taskdefs.Copy; +import org.apache.tools.ant.types.FileSet; +import org.codehaus.plexus.util.PathTool; import junit.framework.TestCase; @@ -32,6 +35,33 @@ public class UmlDocTaskTest extends TestCase { + private static final String BASEDIR = new File( "" ).getAbsolutePath(); + + /** {@inheritDoc} */ + protected void setUp() + throws Exception + { + File srcDir = new File( BASEDIR, "target/unit/src" ); + if ( !srcDir.exists() ) + { + Project antProject = new Project(); + antProject.setBasedir( BASEDIR ); + + Copy copy = new Copy(); + copy.setProject( antProject ); + copy.setTodir( srcDir ); + FileSet set = new FileSet(); + set.setDir( new File( BASEDIR, "src/main/java" ) ); + set.setIncludes( "**/*.java" ); + copy.addFileset( set ); + set = new FileSet(); + set.setDir( new File( BASEDIR, "target/generated-sources/antlr" ) ); + set.setIncludes( "**/*.java" ); + copy.addFileset( set ); + copy.execute(); + } + } + /** * Call UMLdoc task * @@ -40,19 +70,46 @@ public void testDefaultExecute() throws Exception { - final String basedir = new File( "" ).getAbsolutePath(); + File out = new File( BASEDIR, "target/unit/umldoc-default/umlDefault.svg" ); + File srcDir = new File( BASEDIR, "src/test/resources/javasrc" ); - File out = new File( basedir, "target/unit/umldoc-default/uml.svg" ); - File srcDir = new File( basedir, "src/test/resources/javasrc" ); + Project antProject = new Project(); + antProject.setBasedir( BASEDIR ); + + UmlDocTask task = new UmlDocTask(); + task.setProject( antProject ); + task.setSrcDir( srcDir ); + task.setOut( out ); + task.setVerbose( true ); + task.setDiagramEncoding( "UTF-8" ); + task.execute(); + + // Generated files + assertTrue( out.exists() ); + assertTrue( out.length() > 0 ); + } + + /** + * Call UMLdoc task + * + * @throws Exception if any. + */ + public void testLinkExecute() + throws Exception + { + File out = new File( BASEDIR, "target/unit/umldoc-default/umlLink.svg" ); + File srcDir = new File( BASEDIR, "target/unit/src" ); Project antProject = new Project(); - antProject.setBasedir( basedir ); + antProject.setBasedir( BASEDIR ); UmlDocTask task = new UmlDocTask(); task.setProject( antProject ); task.setSrcDir( srcDir ); task.setOut( out ); task.setVerbose( true ); + // All tests passed... + task.setJavasrcPath( PathTool.getRelativePath( "./target/unit/src" ) + "/target/unit/jxrdoc-default/" ); task.execute(); // Generated files From commitshowellcaitlin@example.net Thu Nov 01 15:33:17 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 60351 invoked from network); 1 Nov 2007 15:33:17 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 15:33:17 -0000 Received: (qmail 68847 invoked by uid 500); 1 Nov 2007 15:15:45 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 68797 invoked by uid 500); 1 Nov 2007 15:15:45 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 68782 invoked by uid 99); 1 Nov 2007 15:15:45 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 08:15:45 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 15:16:13 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CE8091A9832; Thu, 1 Nov 2007 08:15:34 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r591045 - in /maven/plugins/trunk/maven-deploy-plugin: ./ src/main/java/org/apache/maven/plugin/deploy/ src/main/java/org/codehaus/ src/test/resources/unit/basic-deploy-test/ src/test/resources/unit/deploy-file-pom-file/ Date: Thu, 01 Nov 2007 15:15:34 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Thu Nov 1 08:15:33 2007 New Revision: 591045 URL: http://svn.apache.org/viewvc?rev=591045&view=rev Log: [MDEPLOY-66] add XML encoding support for POM reading/writing Added: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/codehaus/ - copied from r590475, maven/plugins/trunk/maven-install-plugin/src/main/java/org/codehaus/ Modified: maven/plugins/trunk/maven-deploy-plugin/pom.xml maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml (contents, props changed) maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/deploy-file-pom-file/plugin-config.xml (contents, props changed) Modified: maven/plugins/trunk/maven-deploy-plugin/pom.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/pom.xml?rev=591045&r1=591044&r2=591045&view=diff ============================================================================== --- maven/plugins/trunk/maven-deploy-plugin/pom.xml (original) +++ maven/plugins/trunk/maven-deploy-plugin/pom.xml Thu Nov 1 08:15:33 2007 @@ -21,33 +21,33 @@ <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> - <version>2.0</version> + <version>2.0.6</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-core</artifactId> - <version>2.0</version> + <version>2.0.6</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> - <version>2.0</version> + <version>2.0.6</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-artifact-manager</artifactId> - <version>2.0</version> + <version>2.0.6</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-artifact</artifactId> - <version>2.0</version> + <version>2.0.6</version> </dependency> <dependency> - <groupId>org.apache.maven.shared</groupId> + <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-testing-harness</artifactId> + <version>2.4-SNAPSHOT</version> <scope>test</scope> - <version>1.0-beta-1</version> </dependency> </dependencies> </project> Modified: maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java?rev=591045&r1=591044&r2=591045&view=diff ============================================================================== --- maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java (original) +++ maven/plugins/trunk/maven-deploy-plugin/src/main/java/org/apache/maven/plugin/deploy/DeployFileMojo.java Thu Nov 1 08:15:33 2007 @@ -33,15 +33,13 @@ import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.project.artifact.ProjectArtifactMetadata; import org.codehaus.plexus.util.IOUtil; +import org.codehaus.plexus.util.ReaderFactory; +import org.codehaus.plexus.util.WriterFactory; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import java.io.File; -import java.io.FileInputStream; import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; import java.util.Map; @@ -304,8 +302,7 @@ Reader reader = null; try { - // TODO use ReaderFactory.newXmlReader() when plexus-utils is upgraded to 1.4.5+ - reader = new InputStreamReader( new FileInputStream( pomFile ), "UTF-8" ); + reader = ReaderFactory.newXmlReader( pomFile ); MavenXpp3Reader modelReader = new MavenXpp3Reader(); return modelReader.read( reader ); } @@ -344,8 +341,7 @@ model.setPackaging( packaging ); model.setDescription( description ); - // TODO use WriterFactory.newXmlWriter() when plexus-utils is upgraded to 1.4.5+ - fw = new OutputStreamWriter( new FileOutputStream( tempFile ), "UTF-8" ); + fw = WriterFactory.newXmlWriter( tempFile ); new MavenXpp3Writer().write( fw, model ); return tempFile; Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml?rev=591045&r1=591044&r2=591045&view=diff ============================================================================== Binary files - no diff available. Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml ('svn:eol-style' removed) Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/basic-deploy-test/plugin-config.xml ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Modified: maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/deploy-file-pom-file/plugin-config.xml URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/deploy-file-pom-file/plugin-config.xml?rev=591045&r1=591044&r2=591045&view=diff ============================================================================== Binary files - no diff available. Propchange: maven/plugins/trunk/maven-deploy-plugin/src/test/resources/unit/deploy-file-pom-file/plugin-config.xml ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream From commitshowellcaitlin@example.net Thu Nov 01 16:16:10 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 78159 invoked from network); 1 Nov 2007 16:16:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 16:16:10 -0000 Received: (qmail 62706 invoked by uid 500); 1 Nov 2007 16:11:27 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 62656 invoked by uid 500); 1 Nov 2007 16:11:26 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 62639 invoked by uid 99); 1 Nov 2007 16:11:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 09:11:26 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 16:11:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3F7401A9832; Thu, 1 Nov 2007 09:11:17 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r591067 - in /maven/plugins/trunk/maven-site-plugin/src/main/java/org/codehaus/plexus/util: ReaderFactory.java WriterFactory.java xml/ Date: Thu, 01 Nov 2007 16:11:17 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Thu Nov 1 09:11:16 2007 New Revision: 591067 URL: http://svn.apache.org/viewvc?rev=591067&view=rev Log: [MSITE-239] copied XML encoding support classes to avoid Maven 2.0.6 prerequisite Added: maven/plugins/trunk/maven-site-plugin/src/main/java/org/codehaus/plexus/util/ReaderFactory.java - copied unchanged from r590475, maven/plugins/trunk/maven-install-plugin/src/main/java/org/codehaus/plexus/util/ReaderFactory.java maven/plugins/trunk/maven-site-plugin/src/main/java/org/codehaus/plexus/util/WriterFactory.java - copied unchanged from r590475, maven/plugins/trunk/maven-install-plugin/src/main/java/org/codehaus/plexus/util/WriterFactory.java maven/plugins/trunk/maven-site-plugin/src/main/java/org/codehaus/plexus/util/xml/ - copied from r590475, maven/plugins/trunk/maven-install-plugin/src/main/java/org/codehaus/plexus/util/xml/ From commitshowellcaitlin@example.net Thu Nov 01 19:02:08 2007 Return-Path: <commitshowellcaitlin@example.net> Delivered-To: howellcaitlin@example.net Received: (qmail 40041 invoked from network); 1 Nov 2007 19:02:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Nov 2007 19:02:08 -0000 Received: (qmail 60797 invoked by uid 500); 1 Nov 2007 19:01:31 -0000 Delivered-To: howellcaitlin@example.net Received: (qmail 60756 invoked by uid 500); 1 Nov 2007 19:01:31 -0000 Mailing-List: contact howellcaitlin@example.net; run by ezmlm Precedence: bulk List-Help: <mailto:howellcaitlin@example.net> List-Unsubscribe: <mailto:howellcaitlin@example.net> List-Post: <mailto:howellcaitlin@example.net> List-Id: <commits.maven.apache.org> Reply-To: howellcaitlin@example.net Delivered-To: mailing list howellcaitlin@example.net Received: (qmail 60738 invoked by uid 99); 1 Nov 2007 19:01:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 12:01:31 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO eris.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Nov 2007 19:01:42 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 414B11A9832; Thu, 1 Nov 2007 12:01:22 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r591123 - in /maven/release/trunk/maven-release-manager/src: main/java/org/apache/maven/shared/release/phase/ main/java/org/codehaus/ test/java/org/apache/maven/shared/release/phase/ Date: Thu, 01 Nov 2007 19:01:17 -0000 To: howellcaitlin@example.net From: howellcaitlin@example.net X-Mailer: svnmailer-1.0.8 Message-Id: <howellcaitlin@example.net> X-Virus-Checked: Checked by ClamAV on apache.org Author: hboutemy Date: Thu Nov 1 12:01:16 2007 New Revision: 591123 URL: http://svn.apache.org/viewvc?rev=591123&view=rev Log: [MRELEASE-87] add XML encoding support for POM reading/writing Added: maven/release/trunk/maven-release-manager/src/main/java/org/codehaus/ - copied from r590475, maven/plugins/trunk/maven-install-plugin/src/main/java/org/codehaus/ Modified: maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractBackupPomsPhaseTest.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractEditModeRewritingReleasePhaseTestCase.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractReleaseTestCase.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractRewritingReleasePhaseTestCase.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/CreateBackupPomsPhaseTest.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhaseTest.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RestoreBackupPomsPhaseTest.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForDevelopmentPhaseTest.java maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/RewritePomsForReleasePhaseTest.java Modified: maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java?rev=591123&r1=591122&r2=591123&view=diff ============================================================================== --- maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java (original) +++ maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/AbstractRewritePomsPhase.java Thu Nov 1 12:01:16 2007 @@ -42,7 +42,9 @@ import org.apache.maven.shared.release.scm.ScmRepositoryConfigurator; import org.apache.maven.shared.release.util.ReleaseUtil; import org.codehaus.plexus.util.IOUtil; +import org.codehaus.plexus.util.ReaderFactory; import org.codehaus.plexus.util.StringUtils; +import org.codehaus.plexus.util.WriterFactory; import org.jdom.Comment; import org.jdom.Document; import org.jdom.Element; @@ -57,10 +59,7 @@ import org.jdom.xpath.XPath; import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.OutputStreamWriter; import java.io.StringReader; import java.io.StringWriter; import java.io.Writer; @@ -121,8 +120,7 @@ private static String readXmlFile( File file ) throws IOException { - // TODO use ReaderFactory.newXmlReader() when plexus-utils is upgraded to 1.4.5+ - return IOUtil.toString( new FileInputStream( file ), "UTF-8" ); + return IOUtil.toString( ReaderFactory.newXmlReader( file ) ); } private void transformProject( MavenProject project, ReleaseDescriptor releaseDescriptor, Settings settings, @@ -669,8 +667,7 @@ Writer writer = null; try { - // TODO use WriterFactory.newXmlWriter() when plexus-utils is upgraded to 1.4.5+ - writer = new OutputStreamWriter( new FileOutputStream( pomFile ), "UTF-8" ); + writer = WriterFactory.newXmlWriter( pomFile ); if ( intro != null ) { Modified: maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java?rev=591123&r1=591122&r2=591123&view=diff ============================================================================== --- maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java (original) +++ maven/release/trunk/maven-release-manager/src/main/java/org/apache/maven/shared/release/phase/GenerateReleasePomsPhase.java Thu Nov 1 12:01:16 2007 @@ -46,11 +46,10 @@ import org.apache.maven.shared.release.scm.ScmTranslator; import org.apache.maven.shared.release.util.ReleaseUtil; import org.codehaus.plexus.util.IOUtil; +import org.codehaus.plexus.util.WriterFactory; import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; -import java.io.OutputStreamWriter; import java.io.Writer; import java.util.ArrayList; import java.util.Collections; @@ -151,8 +150,7 @@ try { - // TODO use WriterFactory.newXmlWriter() when plexus-utils is upgraded to 1.4.5+ - fileWriter = new OutputStreamWriter( new FileOutputStream( releasePomFile ), "UTF-8" ); + fileWriter = WriterFactory.newXmlWriter( releasePomFile ); pomWriter.write( fileWriter, releasePom ); } Modified: maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractBackupPomsPhaseTest.java URL: http://svn.apache.org/viewvc/maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractBackupPomsPhaseTest.java?rev=591123&r1=591122&r2=591123&view=diff ============================================================================== --- maven/release/trunk/maven-release-manager/src/test/java/org/apache/maven/shared/release/phase/AbstractBackupPomsPhaseTest.java (original) +++
{'source': 'Apache Software Foundation Public Mail Archives'}