Skip to content
Skip to breadcrumbs
Skip to header menu
Skip to action menu
Skip to quick search
Quick Search
Browse
Pages
Blog
Labels
Attachments
Mail
Advanced
What’s New
Space Directory
Feed Builder
Keyboard Shortcuts
Confluence Gadgets
Log In
Dashboard
Maven User
Copy Page
You are not logged in. Any changes you make will be marked as
anonymous
. You may want to
Log In
if you already have an account. You can also
Sign Up
for a new account.
This page is being edited by
.
Paragraph
Paragraph
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Preformatted
Quote
Bold
Italic
Underline
More colours
Strikethrough
Subscript
Superscript
Monospace
Clear Formatting
Bullet list
Numbered list
Outdent
Indent
Align left
Align center
Align right
Link
Table
Insert
Insert Content
Image
Link
Attachment
Symbol
Emoticon
Wiki Markup
Horizontal rule
tinymce.confluence.insert_menu.macro_desc
Info
JIRA Issue
Status
Gallery
Tasklist
Table of Contents
Other Macros
Page Layout
No Layout
Two column (simple)
Two column (simple, left sidebar)
Two column (simple, right sidebar)
Three column (simple)
Two column
Two column (left sidebar)
Two column (right sidebar)
Three column
Three column (left and right sidebars)
Undo
Redo
Find/Replace
Keyboard Shortcuts Help
<h1>Is your classpath backwards?</h1> <p>Read this document if you think Maven is putting your classpath in the wrong order.</p> <h1>Two bugs canceled each other out</h1> <p>Take a look at <a class="external-link" href="http://jira.codehaus.org/browse/MNG-3118" rel="nofollow">http://jira.codehaus.org/browse/MNG-3118</a>. That bug was fixed in Maven 2.0.8 and called out in the release announcement as a backwards compatibility risk:</p> <p><a class="external-link" href="http://www.mail-archive.com/announce@apache.org/msg00432.html" rel="nofollow">http://www.mail-archive.com/announce@apache.org/msg00432.html</a></p> <p>As noted in the comments to MNG-3118, Surefire 2.3 had a bizarre classpath ordering bug that made the test classpath appear to be correct (test-classes first) under Maven 2.0.7 for some users with large classpaths:</p> <p><a class="external-link" href="http://jira.codehaus.org/browse/SUREFIRE-61" rel="nofollow">http://jira.codehaus.org/browse/SUREFIRE-61</a></p> <p>SUREFIRE-61 was fixed in Surefire 2.3.1. Notably, it would make the "Test Classpath" output in -X look correct, while secretly under the hood it would munge the classpath incorrectly!</p> <p>As a result, for at least one project here at my work, we've seen:</p> <p>Maven 2.0.7 + Surefire 2.3: test-classes before classes<br /> Maven 2.0.8 + Surefire 2.3: classes before test-classes<br /> Maven 2.0.7 + Surefire 2.3.1 or higher: classes before test-classes<br /> Maven 2.0.8 + Surefire 2.3.1 or higher: test-classes before classes</p> <p>Benjamin checked in a classpath ordering test in the Surefire trunk that we now run with every release. It's currently passing in Surefire 2.4.2 and Maven 2.0.8, and failing with Maven 2.0.7.</p> <h1>Still having problems?</h1> <p>Read this page, which explains how Surefire launches your tests. <a class="confluence-link" href="/display/MAVENUSER/Classloading+and+Forking+under+Maven+Surefire" data-linked-resource-id="77693182" data-linked-resource-type="page" data-linked-resource-default-alias="Classloading and Forking under Maven Surefire" data-base-url="http://docs.codehaus.org">Classloading and Forking under Maven Surefire</a></p> <p>Also, take a look at this Nabble discussion. (Mostly redundant, but it couldn't hurt.) <a href="http://www.nabble.com/Surefire-2.4.1-classpath-order-td15498825s177.html">http://www.nabble.com/Surefire-2.4.1-classpath-order-td15498825s177.html</a></p>
Please type the word appearing in the picture.
Attachments
Labels
Location
Watch this page
< Edit
Preview >
Loading…
Save
Cancel
Next hint
search
attachments
weblink
advanced