Re: odd behavior of running tests with surefire plugin

2013-07-30 Thread Jeff MAURY
Can you give us the kind of error messages you got when Jetty fails ?

Jeff


On Tue, Jul 30, 2013 at 5:26 AM, ginger ginger...@gmail.com wrote:

 Hello, Maven gurus,

 We run into something very bizarre when trying to run some unit tests that
 use a embedded jetty server with  surefire and cobertura. It works well
 with our original configuration like

 build
 pluginManagement
 plugins
 plugin
 groupIdorg.codehaus.mojo/**groupId
 artifactIdcobertura-maven-**plugin/artifactId
 configuration
 skip${maven.test.skip}/**skip
 check
 branchRate30/branchRate
 lineRate30/lineRate
 haltOnFailuretrue/**haltOnFailure
 totalBranchRate55/**totalBranchRate
 totalLineRate55/**totalLineRate
 packageLineRate50/**packageLineRate
 packageBranchRate50/**packageBranchRate
 /check
 /configuration
 executions
 execution
 goals
 goalclean/goal
 goalcheck/goal
 /goals
 /execution
 /executions
 /plugin
 /plugins
 /pluginManagement
 plugins
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-compiler-**plugin/artifactId
 configuration
 source1.6/source
 target1.6/target
 /configuration
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-war-plugin/**artifactId
 configuration
 warNamecxf/warName
 /configuration
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-dependency-**plugin/artifactId
 executions
 execution
 idinstall/id
 phaseinstall/phase
 /execution
 /executions
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-surefire-**plugin/artifactId
 configuration
 argLine-Xms512m -Xmx1024m
 -XX:MaxPermSize=512m/argLine
 junitArtifactNamejunit:**junit/junitArtifactName
 includes
 include**/*UnitTest*/**include
 include**/*JettyTest*/**include
 /includes
 /configuration
 /plugin
 plugin
 groupIdorg.codehaus.mojo/**groupId
 artifactIdsonar-maven-**plugin/artifactId
 version2.0/version
 /plugin
 /plugins
 extensions
 extension
 groupIdorg.apache.maven.**wagon/groupId
 artifactIdwagon-ssh/**artifactId
 version1.0-beta-6/version
 /extension
 /extensions
 /build


 But when I tried to separate the running of UnitTest and JettyTest like
 the following, so UnitTest are run all the time and JettyTests are only run
 in a specific profile,

 build
 pluginManagement
 plugins
 !-- surefire stays here or it overrides the definition in
 profiles --
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-surefire-**plugin/artifactId
 configuration
 argLine-Xms512m -Xmx1024m
 -XX:MaxPermSize=512m/argLine
 junitArtifactNamejunit:**junit/junitArtifactName
 includes
 include**/*UnitTest*/**include
 /includes
 /configuration
 /plugin
 /plugins
 /pluginManagement
 plugins
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-compiler-**plugin/artifactId
 configuration
 source1.6/source
 target1.6/target
 /configuration
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-war-plugin/**artifactId
 configuration
 warNamecxf/warName
 /configuration
 /plugin
 plugin
 groupIdorg.apache.maven.**plugins/groupId
 artifactIdmaven-dependency-**plugin/artifactId
 executions
 execution
 idinstall/id
 phaseinstall/phase
 /execution
 /executions
 /plugin
 plugin
 groupIdorg.codehaus.mojo/**groupId
 artifactIdsonar-maven-**plugin/artifactId
 version2.0/version
 /plugin
 /plugins
 

odd behavior of running tests with surefire plugin

2013-07-29 Thread ginger

Hello, Maven gurus,

We run into something very bizarre when trying to run some unit tests 
that use a embedded jetty server with  surefire and cobertura. It works 
well with our original configuration like


build
pluginManagement
plugins
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdcobertura-maven-plugin/artifactId
configuration
skip${maven.test.skip}/skip
check
branchRate30/branchRate
lineRate30/lineRate
haltOnFailuretrue/haltOnFailure
totalBranchRate55/totalBranchRate
totalLineRate55/totalLineRate
packageLineRate50/packageLineRate
packageBranchRate50/packageBranchRate
/check
/configuration
executions
execution
goals
goalclean/goal
goalcheck/goal
/goals
/execution
/executions
/plugin
/plugins
/pluginManagement
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
source1.6/source
target1.6/target
/configuration
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration
warNamecxf/warName
/configuration
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
executions
execution
idinstall/id
phaseinstall/phase
/execution
/executions
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
configuration
argLine-Xms512m -Xmx1024m 
-XX:MaxPermSize=512m/argLine

junitArtifactNamejunit:junit/junitArtifactName
includes
include**/*UnitTest*/include
include**/*JettyTest*/include
/includes
/configuration
/plugin
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdsonar-maven-plugin/artifactId
version2.0/version
/plugin
/plugins
extensions
extension
groupIdorg.apache.maven.wagon/groupId
artifactIdwagon-ssh/artifactId
version1.0-beta-6/version
/extension
/extensions
/build


But when I tried to separate the running of UnitTest and JettyTest like 
the following, so UnitTest are run all the time and JettyTests are only 
run in a specific profile,


build
pluginManagement
plugins
!-- surefire stays here or it overrides the definition 
in profiles --

plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-surefire-plugin/artifactId
configuration
argLine-Xms512m -Xmx1024m 
-XX:MaxPermSize=512m/argLine

junitArtifactNamejunit:junit/junitArtifactName
includes
include**/*UnitTest*/include
/includes
/configuration
/plugin
/plugins
/pluginManagement
plugins
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-compiler-plugin/artifactId
configuration
source1.6/source
target1.6/target
/configuration
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-war-plugin/artifactId
configuration
warNamecxf/warName
/configuration
/plugin
plugin
groupIdorg.apache.maven.plugins/groupId
artifactIdmaven-dependency-plugin/artifactId
executions
execution
idinstall/id
phaseinstall/phase
/execution
/executions
/plugin
plugin
groupIdorg.codehaus.mojo/groupId
artifactIdsonar-maven-plugin/artifactId
version2.0/version
/plugin
/plugins
extensions
extension
groupIdorg.apache.maven.wagon/groupId
artifactIdwagon-ssh/artifactId
version1.0-beta-6/version
/extension
/extensions
/build

and get the JettyTest and Cobertura in a profile called all-test

profiles
profile
idall-test/id
build