Jetty
  1. Jetty
  2. JETTY-1063

Jetty Maven Plugin 7.0.0.1beta2 has problems with spaces in class path resource references

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Maven
    • Labels:
      None
    • Environment:
      jetty-maven-plugin:7.0.0.1beta2, windows xp sp3
    • Number of attachments :
      0

      Description

      I was trying out jetty-maven-plugin:7.0.0.1beta2 and encountered a bug when jetty is being started (using deploy-war mojo). Here is the relevant stack trace snippet:

      java.net.URISyntaxException: Illegal character in path at index 18: file:/C:/Documents and Settings/s.slavic/.m2/repository/org/mortbay/jetty/jetty-maven-plugin/7.0.0.1beta2/jetty-maven-plugin-7.0.0.1beta2.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.<init>(URI.java:578)
      at java.net.URL.toURI(URL.java:918)
      at org.eclipse.jetty.webapp.WebInfConfiguration.preConfigure(WebInfConfiguration.java:79)
      at org.mortbay.jetty.plugin.MavenWebInfConfiguration.preConfigure(MavenWebInfConfiguration.java:39)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:343)
      at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:89)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:56)
      at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:164)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:56)
      at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:164)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:56)
      at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:92)
      at org.eclipse.jetty.server.Server.doStart(Server.java:225)
      at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:69)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:56)
      at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:423)
      at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:366)
      at org.mortbay.jetty.plugin.JettyRunWarMojo.execute(JettyRunWarMojo.java:68)
      at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483)

        Issue Links

          Activity

          Hide
          David Smiley added a comment -

          If this is going to closed and considered a maven bug, then please point to the maven bug issue URL. I'm using the latest Maven 2.2.1 and the problem is still here.

          Show
          David Smiley added a comment - If this is going to closed and considered a maven bug, then please point to the maven bug issue URL. I'm using the latest Maven 2.2.1 and the problem is still here.
          Hide
          Jan Bartel added a comment -

          David,

          In my first response on 23 August 2009 I posted the link to the maven issue. Here it is again for your convenience:
          http://jira.codehaus.org/browse/MNG-3607

          Note that the maven project has fixed this for maven-3, but not backported to maven-2.

          regards
          Jan

          Show
          Jan Bartel added a comment - David, In my first response on 23 August 2009 I posted the link to the maven issue. Here it is again for your convenience: http://jira.codehaus.org/browse/MNG-3607 Note that the maven project has fixed this for maven-3, but not backported to maven-2. regards Jan
          Hide
          Khayretdinov Dmitriy added a comment -

          It is not the maven problem that is an old java bug.
          URL.toURI() it doesn't work properly. Use the following code to fix this problem:
          new URI(url.toString().replaceAll(" ", "%20"))

          Show
          Khayretdinov Dmitriy added a comment - It is not the maven problem that is an old java bug. URL.toURI() it doesn't work properly. Use the following code to fix this problem: new URI(url.toString().replaceAll(" ", "%20"))
          Hide
          Jan Bartel added a comment -

          Putting a fix into jetty that should only kick in if a uri format exception happens.

          Show
          Jan Bartel added a comment - Putting a fix into jetty that should only kick in if a uri format exception happens.
          Hide
          Jan Bartel added a comment -

          Fix in jetty 7 r 2296.

          Only applied %20 escape if URI format exception occurs.

          Show
          Jan Bartel added a comment - Fix in jetty 7 r 2296. Only applied %20 escape if URI format exception occurs.

            People

            • Assignee:
              Jan Bartel
              Reporter:
              Stevo Slavic
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: