Hello!
 
I've read the JIRA found here:
http://jira.codehaus.org/browse/SUREFIRE-257
and tried to incorporate its advice into my POM.
 
Currently, when I run "mvn clean install site", I get the following:

        

        C:\workspace\shares-trunk\shares-domain>mvn clean install site
         
        C:\workspace\shares-trunk\shares-domain>set MAVEN_OPTS=-Xmx256m
        [INFO] Scanning for projects...
        [INFO]
------------------------------------------------------------------------
        [INFO] Building shares-domain
        [INFO]    task-segment: [clean, install, site]
        [INFO]
------------------------------------------------------------------------
        [INFO] [clean:clean]
        [INFO] Deleting directory
C:\workspace\shares-trunk\shares-domain\target
        [INFO] [resources:resources]
        [INFO] Using default encoding to copy filtered resources.
        [INFO] [compiler:compile]
        [INFO] Compiling 101 source files to
C:\workspace\shares-trunk\shares-domain\target\classes
        [INFO] [resources:testResources]
        [INFO] Using default encoding to copy filtered resources.
        [INFO] [compiler:testCompile]
        [INFO] Compiling 35 source files to
C:\workspace\shares-trunk\shares-domain\target\test-classes
        [INFO] [surefire:test]
        [INFO] Surefire report directory:
C:\workspace\shares-trunk\shares-domain\target\surefire-reports
         
        -------------------------------------------------------
         T E S T S
        -------------------------------------------------------
        
        ...<tests are run here - clears for confidentiality>...
         
        Results :
         
        Tests run: 54, Failures: 0, Errors: 0, Skipped: 0
         
        [INFO] [jar:jar]
        [INFO] Building jar:
C:\workspace\shares-trunk\shares-domain\target\shares-domain-1.0-SNAPSHO
T.jar
        [INFO] [install:install]
        [INFO] Installing
C:\workspace\shares-trunk\shares-domain\target\shares-domain-1.0-SNAPSHO
T.jar to \.m2\repository\com\fideli
        
ty\shares\shares-domain\1.0-SNAPSHOT\shares-domain-1.0-SNAPSHOT.jar
        [INFO] Setting property: classpath.resource.loader.class =>
'org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader'.
        [INFO] Setting property: velocimacro.messages.on => 'false'.
        [INFO] Setting property: resource.loader => 'classpath'.
        [INFO] Setting property: resource.manager.logwhenfound =>
'false'.
        [INFO]
**************************************************************
        [INFO] Starting Jakarta Velocity v1.4
        [INFO] RuntimeInstance initializing.
        [INFO] Default Properties File:
org\apache\velocity\runtime\defaults\velocity.properties
        [INFO] Default ResourceManager initializing. (class
org.apache.velocity.runtime.resource.ResourceManagerImpl)
        [INFO] Resource Loader Instantiated:
org.codehaus.plexus.velocity.ContextClassLoaderResourceLoader
        [INFO] ClasspathResourceLoader : initialization starting.
        [INFO] ClasspathResourceLoader : initialization complete.
        [INFO] ResourceCache : initialized. (class
org.apache.velocity.runtime.resource.ResourceCacheImpl)
        [INFO] Default ResourceManager initialization complete.
        [INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Literal
        [INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Macro
        [INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Parse
        [INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Include
        [INFO] Loaded System Directive:
org.apache.velocity.runtime.directive.Foreach
        [INFO] Created: 20 parsers.
        [INFO] Velocimacro : initialization starting.
        [INFO] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
        [ERROR] ResourceManager : unable to find resource
'VM_global_library.vm' in any resource loader.
        [INFO] Velocimacro : error using  VM library template
VM_global_library.vm : org.apache.velocity.exception.ResourceNotFoundEx
        ception: Unable to find resource 'VM_global_library.vm'
        [INFO] Velocimacro :  VM library template macro registration
complete.
        [INFO] Velocimacro : allowInline = true : VMs can be defined
inline in templates
        [INFO] Velocimacro : allowInlineToOverride = false : VMs defined
inline may NOT replace previous VM definitions
        [INFO] Velocimacro : allowInlineLocal = false : VMs defined
inline will be  global in scope if allowed.
        [INFO] Velocimacro : initialization complete.
        [INFO] Velocity successfully started.
        [INFO] Preparing surefire-report:report
        [INFO] [resources:resources]
        [INFO] Using default encoding to copy filtered resources.
        [INFO] [compiler:compile]
        [INFO] Nothing to compile - all classes are up to date
        [INFO] [resources:testResources]
        [INFO] Using default encoding to copy filtered resources.
        [INFO] [compiler:testCompile]
        [INFO] Nothing to compile - all classes are up to date
        [INFO] [surefire:test]
        [INFO] Surefire report directory:
C:\workspace\shares-trunk\shares-domain\target\surefire-reports
         
        -------------------------------------------------------
         T E S T S
        -------------------------------------------------------
        
         
        ...<tests are run here - clears for confidentiality>...
         
        Results :
         
        Tests run: 54, Failures: 0, Errors: 0, Skipped: 0
         
        [INFO] Preparing surefire-report:report-only
        [INFO] No goals needed for project - skipping
        [INFO] [site:site]
        [WARNING] No URL defined for the project - decoration links will
not be resolved
        [INFO] Skipped "Surefire Report" report, file
"surefire-report.html" already exists for the English version.
        [INFO] Generating "Source Xref" report.
        [WARNING] Unable to locate Javadoc to link to - DISABLED
        [INFO] Generating "Test Source Xref" report.
        [INFO] Generating "Plugin Management" report.
        [INFO] Generating "Mailing Lists" report.
        [INFO] Generating "Continuous Integration" report.
        [INFO] Generating "Dependency Management" report.
        Downloading:
http://cfesstbos1:18080/nexus/content/groups/public/joda-time/joda-time-
jsptags/1.0.2/joda-time-jsptags-1.0.2.po
<http://cfesstbos1:18080/nexus/content/groups/public/joda-time/joda-time
-jsptags/1.0.2/joda-time-jsptags-1.0.2.po> 
        m
        [INFO] Generating "Project License" report.
        [INFO] Generating "Project Team" report.
        [INFO] Generating "Source Repository" report.
        [INFO] Generating "About" report.
        [INFO] Generating "Issue Tracking" report.
        [INFO] Generating "Project Summary" report.
        [INFO] Generating "Project Plugins" report.
        [INFO] Generating "Dependencies" report.
        [INFO] Generating "Surefire Report" report.
        [INFO]
------------------------------------------------------------------------
        [INFO] BUILD SUCCESSFUL
        [INFO]
------------------------------------------------------------------------
        [INFO] Total time: 30 seconds
        [INFO] Finished at: Mon Jan 05 11:01:09 EST 2009
        [INFO] Final Memory: 35M/74M
        [INFO]
------------------------------------------------------------------------
         
        C:\workspace\shares-trunk\shares-domain>

As you can see, my tests are executed twice, once as part of the
"install" goal and a second time under the "site" goal.  My POM has the
following declaration:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-report-plugin</artifactId>
            <version>2.4.3</version>
            <configuration>
             <formMode>once</formMode>
             <xrefLocation>
              ${project.reporting.outputDirectory}/../xref-test
             </xrefLocation>     
             <reportSets>
              <reportSet>
               <reports>
                <report>report-only</report>
               </reports>
              </reportSet>
             </reportSets>
             <systemProperties>
              <property>
               <name>env.props.path</name>
               <value>c:/environment.properties</value>
              </property>
             </systemProperties>
             <argLine>
              -Denv.props.path=c:/environment.properties
             </argLine>
            </configuration>    
           </plugin>

No other surefire configuration is specified.  Given the conversation
occuring in SUREFIRE-257, I would assume that my tests would only be
executed once.  Should this be the case or is it expected that the tests
are run for each goal?
 
Thanks!
Leo

Reply via email to