Return-Path: Delivered-To: apmail-maven-issues-archive@locus.apache.org Received: (qmail 9805 invoked from network); 21 Jan 2007 22:03:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jan 2007 22:03:40 -0000 Received: (qmail 99368 invoked by uid 500); 21 Jan 2007 22:03:16 -0000 Delivered-To: apmail-maven-issues-archive@maven.apache.org Received: (qmail 99141 invoked by uid 500); 21 Jan 2007 22:03:16 -0000 Mailing-List: contact issues-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@maven.apache.org Delivered-To: mailing list issues@maven.apache.org Received: (qmail 99077 invoked by uid 99); 21 Jan 2007 22:03:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jan 2007 14:03:15 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (herse.apache.org: local policy) Received: from [63.246.20.114] (HELO 63-246-20-114.contegix.com) (63.246.20.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 21 Jan 2007 14:03:04 -0800 Received: (qmail 10199 invoked by uid 89); 21 Jan 2007 22:02:22 -0000 Received: from unknown (HELO codehaus01.managed.contegix.com) (127.0.0.1) by smtp.domain.com with SMTP; 21 Jan 2007 22:02:22 -0000 Message-ID: <51017681.1169416942830.JavaMail.haus-jira@codehaus01.managed.contegix.com> Date: Sun, 21 Jan 2007 16:02:22 -0600 (CST) From: "Brett Porter (JIRA)" To: issues@maven.apache.org Subject: [jira] Moved: (SUREFIRE-123) SurefireBooter can initialize classloader with badly formed URLs In-Reply-To: <69662140.1152984559221.JavaMail.haus-jira@codehaus01.managed.contegix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://jira.codehaus.org/browse/SUREFIRE-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brett Porter moved MSUREFIRE-148 to SUREFIRE-123: ------------------------------------------------- Fix Version/s: (was: 2.3) 2.3 Key: SUREFIRE-123 (was: MSUREFIRE-148) Project: Maven Surefire (was: Maven 2.x Surefire Plugin) > SurefireBooter can initialize classloader with badly formed URLs > ---------------------------------------------------------------- > > Key: SUREFIRE-123 > URL: http://jira.codehaus.org/browse/SUREFIRE-123 > Project: Maven Surefire > Issue Type: Bug > Reporter: Jeremy Boynes > Assigned To: Brett Porter > Fix For: 2.3 > > Attachments: urlEncode.patch > > > In SurefireBooter.createClassLoader() the path is converted to a URL using > File f = new File( url ); > urls.add( f.toURL() ); > File.toURL does not perform URL encoding so the resulting URL may contain invalid characters. This is an issue on Windows machines where the default maven repository is in "C:\Documents and Settings\user\.m2\..." (the filename contains spaces). If a test accesses a resource that is loaded from a dependency jar then the URL returned to that test is malformed. > With JDK 1.4 this can be fixed using > urls.add( f.toURI().toURL() ); > as toURI() does encode the path. If surefire still needs to run under pre-1.4 JVMs this would need to be explicitly encoded. I'm willing to supply a patch for that if wanted. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira