Uploaded image for project: 'Maven Surefire'
  1. Maven Surefire
  2. SUREFIRE-641

junit drops from classpath when using a specific testClassesDirectory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.6
    • None
    • classloading
    • None

    Description

      To run some tests from a jar, I went through the process of unpacking the jar and configuring it as a testClassesDirectory.

      Upon execution, I am rewarded with:

      org.apache.maven.lifecycle.LifecycleExecutionException: Assert; nested exception is java.lang.NoClassDefFoundError: Assert

      It fails the same with 2.5 and 2.6. I will attach the entire POM so that you can see that junit most assuredly is in the classpath. The -X log I'll attach also shows it, just to make this maximally confusing.

      Config is:

        <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-surefire-plugin</artifactId>
                      <version>2.5</version>
                      <executions>
                          <execution>
                              <id>rex-ws-tests</id>
                              <phase>test</phase>
                              <goals>
                                  <goal>test</goal>
                              </goals>
                              <configuration>
                                  <testClassesDirectory>${project.build.directory}/rex-ws-test-classes</testClassesDirectory>
                              </configuration>
                          </execution>
                      </executions>
                  </plugin>
      

      Attachments

        1. pom.xml
          9 kB
          Benson Margulies
        2. sf.log
          450 kB
          Benson Margulies

        Activity

          People

            krosenvold Kristian Rosenvold
            bmargulies Benson Margulies
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: