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

TEST-*.xml files generated by Surefire throw validation warnings in Eclipse for no grammer constraints (DTD or XML schema) referenced in the document

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.13
    • 2.19
    • None
    • Any OS, Eclipse Juno with m2e and m2e-wtp.

    Description

      1. Create a Maven project in Eclipse.

      2. Add a single class and a single test method decorated with @Test.

      import org.junit.Test;
      
      public class ATest
      {
      	@Test
      	public void test()
      	{
      		
      	}
      }
      
      

      3. Add the necessary information to the POM -

      <build>
          <plugins>
              <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-surefire-plugin</artifactId>
                  <version>2.13</version>
              </plugin>
          </plugins>
      </build>
      
      <dependencies>
          <dependency>
              <groupId>junit</groupId>
              <artifactId>junit</artifactId>
              <version>4.7</version>
              <scope>test</scope>
          </dependency>
      </dependencies>
      
      

      4. Close Eclipse.

      5. Edit your .project file to include the validator -

      <buildCommand>
          <name>org.eclipse.wst.validation.validationbuilder</name>
          <arguments></arguments>
      </buildCommand>
      
      

      6. Build from the command line -

      > mvn install

      7. Open Eclipse.

      EXPECTING: no warnings appear out of the box. I understand workarounds, but for the benefit of anyone going forward and existing users, there should be no warnings.

      ACTUAL: warning appears -

      Description Resource Path Location Type
      No grammar constraints (DTD or XML Schema) referenced in the document. TEST-ATest.xml /test/target/surefire-reports line 1 XML Problem

      Attachments

        Issue Links

          Activity

            People

              tibordigana Tibor Digana
              joshunger Josh Unger
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: