Return-Path: Delivered-To: apmail-incubator-etch-dev-archive@minotaur.apache.org Received: (qmail 44796 invoked from network); 26 Apr 2009 02:07:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Apr 2009 02:07:52 -0000 Received: (qmail 25020 invoked by uid 500); 26 Apr 2009 02:07:51 -0000 Delivered-To: apmail-incubator-etch-dev-archive@incubator.apache.org Received: (qmail 24982 invoked by uid 500); 26 Apr 2009 02:07:51 -0000 Mailing-List: contact etch-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: etch-dev@incubator.apache.org Delivered-To: mailing list etch-dev@incubator.apache.org Received: (qmail 24972 invoked by uid 99); 26 Apr 2009 02:07:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Apr 2009 02:07:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Apr 2009 02:07:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9F275234C4B1 for ; Sat, 25 Apr 2009 19:07:30 -0700 (PDT) Message-ID: <686952782.1240711650650.JavaMail.jira@brutus> Date: Sat, 25 Apr 2009 19:07:30 -0700 (PDT) From: "Richard Bolkey (JIRA)" To: etch-dev@incubator.apache.org Subject: [jira] Commented: (ETCH-69) Compiler throws URISyntaxException if there are spaces in the classpath In-Reply-To: <447938606.1240702650354.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/ETCH-69?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702840#action_12702840 ] Richard Bolkey commented on ETCH-69: ------------------------------------ I had run into this issue as well. Forget exactly what I discovered, but I seem to recall that URLClassLoader being passed into Etch from Maven not being all that friendly (or something like that ... it's a little fuzzy). I do remember the work around I used though. In your settings.xml file, set your local repository path to "c:\docume~1\\.m2\repository > Compiler throws URISyntaxException if there are spaces in the classpath > ----------------------------------------------------------------------- > > Key: ETCH-69 > URL: https://issues.apache.org/jira/browse/ETCH-69 > Project: Etch > Issue Type: Bug > Components: compiler > Affects Versions: 1.0.2 > Environment: Windows XP, java 1.6, maven 2.0.9, ant 1.7.0 > Reporter: Brian Smith > Priority: Minor > > While trying to write a maven POM that executes the etch task via the antrun plugin, I discovered EtchCompiler throwing an exception if the path to the etch jars contains spaces. This resulted from my M2 repository being located in c:\Documents and Settings\brian\.m2\repository. The output is: > -+-+- > $ mvn package > [INFO] Scanning for projects... > [INFO] ------------------------------------------------------------------------ > [INFO] Building Spawn API Client and Server Interfaces > [INFO] task-segment: [package] > [INFO] ------------------------------------------------------------------------ > [INFO] [antrun:run {execution: default}] > [INFO] Executing tasks > init: > generate: > java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/brian/.m2/repository/org/apa > che/maven/plugins/maven-antrun-plugin/1.1/maven-antrun-plugin-1.1.jar > at java.net.URI$Parser.fail(URI.java:2809) > at java.net.URI$Parser.checkChars(URI.java:2982) > at java.net.URI$Parser.parseHierarchical(URI.java:3066) > at java.net.URI$Parser.parse(URI.java:3014) > at java.net.URI.(URI.java:578) > at java.net.URL.toURI(URL.java:918) > at etch.compiler.EtchCompiler.setupClassLoader(EtchCompiler.java:222) > at etch.tools.ant.EtchCompileTask.execute(EtchCompileTask.java:245) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.tools.ant.Target.performTasks(Target.java:369) > at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216) > at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:37) > at org.apache.tools.ant.Project.executeTargets(Project.java:1068) > at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:382) > at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275) > at org.apache.tools.ant.Task.perform(Task.java:364) > at org.apache.tools.ant.Target.execute(Target.java:341) > at org.apache.maven.plugin.antrun.AbstractAntMojo.executeTasks(AbstractAntMojo.java:108) > at org.apache.maven.plugin.antrun.AntRunMojo.execute(AntRunMojo.java:83) > at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) > at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) > at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356) > at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137) > at org.apache.maven.cli.MavenCli.main(MavenCli.java:356) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) > at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) > at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) > at org.codehaus.classworlds.Launcher.main(Launcher.java:375) > [INFO] ------------------------------------------------------------------------ > [ERROR] BUILD ERROR > [INFO] ------------------------------------------------------------------------ > [INFO] Error executing ant tasks > -+-+- > The documentation for URL.toURI() says that it cannot produce a URI if the URL is not RFC 2396 compliant. Using a multi-arg constructor for URI fixes the problem. In EtchCompiler.java, replace line 222 with: > String scheme = "file"; > int pathBegin = scheme.length() + 1; > String path = s.substring(pathBegin); > // multi-arg constructor properly escapes paths > File f = new File(new URI(scheme, null, path, null)); -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.