[ http://jira.codehaus.org/browse/SUREFIRE-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_103623 ]
Nick Bower commented on SUREFIRE-117: ------------------------------------- Ok I think I've found the issue here. It is the way in which the surefire jar manifest is being created. The created temporary surefire jar has no classes, but uses a class path entry in the manifest to point to the maven repository so that the system class loader is able to pre-load the dependencies (including the stated SurefireBooter for one). However on Windows, this manifest illegally contains paths with drive letters. Manifest-Version: 1.0 Archiver-Version: Plexus Archiver Created-By: 1.5.0_11-b03 (Sun Microsystems Inc.) Main-Class: org.apache.maven.surefire.booter.SurefireBooter Class-Path: C:\Documents and Settings\nick\.m2\repository\org\codehaus \plexus\plexus-archiver\1.0-alpha-7\plexus-archiver-1.0-alpha-7.jar C :\Documents and Settings\nick\.m2\repository\junit\junit\3.8.1\junit- 3.8.1.jar C:\Documents and Settings\nick\.m2\repository\org\apache\ma ven\surefire\surefire-api\2.3\surefire-api-2.3.jar C:\Documents and S ettings\nick\.m2\repository\org\codehaus\plexus\plexus-container-defa ult\1.0-alpha-8\plexus-container-default-1.0-alpha-8.jar C:\Documents and Settings\nick\.m2\repository\classworlds\classworlds\1.1-alpha-2 \classworlds-1.1-alpha-2.jar C:\Documents and Settings\nick\.m2\repos itory\org\codehaus\plexus\plexus-utils\1.1\plexus-utils-1.1.jar C:\Do cuments and Settings\nick\.m2\repository\commons-lang\commons-lang\2. 1\commons-lang-2.1.jar C:\Documents and Settings\nick\.m2\repository\ org\apache\maven\surefire\surefire-booter\2.3\surefire-booter-2.3.jar c:\Documents and Settings\nick\workspace\DataFeeds\target\classes/ c :\Documents and Settings\nick\workspace\DataFeeds\target\test-classes / C:\Documents and Settings\nick\.m2\repository\com\metoceanengineers \plot-tools\1.1.0\plot-tools-1.1.0.jar C:\Documents and Settings\nick \.m2\repository\mysql\mysql-connector-java\5.0.6\mysql-connector-java -5.0.6.jar C:\Documents and Settings\nick\.m2\repository\org\objectwe b\carol\carol\2.0.5\carol-2.0.5.jar C:\Documents and Settings\nick\.m 2\repository\backport-util-concurrent\backport-util-concurrent\3.0\ba ckport-util-concurrent-3.0.jar C:\Documents and Settings\nick\.m2\rep ository\org\mule\transports\mule-transport-jms\1.4.1\mule-transport-j ms-1.4.1.jar C:\Documents and Settings\nick\.m2\repository\org\apache \geronimo\specs\geronimo-jms_1.1_spec\1.0.1\geronimo-jms_1.1_spec-1.0 .1.jar C:\Documents and Settings\nick\.m2\repository\commons-discover y\commons-discovery\0.2\commons-discovery-0.2.jar C:\Documents and Se ttings\nick\.m2\repository\org\mule\mule-core\1.4.1\mule-core-1.4.1.j ar C:\Documents and Settings\nick\.m2\repository\commons-lang\commons -lang\2.1\commons-lang-2.1.jar C:\Documents and Settings\nick\.m2\rep ository\com\metoceanengineers\rems-exporter\1.0.6\rems-exporter-1.0.6 .jar C:\Documents and Settings\nick\.m2\repository\org\mule\transport s\mule-transport-file\1.4.1\mule-transport-file-1.4.1.jar C:\Document s and Settings\nick\.m2\repository\org\mule\modules\mule-module-jotm\ 1.4.1\mule-module-jotm-1.4.1.jar C:\Documents and Settings\nick\.m2\r epository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils -1.7.0.jar C:\Documents and Settings\nick\.m2\repository\com\metocean engineers\netcdfjavalib\2.3.0\netcdfjavalib-2.3.0.jar C:\Documents an d Settings\nick\.m2\repository\log4j\log4j\1.2.13\log4j-1.2.13.jar C: \Documents and Settings\nick\.m2\repository\junit\junit\3.8.2\junit-3 .8.2.jar C:\Documents and Settings\nick\.m2\repository\jcmdline\jcmdl ine\1.0.1\jcmdline-1.0.1.jar C:\Documents and Settings\nick\.m2\repos itory\org\apache\geronimo\specs\geronimo-jta_1.0.1B_spec\1.0.1\geroni mo-jta_1.0.1B_spec-1.0.1.jar C:\Documents and Settings\nick\.m2\repos itory\commons-net\commons-net\1.4.1\commons-net-1.4.1.jar C:\Document s and Settings\nick\.m2\repository\jdom\jdom\1.0\jdom-1.0.jar C:\Docu ments and Settings\nick\.m2\repository\org\slf4j\jcl104-over-slf4j\1. 3.1\jcl104-over-slf4j-1.3.1.jar C:\Documents and Settings\nick\.m2\re pository\jfree\jfreechart\1.0.1\jfreechart-1.0.1.jar C:\Documents and Settings\nick\.m2\repository\commons-cli\commons-cli\1.0\commons-cli -1.0.jar C:\Documents and Settings\nick\.m2\repository\org\safehaus\j ug\jug\2.0.0\jug-2.0.0-asl.jar C:\Documents and Settings\nick\.m2\rep ository\xml-apis\xml-apis\1.3.03\xml-apis-1.3.03.jar C:\Documents and Settings\nick\.m2\repository\javax\activation\activation\1.1\activat ion-1.1.jar C:\Documents and Settings\nick\.m2\repository\howl\howl-l ogger\0.1.11\howl-logger-0.1.11.jar C:\Documents and Settings\nick\.m 2\repository\commons-io\commons-io\1.3.1\commons-io-1.3.1.jar C:\Docu ments and Settings\nick\.m2\repository\jfree\jcommon\1.0.0\jcommon-1. 0.0.jar C:\Documents and Settings\nick\.m2\repository\oro\oro\2.0.7\o ro-2.0.7.jar C:\Documents and Settings\nick\.m2\repository\xerces\xer cesImpl\2.8.1\xercesImpl-2.8.1.jar C:\Documents and Settings\nick\.m2 \repository\org\apache\activemq\apachemq-allinone\4.1.1\apachemq-alli none-4.1.1.jar C:\Documents and Settings\nick\.m2\repository\org\slf4 j\slf4j-log4j12\1.3.1\slf4j-log4j12-1.3.1.jar C:\Documents and Settin gs\nick\.m2\repository\javax\mail\mail\1.4\mail-1.4.jar C:\Documents and Settings\nick\.m2\repository\mockobjects\mockobjects-core\0.09\mo ckobjects-core-0.09.jar C:\Documents and Settings\nick\.m2\repository \jotm\jotm_jrmp_stubs\2.0.10\jotm_jrmp_stubs-2.0.10.jar C:\Documents and Settings\nick\.m2\repository\org\slf4j\slf4j-api\1.3.1\slf4j-api- 1.3.1.jar C:\Documents and Settings\nick\.m2\repository\org\mule\tran sports\mule-transport-email\1.4.1\mule-transport-email-1.4.1.jar C:\D ocuments and Settings\nick\.m2\repository\commons-collections\commons -collections\3.2\commons-collections-3.2.jar C:\Documents and Setting s\nick\.m2\repository\jotm\jotm\2.0.10\jotm-2.0.10.jar C:\Documents a nd Settings\nick\.m2\repository\org\mule\transports\mule-transport-ft p\1.4.1\mule-transport-ftp-1.4.1.jar C:\Documents and Settings\nick\. m2\repository\org\apache\geronimo\specs\geronimo-j2ee-connector_1.5_s pec\1.0.1\geronimo-j2ee-connector_1.5_spec-1.0.1.jar C:\Documents and Settings\nick\.m2\repository\commons-pool\commons-pool\1.3\commons-p ool-1.3.jar According to the Java Extensions spec, these paths should be RELATIVE. According to http://java.sun.com/j2se/1.5.0/docs/guide/extensions/spec.html """An application (or, more generally, JAR file) specifies the relative URLs of the optional packages (and libraries) that it needs via the manifest attribute Class-Path. This attribute lists the URLs to search for implementations of optional packages (or other libraries) if they cannot be found as optional packages installed on the host Java virtual machine*. These relative URLs may include JAR files and directories for any libraries or resources needed by the application or optional package. Relative URLs not ending with '/' are assumed to refer to JAR files. For example, Class-Path: servlet.jar infobus.jar acme/beans.jar images/ Multiple Class-Path headers may be specified, and are combined sequentially. Currently, the URLs must be relative to the code base of the JAR file for security reasons. Thus, remote optional packages will originate from the same code base as the application. A future enhancement will leverage the facilities of the Java 2 Platform's Security APIs to allow references to JAR files at other URLs. """ I googled to see if absolute paths were really an issue and It seems that a few others have encountered this before also; http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4811221 So how are you producing the jar manifest? > ability to add dependency to jvm's classpath rather in surefirebooter > classloader > --------------------------------------------------------------------------------- > > Key: SUREFIRE-117 > URL: http://jira.codehaus.org/browse/SUREFIRE-117 > Project: Maven Surefire > Issue Type: Bug > Affects Versions: 2.0 (2.2 plugin) > Environment: xp > Reporter: Dan Tran > Assignee: Kenney Westerhof > Fix For: 2.4 > > Attachments: MSUREFIRE-121-booter.patch, MSUREFIRE-121.plugin.patch, > MSUREFIRE-121.plugin.patch2, MSUREFIRE-121.plugin.patch3 > > > I have a usecase where i have a jar file got loaded by -Xbootclasspath, that > jar file then loads classes from another jar ( my dependency) > expected in the classpath. > The problem is that surefire plugin does not add my dependencies at JVM > commanline thru -classpath option, but after the JVM starts -- 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