Maven 1
  1. Maven 1
  2. MAVEN-106

maven test fails if junit jar in project.xml dep

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-beta-7
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I have junit jar dep declared in my project project.xml:

      <dependency>
      <id>junit</id>
      <version>3.8.1</version>
      <properties>
      <classloader>root</classloader>
      </properties>
      </dependency>

      (I need it to compile some classes in src/java).

      When I run "maven test", I get:

      test:test:
      [junit] Running patterntesting.plugin.aspectj.TestAjcCompiler
      [junit] java.lang.NoClassDefFoundError: org/w3c/dom/Node
      [junit] at java.lang.Class.forName0(Native Method)
      [junit] at java.lang.Class.forName(Class.java:115)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.FormatterElement.createFormatter(For
      matterElement.java:183)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.createAndStoreFormat
      ter(JUnitTestRunner.java:550)
      [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner
      .java:495)
      [junit] Exception in thread "main"
      [junit] [ERROR] TEST patterntesting.plugin.aspectj.TestAjcCompiler FAILED

      [ERROR] BUILD FAILED
      [ERROR] File...... c:\apps\maven\plugins\maven-test-plugin-1.0\plugin.jelly
      [ERROR] Element... fail
      [ERROR] Line...... 107
      [ERROR] Column.... 52
      [ERROR] There were test failures.
      Total time: 7 seconds

      Thanks

        Activity

        Hide
        Vincent Massol added a comment -

        It works if I add:

        <dependency>
        <id>xml-apis</id>
        <version>2.0.2</version>
        <properties>
        <classloader>root</classloader>
        </properties>
        </dependency>

        <dependency>
        <id>xerces</id>
        <version>2.0.2</version>
        <properties>
        <classloader>root</classloader>
        </properties>
        </dependency>

        but I'd rather not and I thought these were defined in forehead.conf and looked for in mavenhome/lib ?

        Thanks

        Show
        Vincent Massol added a comment - It works if I add: <dependency> <id>xml-apis</id> <version>2.0.2</version> <properties> <classloader>root</classloader> </properties> </dependency> <dependency> <id>xerces</id> <version>2.0.2</version> <properties> <classloader>root</classloader> </properties> </dependency> but I'd rather not and I thought these were defined in forehead.conf and looked for in mavenhome/lib ? Thanks
        Hide
        dion gillard added a comment -

        Bob was going to add these yesterday.....

        Show
        dion gillard added a comment - Bob was going to add these yesterday.....
        Hide
        dion gillard added a comment -

        Committed today

        Show
        dion gillard added a comment - Committed today

          People

          • Assignee:
            Jason van Zyl
            Reporter:
            Vincent Massol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: