Jetty
  1. Jetty
  2. JETTY-1450

Unable to execute "run-forked" goal under Windows

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 8.0.3
    • Fix Version/s: None
    • Component/s: Maven
    • Labels:
      None
    • Environment:
      Windows XP 32 bit
    • Number of attachments :
      0

      Description

      If you use the jetty-maven-plugin with the "run-forked" goal under windows you will get:

      08:41:08.324 [main] DEBUG org.eclipse.jetty.util.log - Logging to Logger[org.eclipse.jetty.util.log] via org.eclipse.jetty.util.log.Slf4jLog
      SUBSTRING: file:/C:/path/to/repo/.m2/repository/my/app/7.3.0-SNAPSHOT/app-7.3.0-SNAPSHOT.war
      [DEBUG] [C:\Programme\Java\jdk1.6.0_23\jre\bin\java.exe, -cp, C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-util\8.0.4\jetty-util-8.0.4.jar;C;\path\to\repo\.m2\repository\com\h2database\h2\1.2.133\h2-1.2.133.jar;C;\path\to\repo\.m2\repository\javax\xml\bind\jaxb-api\2.2.1\jaxb-api-2.2.1.jar;C;\path\to\repo\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C;\path\to\repo\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C;\path\to\repo\.m2\repository\ch\qos\logback\logback-classic\0.9.29\logback-classic-0.9.29.jar;C;\path\to\repo\.m2\repository\ch\qos\logback\logback-core\0.9.29\logback-core-0.9.29.jar;C;\path\to\repo\.m2\repository\org\slf4j\slf4j-api\1.6.1\slf4j-api-1.6.1.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-webapp\8.0.3.v20111011\jetty-webapp-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-xml\8.0.3.v20111011\jetty-xml-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-servlet\8.0.3.v20111011\jetty-servlet-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-security\8.0.3.v20111011\jetty-security-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-server\8.0.3.v20111011\jetty-server-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-continuation\8.0.3.v20111011\jetty-continuation-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\sonatype\sisu\sisu-inject-bean\2.1.1\sisu-inject-bean-2.1.1.jar;C;\path\to\repo\.m2\repository\org\sonatype\sisu\sisu-guice\2.9.4\sisu-guice-2.9.4-no_aop.jar;C;\path\to\repo\.m2\repository\org\codehaus\plexus\plexus-utils\2.0.6\plexus-utils-2.0.6.jar;C;\path\to\repo\.m2\repository\org\sonatype\aether\aether-util\1.11\aether-util-1.11.jar;C;\path\to\repo\.m2\repository\org\codehaus\plexus\plexus-interpolation\1.14\plexus-interpolation-1.14.jar;C;\path\to\repo\.m2\repository\org\codehaus\plexus\plexus-component-annotations\1.5.5\plexus-component-annotations-1.5.5.jar;C;\path\to\repo\.m2\repository\org\sonatype\plexus\plexus-sec-dispatcher\1.3\plexus-sec-dispatcher-1.3.jar;C;\path\to\repo\.m2\repository\org\sonatype\plexus\plexus-cipher\1.4\plexus-cipher-1.4.jar;C;\path\to\repo\.m2\repository\org\apache\maven\plugin-tools\maven-plugin-tools-api\2.9\maven-plugin-tools-api-2.9.jar;C;\path\to\repo\.m2\repository\org\apache\maven\reporting\maven-reporting-api\2.0.6\maven-reporting-api-2.0.6.jar;C;\path\to\repo\.m2\repository\org\apache\maven\doxia\doxia-sink-api\1.0-alpha-7\doxia-sink-api-1.0-alpha-7.jar;C;\path\to\repo\.m2\repository\junit\junit\3.8.1\junit-3.8.1.jar;C;\path\to\repo\.m2\repository\net\sf\jtidy\jtidy\r938\jtidy-r938.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-plus\8.0.3.v20111011\jetty-plus-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\apache\geronimo\specs\geronimo-jta_1.1_spec\1.1.1\geronimo-jta_1.1_spec-1.1.1.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-jndi\8.0.3.v20111011\jetty-jndi-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\javax\mail\mail\1.4.1\mail-1.4.1.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-jmx\8.0.3.v20111011\jetty-jmx-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\glassfish\web\jsp-impl\2.2\jsp-impl-2.2.jar;C;\path\to\repo\.m2\repository\javax\servlet\jsp\jsp-api\2.2\jsp-api-2.2.jar;C;\path\to\repo\.m2\repository\javax\servlet\jsp\jstl\jstl-api\1.2\jstl-api-1.2.jar;C;\path\to\repo\.m2\repository\org\glassfish\web\jstl-impl\1.2\jstl-impl-1.2.jar;C;\path\to\repo\.m2\repository\javax\el\el-api\2.2\el-api-2.2.jar;C;\path\to\repo\.m2\repository\org\glassfish\web\el-impl\2.2\el-impl-2.2.jar;C;\path\to\repo\.m2\repository\org\eclipse\jdt\core\compiler\ecj\3.7\ecj-3.7.jar;C;\path\to\repo\.m2\repository\org\mortbay\jetty\servlet-api\3.0.20100224\servlet-api-3.0.20100224.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-annotations\8.0.3.v20111011\jetty-annotations-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\apache\geronimo\specs\geronimo-annotation_1.0_spec\1.1.1\geronimo-annotation_1.0_spec-1.1.1.jar;C;\path\to\repo\.m2\repository\asm\asm-commons\3.1\asm-commons-3.1.jar;C;\path\to\repo\.m2\repository\asm\asm-tree\3.1\asm-tree-3.1.jar;C;\path\to\repo\.m2\repository\asm\asm\3.1\asm-3.1.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-websocket\8.0.3.v20111011\jetty-websocket-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-io\8.0.3.v20111011\jetty-io-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\eclipse\jetty\jetty-http\8.0.3.v20111011\jetty-http-8.0.3.v20111011.jar;C;\path\to\repo\.m2\repository\org\mortbay\jetty\jetty-maven-plugin\8.0.3.v20111011\jetty-maven-plugin-8.0.3.v20111011.jar, org.mortbay.jetty.plugin.Starter, --stop-port, 9775, --stop-key, STOP, --props, D:\workspaces\myapp-integration-tests\target\fork.props]
      [STDERR] java.lang.NoClassDefFoundError: org/mortbay/jetty/plugin/Starter
      [STDERR] Caused by: java.lang.ClassNotFoundException: org.mortbay.jetty.plugin.Starter
      [STDERR] 	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
      [STDERR] 	at java.security.AccessController.doPrivileged(Native Method)
      [STDERR] 	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      [STDERR] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      [STDERR] 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      [STDERR] 	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      [STDERR] Could not find the main class: org.mortbay.jetty.plugin.Starter.  Program will exit.
      [STDERR] Exception in thread "main" 
      [INFO] Forked execution exit: 1
      

      That is because the classpath is wrong. The plugin builds up the classpath and uses ":" as delimiter for classpath entries. Afterwards every ":" in the classpath is replaced by File.separatorChar and that leads to invalid file system paths under windows.

        Activity

        Hide
        Jan Bartel added a comment -

        Drats. Actually there are 2 problems. The first is as you've identified. The second one is that you're using Maven2. You really need to use Maven3 with this feature (see info box near top of page):

        http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin

        Show
        Jan Bartel added a comment - Drats. Actually there are 2 problems. The first is as you've identified. The second one is that you're using Maven2. You really need to use Maven3 with this feature (see info box near top of page): http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin
        Hide
        Jan Bartel added a comment -

        Checked in a fix to codehaus. It would be very helpful if you could build it and then test it as I don't have easy access to a Windows machine. If it doesn't work (using maven3!) then please reopen this bug.

        thanks
        Jan

        Show
        Jan Bartel added a comment - Checked in a fix to codehaus. It would be very helpful if you could build it and then test it as I don't have easy access to a Windows machine. If it doesn't work (using maven3!) then please reopen this bug. thanks Jan
        Hide
        Sascha Theves added a comment -

        I used maven 3... I didn`t find the correct component in JIRA, but I really used maven 3. Sorry for the confusion.

        I will check it as soon as possible.

        Show
        Sascha Theves added a comment - I used maven 3... I didn`t find the correct component in JIRA, but I really used maven 3. Sorry for the confusion. I will check it as soon as possible.

          People

          • Assignee:
            Jan Bartel
            Reporter:
            Sascha Theves
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: