0

I am new to maven. So finding it difficult to cope it with. I have two questions:

  1. Is there any way to add new contents in the maven surefire report plugin like new table etc. I want to customize the reports according to my need.
  2. I am using buildnumber plugin to get the unique run id for each run but this id is not getting reflected in the reports. Is buildnumber plugin only works with subversion?

The pom is;

<build>
<finalName>${project.artifactId}-${project.version}-r${buildNumber}</finalName>
  <plugins>
    <plugin>
     <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.0-beta-3</version>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <doCheck>true</doCheck>
          <doUpdate>false</doUpdate>
          <format>${project.version}.{0,number}</format>
          <items>
           <item>buildNumber</item>
          </items>
        </configuration>
      </plugin>
  </plugins>
</build>

I have one more query:

3-> If i make batch file or an exe file of the complete test suites can i run it on many JVM simultaneously for example with an eclipse i am running one JVM. But if am not using eclipse and just running the testsuite batch file directly can JRE instantiate many JVM instances. And if it is possible, do i need to associate each test suite with .m2 repository.

Amit Shakya
  • 1,396
  • 12
  • 27

1 Answers1

1

To get to your first question: Unfortunately not. You can use them as they are or you need to write your own maven-surefire-report-plugin. But the question is what you exactly want to customize. To you second question: The build-number-plugin is used to create a build number which usually is used during creation of MANIFEST.MF files etc. Furthermore the buildNumber plugin works also with Git, Hg etc. But the question is what you like to achieve in this case. The most important information in Maven are the groupId, artifactId and the version.

Update: BTW. Update the buildnumber-plugin version (1.0).

Update: Take a look here: http://maven.apache.org/plugins/maven-surefire-report-plugin/usage.html

khmarbaise
  • 92,914
  • 28
  • 189
  • 235
  • In the surefire reports i want to add the description of each test case along with the name. Secondly, for each test run, i need to generate a test run id kind of timestamp cum runID to provide some uniqueness to the run. – Amit Shakya Mar 19 '12 at 06:58
  • If you like to have that been reported on the HTML you need to create your own surefire-report-plugin (but check first some configuration option it..). Furthermore there are xml files usually been generated with information like this. But what i don't understand why do you need such kind of "supplemental" information, cause usually the run is documented and reported. The class name of the test class is reported furthermore the testcase name is reported. So what information do you need? – khmarbaise Mar 19 '12 at 08:02