pax_global_header 0000666 0000000 0000000 00000000064 13307561046 0014517 g ustar 00root root 0000000 0000000 52 comment=8cfffce8c36f6f22cd1a78fcd241d246da977a6c
maven-surefire-surefire-2.22.0/ 0000775 0000000 0000000 00000000000 13307561046 0016354 5 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/.gitattributes 0000664 0000000 0000000 00000000340 13307561046 0021244 0 ustar 00root root 0000000 0000000 # Auto detect text files and perform LF normalization
* text eol=lf
*.xml text diff=xml
*.java text diff=java
*.html text diff=html
*.vm text
*.fml text
*.md text
*.css text
*.js text
*.sql text
maven-surefire-surefire-2.22.0/.gitignore 0000664 0000000 0000000 00000000220 13307561046 0020336 0 ustar 00root root 0000000 0000000 *.iml
*.ipr
target
*.iws
.classpath
dependency-reduced-pom.xml
build
.classpath
.project
.settings
.idea
.surefire-*
.DS_Store
*.versionsBackup
maven-surefire-surefire-2.22.0/.travis.yml 0000664 0000000 0000000 00000000474 13307561046 0020472 0 ustar 00root root 0000000 0000000 language: java
jdk:
- oraclejdk8
# - oraclejdk9
script: "rm -rf .repository && mvn --show-version --errors --batch-mode -Prun-its clean install -Dmaven.repo.local=.repository -Denforcer.skip=true -e"
install: true
branches:
except:
- gh-pages
notifications:
email:
- olamy@apache.org
maven-surefire-surefire-2.22.0/CONTRIBUTING.md 0000664 0000000 0000000 00000001747 13307561046 0020616 0 ustar 00root root 0000000 0000000
Guidelines for contributing
===========
The general guidelines for contributing to maven can be found here http://maven.apache.org/guides/development/guide-helping.html
Pay particular attention to "Developer Conventions" section.
maven-surefire-surefire-2.22.0/Jenkinsfile 0000664 0000000 0000000 00000024635 13307561046 0020552 0 ustar 00root root 0000000 0000000 #!/usr/bin/env groovy
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
properties(
[
buildDiscarder(logRotator(artifactDaysToKeepStr: env.BRANCH_NAME == 'master' ? '30' : '7',
artifactNumToKeepStr: '10',
daysToKeepStr: env.BRANCH_NAME == 'master' ? '30' : '7',
numToKeepStr: '10')
),
disableConcurrentBuilds()
]
)
final def oses = ['linux':'ubuntu', 'windows':'Windows && !windows-2012-3']
final def mavens = env.BRANCH_NAME == 'master' ? ['3.2.x', '3.3.x', '3.5.x'] : ['3.5.x']
final def jdks = [7, 8, 9, 10]
final def options = ['-e', '-V', '-B', '-nsu', '-P', 'run-its']
final def goals = ['clean', 'install', 'jacoco:report']
final Map stages = [:]
oses.eachWithIndex { osMapping, indexOfOs ->
mavens.eachWithIndex { maven, indexOfMaven ->
jdks.eachWithIndex { jdk, indexOfJdk ->
def os = osMapping.key
def label = osMapping.value
final String jdkTestName = jenkinsEnv.jdkFromVersion(os, jdk.toString())
final String jdkName = jenkinsEnv.jdkFromVersion(os, '8')
final String mvnName = jenkinsEnv.mvnFromVersion(os, maven)
final String stageKey = "${os}-jdk${jdk}-maven${maven}"
def mavenOpts = '-server -XX:+UseG1GC -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+UseNUMA \
-Xms64m -Djava.awt.headless=true'
if (jdk > 7) {
mavenOpts += ' -XX:+UseStringDeduplication'
}
mavenOpts += (os == 'linux' ? ' -Xmx1g' : ' -Xmx256m')
if (label == null || jdkTestName == null || mvnName == null) {
println "Skipping ${stageKey} as unsupported by Jenkins Environment."
return;
}
println "${stageKey} ==> Label: ${label}, JDK: ${jdkTestName}, Maven: ${mvnName}."
stages[stageKey] = {
node(label) {
timestamps {
//https://github.com/jacoco/jacoco/issues/629
def boolean makeReports = os == 'linux' && indexOfMaven == mavens.size() - 1 && jdk == 9
def failsafeItPort = 8000 + 100 * indexOfMaven + 10 * indexOfJdk
def allOptions = options + ["-Dfailsafe-integration-test-port=${failsafeItPort}", "-Dfailsafe-integration-test-stop-port=${1 + failsafeItPort}"]
buildProcess(stageKey, jdkName, jdkTestName, mvnName, goals, allOptions, mavenOpts, makeReports)
}
}
}
}
}
}
timeout(time: 12, unit: 'HOURS') {
try {
parallel(stages)
// JENKINS-34376 seems to make it hard to detect the aborted builds
} catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
println "org.jenkinsci.plugins.workflow.steps.FlowInterruptedException: ${e}"
// this ambiguous condition means a user probably aborted
if (e.causes.size() == 0) {
currentBuild.result = 'ABORTED'
} else {
currentBuild.result = 'FAILURE'
}
throw e
} catch (hudson.AbortException e) {
println "hudson.AbortException: ${e}"
// this ambiguous condition means during a shell step, user probably aborted
if (e.getMessage().contains('script returned exit code 143')) {
currentBuild.result = 'ABORTED'
} else {
currentBuild.result = 'FAILURE'
}
throw e
} catch (InterruptedException e) {
println "InterruptedException: ${e}"
currentBuild.result = 'ABORTED'
throw e
} catch (Throwable e) {
println "Throwable: ${e}"
currentBuild.result = 'FAILURE'
throw e
} finally {
stage("notifications") {
//jenkinsNotify()
}
}
}
def buildProcess(String stageKey, String jdkName, String jdkTestName, String mvnName, goals, options, mavenOpts, boolean makeReports) {
cleanWs()
try {
def mvnLocalRepoDir = null
if (isUnix()) {
sh 'mkdir -p .m2'
mvnLocalRepoDir = "${pwd()}/.m2"
} else {
bat 'mkdir .m2'
mvnLocalRepoDir = "${pwd()}\\.m2"
}
println "Maven Local Repository = ${mvnLocalRepoDir}."
assert mvnLocalRepoDir != null : 'Local Maven Repository is undefined.'
stage("checkout ${stageKey}") {
checkout scm
}
def properties = ["-Djacoco.skip=${!makeReports}", "\"-Dmaven.repo.local=${mvnLocalRepoDir}\""]
println "Setting JDK for testing ${jdkName}"
def cmd = ['mvn'] + goals + options + properties
stage("build ${stageKey}") {
if (isUnix()) {
withEnv(["JAVA_HOME=${tool(jdkName)}",
"JAVA_HOME_IT=${tool(jdkTestName)}",
"MAVEN_OPTS=${mavenOpts}",
"PATH+MAVEN=${tool(mvnName)}/bin:${env.JAVA_HOME}/bin"
]) {
sh 'echo JAVA_HOME=$JAVA_HOME, JAVA_HOME_IT=$JAVA_HOME_IT'
def script = cmd + ['\"-Djdk.home=$JAVA_HOME_IT\"']
sh script.join(' ')
}
} else {
withEnv(["JAVA_HOME=${tool(jdkName)}",
"JAVA_HOME_IT=${tool(jdkTestName)}",
"MAVEN_OPTS=${mavenOpts}",
"PATH+MAVEN=${tool(mvnName)}\\bin;${env.JAVA_HOME}\\bin"
]) {
bat 'echo JAVA_HOME=%JAVA_HOME%, JAVA_HOME_IT=%JAVA_HOME_IT%'
def script = cmd + ['\"-Djdk.home=%JAVA_HOME_IT%\"']
bat script.join(' ')
}
}
}
} finally {
stage("reporting ${stageKey}") {
if (makeReports) {
openTasks(ignoreCase: true, canComputeNew: false, defaultEncoding: 'UTF-8', pattern: sourcesPatternCsv(),
high: tasksViolationHigh(), normal: tasksViolationNormal(), low: tasksViolationLow())
jacoco(changeBuildStatus: false,
execPattern: '**/*.exec',
sourcePattern: sourcesPatternCsv(),
classPattern: classPatternCsv())
junit(healthScaleFactor: 0.0,
allowEmptyResults: true,
keepLongStdio: true,
testResults: testReportsPatternCsv())
if (currentBuild.result == 'UNSTABLE') {
currentBuild.result = 'FAILURE'
}
}
if (fileExists('maven-failsafe-plugin/target/it')) {
zip(zipFile: "maven-failsafe-plugin--${stageKey}.zip", dir: 'maven-failsafe-plugin/target/it', archive: true)
}
if (fileExists('surefire-its/target')) {
zip(zipFile: "surefire-its--${stageKey}.zip", dir: 'surefire-its/target', archive: true)
}
archiveArtifacts(artifacts: "*--${stageKey}.zip", allowEmptyArchive: true, onlyIfSuccessful: false)
}
stage("cleanup ${stageKey}") {
// clean up after ourselves to reduce disk space
cleanWs()
}
}
}
@NonCPS
static def sourcesPatternCsv() {
return '**/maven-failsafe-plugin/src/main/java,' +
'**/maven-surefire-common/src/main/java,' +
'**/maven-surefire-plugin/src/main/java,' +
'**/maven-surefire-report-plugin/src/main/java,' +
'**/surefire-api/src/main/java,' +
'**/surefire-booter/src/main/java,' +
'**/surefire-grouper/src/main/java,' +
'**/surefire-its/src/main/java,' +
'**/surefire-logger-api/src/main/java,' +
'**/surefire-providers/**/src/main/java,' +
'**/surefire-report-parser/src/main/java'
}
@NonCPS
static def classPatternCsv() {
return '**/maven-failsafe-plugin/target/classes,' +
'**/maven-surefire-common/target/classes,' +
'**/maven-surefire-plugin/target/classes,' +
'**/maven-surefire-report-plugin/target/classes,' +
'**/surefire-api/target/classes,' +
'**/surefire-booter/target/classes,' +
'**/surefire-grouper/target/classes,' +
'**/surefire-its/target/classes,' +
'**/surefire-logger-api/target/classes,' +
'**/surefire-providers/**/target/classes,' +
'**/surefire-report-parser/target/classes'
}
@NonCPS
static def tasksViolationLow() {
return '@SuppressWarnings'
}
@NonCPS
static def tasksViolationNormal() {
return 'TODO,FIXME,@deprecated'
}
@NonCPS
static def tasksViolationHigh() {
return 'finalize(),Locale.setDefault,TimeZone.setDefault,\
System.out,System.err,System.setOut,System.setErr,System.setIn,System.exit,System.gc,System.runFinalization,System.load'
}
@NonCPS
static def testReportsPatternCsv() {
return '**/maven-failsafe-plugin/target/surefire-reports/*.xml,' +
'**/maven-surefire-common/target/surefire-reports/*.xml,' +
'**/maven-surefire-plugin/target/surefire-reports/*.xml,' +
'**/maven-surefire-report-plugin/target/surefire-reports/*.xml,' +
'**/surefire-api/target/surefire-reports/*.xml,' +
'**/surefire-booter/target/surefire-reports/*.xml,' +
'**/surefire-grouper/target/surefire-reports/*.xml,' +
'**/surefire-its/target/surefire-reports/*.xml,' +
'**/surefire-logger-api/target/surefire-reports/*.xml,' +
'**/surefire-providers/**/target/surefire-reports/*.xml,' +
'**/surefire-report-parser/target/surefire-reports/*.xml,' +
'**/surefire-its/target/failsafe-reports/*.xml'
}
maven-surefire-surefire-2.22.0/README.md 0000664 0000000 0000000 00000007502 13307561046 0017637 0 ustar 00root root 0000000 0000000 [](https://maven.apache.org/surefire/) [](https://jenkins-ci.org/)
[](https://github.com/apache/maven-surefire/)
# The Maven Community
[](https://maven.apache.org/community.html) [Join us @ irc://freenode/maven] or [Webchat with us @channel maven]
# Release Notes
[](https://maven-badges.herokuapp.com/maven-central/org.apache.maven.surefire/surefire)
[JIRA Change Log]
Usage of [maven-surefire-plugin], [maven-failsafe-plugin], [maven-surefire-report-plugin].
# Project Documentation
[](https://maven.apache.org/surefire/)
# Build Status
[](https://builds.apache.org/job/maven-wip/job/maven-surefire/depgraph-view/) Maven 2.2.1 Plugin API
[](http://www.apache.org/licenses/LICENSE-2.0.html) [](https://builds.apache.org/job/maven-wip/job/maven-surefire/job/master/lastBuild/testReport/) [](https://builds.apache.org/job/maven-wip/job/maven-surefire/job/master/)
# Development Information
In order to build Surefire project use **Maven 3.1.0+** and **JDK 1.8**.
But in order to run IT tests, you can do:
* In order to run tests for a release check during the vote the following memory requirements are needed:
**(on Linux/Unix)** *export MAVEN_OPTS="-server -Xmx512m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true -Dhttps.protocols=TLSv1"*
**(on Windows)** *set MAVEN_OPTS="-server -Xmx256m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m -XX:+UseG1GC -XX:+UseStringDeduplication -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:SoftRefLRUPolicyMSPerMB=50 -Djava.awt.headless=true -Dhttps.protocols=TLSv1"*
* In order to run the build with **JDK 9** **on Windows** (**on Linux/Unix modify system property jdk.home**):
*mvn install site site:stage -P reporting,run-its "-Djdk.home=e:\Program Files\Java\jdk9\"*
* In order to run the build with **JDK 10** disable JaCoCo due to a [bug in JaCoCo](https://github.com/jacoco/jacoco/issues/629)
*mvn install site site:stage -P reporting,run-its -Djacoco.skip=true "-Djdk.home=e:\Program Files\Java\jdk10\"*
### Deploying web site
See http://maven.apache.org/developers/website/deploy-component-reference-documentation.html
[Join us @ irc://freenode/maven]: https://www.irccloud.com/invite?channel=maven&hostname=irc.freenode.net&port=6697&ssl=1
[Webchat with us @channel maven]: http://webchat.freenode.net/?channels=%23maven
[JIRA Change Log]: https://issues.apache.org/jira/browse/SUREFIRE/?selectedTab=com.atlassian.jira.jira-projects-plugin:changelog-panel
[maven-surefire-plugin]: https://maven.apache.org/surefire/maven-surefire-plugin/usage.html
[maven-failsafe-plugin]: https://maven.apache.org/surefire/maven-failsafe-plugin/usage.html
[maven-surefire-report-plugin]: https://maven.apache.org/surefire/maven-surefire-report-plugin/usage.html
maven-surefire-surefire-2.22.0/deploySite.sh 0000664 0000000 0000000 00000001543 13307561046 0021034 0 ustar 00root root 0000000 0000000 #!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
mvn -Preporting site site:stage $@
mvn scm-publish:publish-scm $@
maven-surefire-surefire-2.22.0/maven-failsafe-plugin/ 0000775 0000000 0000000 00000000000 13307561046 0022526 5 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/pom.xml 0000664 0000000 0000000 00000027410 13307561046 0024047 0 ustar 00root root 0000000 0000000
4.0.0
org.apache.maven.surefire
surefire
2.22.0
org.apache.maven.plugins
maven-failsafe-plugin
maven-plugin
Maven Failsafe Plugin
Maven Failsafe MOJO in maven-failsafe-plugin.
2.2.1
Failsafe
Surefire
8084
8085
org.apache.maven.surefire
maven-surefire-common
org.apache.maven.plugins
maven-surefire-plugin
${project.version}
provided
zip
site-source
org.apache.maven.shared
maven-shared-utils
org.apache.commons
commons-lang3
commons-io
commons-io
org.mockito
mockito-core
test
org.apache.maven.plugins
maven-plugin-plugin
true
mojo-descriptor
process-classes
descriptor
help-goal
helpmojo
maven-surefire-plugin
org.apache.maven.surefire
surefire-shadefire
2.12.4
**/JUnit4SuiteTest.java
maven-dependency-plugin
site-site
pre-site
unpack-dependencies
maven-surefire-plugin
provided
zip
site-source
${project.build.directory}/source-site
true
maven-resources-plugin
copy-resources
pre-site
copy-resources
${basedir}/../target/source-site
${basedir}/../src/site
false
org.apache.maven.plugins
maven-antrun-plugin
1.8
generate-test-report
pre-site
run
org.apache.maven.plugins
maven-site-plugin
${project.build.directory}/source-site
org.apache.maven.plugins
maven-shade-plugin
package
shade
true
org.apache.maven.shared:maven-shared-utils
commons-io:commons-io
org.apache.commons:commons-lang3
org.apache.maven.shared
org.apache.maven.surefire.shade.org.apache.maven.shared
org.apache.commons.io
org.apache.maven.surefire.shade.org.apache.commons.io
org.apache.commons.lang3
org.apache.maven.surefire.shade.org.apache.commons.lang3
org.apache.maven.plugins
maven-plugin-plugin
${mavenPluginPluginVersion}
ci
enableCiProfile
true
maven-docck-plugin
1.0
check
run-its
false
verify
org.apache.maven.plugins
maven-invoker-plugin
pre-its
pre-integration-test
install
${skipTests}
integration-test
run
src/it
${project.build.directory}/it
clean
verify
-nsu
dummy-*/pom.xml
*/pom.xml
verify
src/it/settings.xml
${skipTests}
false
true
${failsafe-integration-test-port}
${failsafe-integration-test-stop-port}
${jdk.home}
${project.build.directory}/local-repo
reporting
org.apache.maven.plugins
maven-changes-plugin
false
jira-report
maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/ 0000775 0000000 0000000 00000000000 13307561046 0023315 5 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/ 0000775 0000000 0000000 00000000000 13307561046 0023731 5 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing/ 0000775 0000000 0000000 00000000000 13307561046 0030243 5 ustar 00root root 0000000 0000000 invoker.properties 0000664 0000000 0000000 00000001600 13307561046 0033754 0 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
invoker.buildResult=failure
# build project if JRE version is 1.7 or higher
invoker.java.version = 1.7+
maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing/pom.xml 0000664 0000000 0000000 00000010772 13307561046 0031567 0 ustar 00root root 0000000 0000000
4.0.0
localhost
jetty-war-test-failing
1.0
war
run failing tests in jetty container
javax.servlet
servlet-api
2.5
provided
junit
junit
3.8.2
test
net.sourceforge.htmlunit
htmlunit
2.3
test
true
integration-test.properties
${basedir}/src/test/resources
false
integration-test.properties
${basedir}/src/test/resources
org.eclipse.jetty
jetty-maven-plugin
${jetty-version}
${integration-test-stop-port}
STOP
${integration-test-port}
60000
start-jetty
pre-integration-test
stop
run-exploded
0
true
stop-jetty
post-integration-test
stop
@project.groupId@
@project.artifactId@
@project.version@
integration-test
integration-test
verify
verify
UTF-8
UTF-8
8083
18009
9.2.2.v20140723
1.7
1.7
maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing/src/ 0000775 0000000 0000000 00000000000 13307561046 0031032 5 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing/src/main/ 0000775 0000000 0000000 00000000000 13307561046 0031756 5 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing/src/main/webapp/ 0000775 0000000 0000000 00000000000 13307561046 0033234 5 ustar 00root root 0000000 0000000 WEB-INF/ 0000775 0000000 0000000 00000000000 13307561046 0034204 5 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing/src/main/webapp web.xml 0000664 0000000 0000000 00000002155 13307561046 0035506 0 ustar 00root root 0000000 0000000 maven-surefire-surefire-2.22.0/maven-failsafe-plugin/src/it/jetty-war-test-failing/src/main/webapp/WEB-INF