Updated dependencies.
This commit is contained in:
parent
e77c8595cb
commit
7dc9a51a7f
16 changed files with 449 additions and 295 deletions
|
@ -1,15 +1,12 @@
|
||||||
version: 2
|
version: 2
|
||||||
jobs:
|
defaults: &defaults
|
||||||
build:
|
|
||||||
docker:
|
|
||||||
- image: circleci/openjdk:8-jdk
|
|
||||||
|
|
||||||
working_directory: ~/repo
|
working_directory: ~/repo
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
JVM_OPTS: -Xmx3200m
|
JVM_OPTS: -Xmx3200m
|
||||||
TERM: dumb
|
TERM: dumb
|
||||||
|
CI_NAME: "CircleCI"
|
||||||
|
|
||||||
|
defaults_gradle: &defaults_gradle
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
|
@ -17,21 +14,42 @@ jobs:
|
||||||
- gradle-dependencies-{{ checksum "build.gradle" }}
|
- gradle-dependencies-{{ checksum "build.gradle" }}
|
||||||
# fallback to using the latest cache if no exact match is found
|
# fallback to using the latest cache if no exact match is found
|
||||||
- gradle-dependencies-
|
- gradle-dependencies-
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Gradle Dependencies
|
name: Gradle Dependencies
|
||||||
command: ./gradlew dependencies
|
command: ./gradlew dependencies
|
||||||
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
paths: ~/.m2
|
paths:
|
||||||
|
- ~/.m2
|
||||||
key: gradle-dependencies-{{ checksum "build.gradle" }}
|
key: gradle-dependencies-{{ checksum "build.gradle" }}
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Run All Checks
|
name: Run All Checks
|
||||||
command: ./gradlew check
|
command: ./gradlew check
|
||||||
|
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
path: build/reports/
|
path: build/reports/
|
||||||
destination: reports
|
destination: reports
|
||||||
- store_test_results:
|
- store_test_results:
|
||||||
path: build/reports/
|
path: build/reports/
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_gradle_jdk17:
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
docker:
|
||||||
|
- image: cimg/openjdk:17.0
|
||||||
|
|
||||||
|
<<: *defaults_gradle
|
||||||
|
|
||||||
|
build_gradle_jdk8:
|
||||||
|
<<: *defaults
|
||||||
|
|
||||||
|
docker:
|
||||||
|
- image: circleci/openjdk:8-jdk
|
||||||
|
|
||||||
|
<<: *defaults_gradle
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
gradle:
|
||||||
|
jobs:
|
||||||
|
- build_gradle_jdk8
|
||||||
|
- build_gradle_jdk17
|
||||||
|
|
2
.github/workflows/gradle.yml
vendored
2
.github/workflows/gradle.yml
vendored
|
@ -12,7 +12,7 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
java-version: [ 1.8, 11, 15 ]
|
java-version: [ 1.8, 11, 17, 18 ]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
|
@ -0,0 +1 @@
|
||||||
|
httpstatus
|
9
.idea/HttpStatus.iml
generated
9
.idea/HttpStatus.iml
generated
|
@ -1,9 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<module type="JAVA_MODULE" version="4">
|
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
||||||
<exclude-output />
|
|
||||||
<content url="file://$MODULE_DIR$" />
|
|
||||||
<orderEntry type="inheritedJdk" />
|
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
|
||||||
</component>
|
|
||||||
</module>
|
|
6
.idea/compiler.xml
generated
Normal file
6
.idea/compiler.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CompilerConfiguration">
|
||||||
|
<bytecodeTargetLevel target="1.8" />
|
||||||
|
</component>
|
||||||
|
</project>
|
7
.idea/inspectionProfiles/Project_Default.xml
generated
7
.idea/inspectionProfiles/Project_Default.xml
generated
|
@ -2,7 +2,6 @@
|
||||||
<profile version="1.0">
|
<profile version="1.0">
|
||||||
<option name="myName" value="Project Default" />
|
<option name="myName" value="Project Default" />
|
||||||
<inspection_tool class="AndroidLintNewerVersionAvailable" enabled="true" level="WARNING" enabled_by_default="true" />
|
<inspection_tool class="AndroidLintNewerVersionAvailable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="FieldMayBeFinal" enabled="true" level="WARNING" enabled_by_default="true" />
|
|
||||||
<inspection_tool class="FieldNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
|
<inspection_tool class="FieldNamingConvention" enabled="true" level="WARNING" enabled_by_default="true">
|
||||||
<extension name="InstanceVariableNamingConvention" enabled="true">
|
<extension name="InstanceVariableNamingConvention" enabled="true">
|
||||||
<option name="m_regex" value="^[a-z][a-z0-9][a-zA-Z0-9]*$" />
|
<option name="m_regex" value="^[a-z][a-z0-9][a-zA-Z0-9]*$" />
|
||||||
|
@ -47,13 +46,9 @@
|
||||||
<option name="REPORT_VARIABLES" value="true" />
|
<option name="REPORT_VARIABLES" value="true" />
|
||||||
<option name="REPORT_PARAMETERS" value="true" />
|
<option name="REPORT_PARAMETERS" value="true" />
|
||||||
<option name="REPORT_CATCH_PARAMETERS" value="false" />
|
<option name="REPORT_CATCH_PARAMETERS" value="false" />
|
||||||
|
<option name="REPORT_IMPLICIT_FINALS" value="false" />
|
||||||
</inspection_tool>
|
</inspection_tool>
|
||||||
<inspection_tool class="NonFinalUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
<inspection_tool class="NonFinalUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
<inspection_tool class="UnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
|
<inspection_tool class="UnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
<inspection_tool class="WeakerAccess" enabled="false" level="WARNING" enabled_by_default="false">
|
|
||||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
|
|
||||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="true" />
|
|
||||||
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
|
|
||||||
</inspection_tool>
|
|
||||||
</profile>
|
</profile>
|
||||||
</component>
|
</component>
|
30
.idea/jarRepositories.xml
generated
Normal file
30
.idea/jarRepositories.xml
generated
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RemoteRepositoriesConfiguration">
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="central" />
|
||||||
|
<option name="name" value="Maven Central repository" />
|
||||||
|
<option name="url" value="https://repo1.maven.org/maven2" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="jboss.community" />
|
||||||
|
<option name="name" value="JBoss Community repository" />
|
||||||
|
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="MavenLocal" />
|
||||||
|
<option name="name" value="MavenLocal" />
|
||||||
|
<option name="url" value="file:$MAVEN_REPOSITORY$/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="MavenRepo" />
|
||||||
|
<option name="name" value="MavenRepo" />
|
||||||
|
<option name="url" value="https://repo.maven.apache.org/maven2/" />
|
||||||
|
</remote-repository>
|
||||||
|
<remote-repository>
|
||||||
|
<option name="id" value="maven" />
|
||||||
|
<option name="name" value="maven" />
|
||||||
|
<option name="url" value="https://oss.sonatype.org/content/repositories/snapshots" />
|
||||||
|
</remote-repository>
|
||||||
|
</component>
|
||||||
|
</project>
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
@ -1,6 +1,8 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="JavaScriptSettings">
|
<component name="JavaScriptSettings">
|
||||||
<option name="languageLevel" value="ES6" />
|
<option name="languageLevel" value="ES6" />
|
||||||
</component>
|
</component>
|
||||||
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="18" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
|
@ -1,8 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="ProjectModuleManager">
|
|
||||||
<modules>
|
|
||||||
<module fileurl="file://$PROJECT_DIR$/.idea/HttpStatus.iml" filepath="$PROJECT_DIR$/.idea/HttpStatus.iml" />
|
|
||||||
</modules>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
1
.idea/vcs.xml
generated
1
.idea/vcs.xml
generated
|
@ -1,6 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$USER_HOME$/Documents/Projects/HttpStatus" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
|
@ -23,7 +23,7 @@ cache:
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
matrix:
|
matrix:
|
||||||
- JAVA_HOME: C:\Program Files\Java\jdk15
|
- JAVA_HOME: C:\Program Files\Java\jdk17
|
||||||
- JAVA_HOME: C:\Program Files\Java\jdk11
|
- JAVA_HOME: C:\Program Files\Java\jdk11
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
|
|
32
build.gradle
32
build.gradle
|
@ -1,5 +1,4 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'checkstyle'
|
|
||||||
id 'java'
|
id 'java'
|
||||||
id 'jacoco'
|
id 'jacoco'
|
||||||
id 'idea'
|
id 'idea'
|
||||||
|
@ -7,10 +6,10 @@ plugins {
|
||||||
id 'maven-publish'
|
id 'maven-publish'
|
||||||
id 'signing'
|
id 'signing'
|
||||||
id 'pmd'
|
id 'pmd'
|
||||||
id 'com.github.ben-manes.versions' version '0.38.0'
|
id 'com.github.ben-manes.versions' version '0.42.0'
|
||||||
id 'net.thauvin.erik.gradle.semver' version '1.0.4'
|
id 'net.thauvin.erik.gradle.semver' version '1.0.4'
|
||||||
id 'com.github.spotbugs' version '4.7.1'
|
id 'com.github.spotbugs' version '5.0.6'
|
||||||
id 'org.sonarqube' version '3.2.0'
|
id 'org.sonarqube' version '3.3'
|
||||||
}
|
}
|
||||||
|
|
||||||
import com.github.spotbugs.snom.SpotBugsTask
|
import com.github.spotbugs.snom.SpotBugsTask
|
||||||
|
@ -35,20 +34,20 @@ mainClassName = 'net.thauvin.erik.httpstatus.Reasons'
|
||||||
ext {
|
ext {
|
||||||
versions = [
|
versions = [
|
||||||
pmd: '6.35.0',
|
pmd: '6.35.0',
|
||||||
spotbugs: '4.2.3'
|
spotbugs: '4.6.0'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenLocal()
|
mavenLocal()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'javax.servlet:javax.servlet-api:4.0.1'
|
compileOnly 'javax.servlet:javax.servlet-api:4.0.1'
|
||||||
implementation 'javax.servlet.jsp:jsp-api:2.2.1-b03'
|
compileOnly 'javax.servlet.jsp:jsp-api:2.2.1-b03'
|
||||||
implementation 'javax.el:javax.el-api:3.0.1-b06'
|
compileOnly 'javax.el:javax.el-api:3.0.1-b06'
|
||||||
|
|
||||||
|
|
||||||
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
|
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.11.0'
|
||||||
spotbugsPlugins 'com.mebigfatguy.sb-contrib:sb-contrib:7.4.7'
|
spotbugsPlugins 'com.mebigfatguy.sb-contrib:sb-contrib:7.4.7'
|
||||||
|
@ -56,7 +55,7 @@ dependencies {
|
||||||
compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
compileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
||||||
testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
testCompileOnly "com.github.spotbugs:spotbugs-annotations:$versions.spotbugs"
|
||||||
|
|
||||||
testImplementation 'org.testng:testng:7.4.0'
|
testImplementation 'org.testng:testng:7.5'
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
|
@ -114,13 +113,6 @@ pmd {
|
||||||
consoleOutput = true
|
consoleOutput = true
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(Checkstyle) {
|
|
||||||
reports {
|
|
||||||
xml.enabled = false
|
|
||||||
html.enabled = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType(SpotBugsTask) {
|
tasks.withType(SpotBugsTask) {
|
||||||
reports {
|
reports {
|
||||||
xml.enabled = false
|
xml.enabled = false
|
||||||
|
@ -223,9 +215,13 @@ task pandoc(type: Exec) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
jacoco {
|
||||||
|
toolVersion = '0.8.8-SNAPSHOT'
|
||||||
|
}
|
||||||
|
|
||||||
jacocoTestReport {
|
jacocoTestReport {
|
||||||
reports {
|
reports {
|
||||||
xml.enabled true
|
xml.required = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
195
docs/README.html
195
docs/README.html
|
@ -5,33 +5,34 @@
|
||||||
<meta name="generator" content="pandoc" />
|
<meta name="generator" content="pandoc" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
|
||||||
<title>HttpStatus JSP Tag Library</title>
|
<title>HttpStatus JSP Tag Library</title>
|
||||||
<style type="text/css">
|
<style>
|
||||||
code{white-space: pre-wrap;}
|
code{white-space: pre-wrap;}
|
||||||
span.smallcaps{font-variant: small-caps;}
|
span.smallcaps{font-variant: small-caps;}
|
||||||
span.underline{text-decoration: underline;}
|
span.underline{text-decoration: underline;}
|
||||||
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
div.column{display: inline-block; vertical-align: top; width: 50%;}
|
||||||
</style>
|
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||||
<style type="text/css">
|
ul.task-list{list-style: none;}
|
||||||
a.sourceLine { display: inline-block; line-height: 1.25; }
|
pre > code.sourceCode { white-space: pre; position: relative; }
|
||||||
a.sourceLine { pointer-events: none; color: inherit; text-decoration: inherit; }
|
pre > code.sourceCode > span { display: inline-block; line-height: 1.25; }
|
||||||
a.sourceLine:empty { height: 1.2em; }
|
pre > code.sourceCode > span:empty { height: 1.2em; }
|
||||||
.sourceCode { overflow: visible; }
|
code.sourceCode > span { color: inherit; text-decoration: inherit; }
|
||||||
code.sourceCode { white-space: pre; position: relative; }
|
|
||||||
div.sourceCode { margin: 1em 0; }
|
div.sourceCode { margin: 1em 0; }
|
||||||
pre.sourceCode { margin: 0; }
|
pre.sourceCode { margin: 0; }
|
||||||
@media screen {
|
@media screen {
|
||||||
div.sourceCode { overflow: auto; }
|
div.sourceCode { overflow: auto; }
|
||||||
}
|
}
|
||||||
@media print {
|
@media print {
|
||||||
code.sourceCode { white-space: pre-wrap; }
|
pre > code.sourceCode { white-space: pre-wrap; }
|
||||||
a.sourceLine { text-indent: -1em; padding-left: 1em; }
|
pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; }
|
||||||
}
|
}
|
||||||
pre.numberSource a.sourceLine
|
pre.numberSource code
|
||||||
{ position: relative; left: -4em; }
|
{ counter-reset: source-line 0; }
|
||||||
pre.numberSource a.sourceLine::before
|
pre.numberSource code > span
|
||||||
{ content: attr(title);
|
{ position: relative; left: -4em; counter-increment: source-line; }
|
||||||
|
pre.numberSource code > span > a:first-child::before
|
||||||
|
{ content: counter(source-line);
|
||||||
position: relative; left: -1em; text-align: right; vertical-align: baseline;
|
position: relative; left: -1em; text-align: right; vertical-align: baseline;
|
||||||
border: none; pointer-events: all; display: inline-block;
|
border: none; display: inline-block;
|
||||||
-webkit-touch-callout: none; -webkit-user-select: none;
|
-webkit-touch-callout: none; -webkit-user-select: none;
|
||||||
-khtml-user-select: none; -moz-user-select: none;
|
-khtml-user-select: none; -moz-user-select: none;
|
||||||
-ms-user-select: none; user-select: none;
|
-ms-user-select: none; user-select: none;
|
||||||
|
@ -42,7 +43,7 @@ pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-le
|
||||||
div.sourceCode
|
div.sourceCode
|
||||||
{ }
|
{ }
|
||||||
@media screen {
|
@media screen {
|
||||||
a.sourceLine::before { text-decoration: underline; }
|
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
|
||||||
}
|
}
|
||||||
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
|
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
|
||||||
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
|
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
|
||||||
|
@ -83,24 +84,36 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
|
||||||
<a href="https://github.com/ethauvin/httpstatus/actions/workflows/gradle.yml"><img src="https://github.com/ethauvin/httpstatus/actions/workflows/gradle.yml/badge.svg" alt="GitHub CI" /></a> <a href="https://ci.appveyor.com/project/ethauvin/httpstatus"><img src="https://ci.appveyor.com/api/projects/status/w5j4kul3w2rkigxb?svg=true" alt="Build status" /></a> <a href="https://circleci.com/gh/ethauvin/HttpStatus/tree/master"><img src="https://circleci.com/gh/ethauvin/HttpStatus/tree/master.svg?style=shield" alt="CircleCI" /></a></p>
|
<a href="https://github.com/ethauvin/httpstatus/actions/workflows/gradle.yml"><img src="https://github.com/ethauvin/httpstatus/actions/workflows/gradle.yml/badge.svg" alt="GitHub CI" /></a> <a href="https://ci.appveyor.com/project/ethauvin/httpstatus"><img src="https://ci.appveyor.com/api/projects/status/w5j4kul3w2rkigxb?svg=true" alt="Build status" /></a> <a href="https://circleci.com/gh/ethauvin/HttpStatus/tree/master"><img src="https://circleci.com/gh/ethauvin/HttpStatus/tree/master.svg?style=shield" alt="CircleCI" /></a></p>
|
||||||
<p>A simple <a href="http://www.oracle.com/technetwork/java/javaee/jsp/index.html">JSP</a> Tag Library to display the <a href="#hscode">code</a>, <a href="#hsreason">reason</a>, <a href="#hscode">cause</a> and/or <a href="#hsmessage">message</a> for <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP status codes</a> in JSP error pages.</p>
|
<p>A simple <a href="http://www.oracle.com/technetwork/java/javaee/jsp/index.html">JSP</a> Tag Library to display the <a href="#hscode">code</a>, <a href="#hsreason">reason</a>, <a href="#hscode">cause</a> and/or <a href="#hsmessage">message</a> for <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP status codes</a> in JSP error pages.</p>
|
||||||
<p>For example:</p>
|
<p>For example:</p>
|
||||||
<div class="sourceCode" id="cb1"><pre class="sourceCode jsp"><code class="sourceCode jsp"><a class="sourceLine" id="cb1-1" title="1"><%@ page<span class="ot"> isErrorPage</span>=<span class="st">"true"</span><span class="ot"> </span>%></a>
|
<div class="sourceCode" id="cb1"><pre class="sourceCode jsp"><code class="sourceCode jsp"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true"></a><span class="bu"><%@ page</span><span class="ot"> isErrorPage</span>=<span class="st">"true"</span><span class="ot"> </span><span class="bu">%></span></span>
|
||||||
<a class="sourceLine" id="cb1-2" title="2"><%@ taglib<span class="ot"> prefix</span>=<span class="st">"hs"</span><span class="ot"> uri</span>=<span class="st">"http://erik.thauvin.net/taglibs/httpstatus"</span><span class="ot"> </span>%></a>
|
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true"></a><span class="bu"><%@ taglib</span><span class="ot"> prefix</span>=<span class="st">"hs"</span><span class="ot"> uri</span>=<span class="st">"http://erik.thauvin.net/taglibs/httpstatus"</span><span class="ot"> </span><span class="bu">%></span></span>
|
||||||
<a class="sourceLine" id="cb1-3" title="3"><html><head></a>
|
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true"></a><html><head></span>
|
||||||
<a class="sourceLine" id="cb1-4" title="4"><title><span class="kw"><hs:code/></span> <span class="kw"><hs:reason</span><span class="ot"> default</span>=<span class="dt">"Server Error"</span><span class="kw">/></span></title></a>
|
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true"></a><title><span class="kw"><hs:code/></span> <span class="kw"><hs:reason</span><span class="ot"> default</span>=<span class="dt">"Server Error"</span><span class="kw">/></span></title></span>
|
||||||
<a class="sourceLine" id="cb1-5" title="5"></head></a>
|
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true"></a></head></span>
|
||||||
<a class="sourceLine" id="cb1-6" title="6"><h1><span class="kw"><hs:reason</span><span class="ot"> default</span>=<span class="dt">"Server Error"</span><span class="kw">/></span></h1></a>
|
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true"></a><h1><span class="kw"><hs:reason</span><span class="ot"> default</span>=<span class="dt">"Server Error"</span><span class="kw">/></span></h1></span>
|
||||||
<a class="sourceLine" id="cb1-7" title="7">Cause: <pre><span class="kw"><hs:cause</span><span class="ot"> default</span>=<span class="dt">"Unable to complete your request."</span><span class="kw">/></span></pre></a>
|
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true"></a>Cause: <pre><span class="kw"><hs:cause</span><span class="ot"> default</span>=<span class="dt">"Unable to complete your request."</span><span class="kw">/></span></pre></span>
|
||||||
<a class="sourceLine" id="cb1-8" title="8">Message: <pre><span class="kw"><hs:message</span><span class="ot"> default</span>=<span class="dt">"A server error has occured."</span><span class="kw">/></span></pre></a>
|
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true"></a>Message: <pre><span class="kw"><hs:message</span><span class="ot"> default</span>=<span class="dt">"A server error has occured."</span><span class="kw">/></span></pre></span>
|
||||||
<a class="sourceLine" id="cb1-9" title="9">...</a></code></pre></div>
|
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true"></a>...</span></code></pre></div>
|
||||||
<p>or</p>
|
<p>or</p>
|
||||||
<div class="sourceCode" id="cb2"><pre class="sourceCode jsp"><code class="sourceCode jsp"><a class="sourceLine" id="cb2-1" title="1"><%@ page<span class="ot"> isErrorPage</span>=<span class="st">"true"</span><span class="ot"> import</span>=<span class="st">"net.thauvin.erik.httpstatus.Reasons"</span><span class="ot"> </span>%></a>
|
<div class="sourceCode" id="cb2"><pre class="sourceCode jsp"><code class="sourceCode jsp"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true"></a><span class="bu"><%@ page</span><span class="ot"> isErrorPage</span>=<span class="st">"true"</span><span class="ot"> import</span>=<span class="st">"net.thauvin.erik.httpstatus.Reasons"</span><span class="ot"> </span><span class="bu">%></span></span>
|
||||||
<a class="sourceLine" id="cb2-2" title="2"><%= Reasons.getReasonPhrase(pageContext.getErrorData().getStatusCode()) %></a></code></pre></div>
|
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true"></a><span class="pp"><%=</span> Reasons.<span class="fu">getReasonPhrase</span>(pageContext.<span class="fu">getErrorData</span>().<span class="fu">getStatusCode</span>()) <span class="pp">%></span></span></code></pre></div>
|
||||||
<p>would display on a <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2">501 status code</a>:</p>
|
<p>would display on a <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.5.2">501 status code</a>:</p>
|
||||||
<pre><code>Not Implemented
|
<pre><code>Not Implemented
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
<h2 id="usage-with-gradle-or-maven">Usage with <a href="https://gradle.org/">Gradle</a> or <a href="http://maven.apache.org/">Maven</a></h2>
|
||||||
|
<p>Include the following in your <code>build.gradle</code> file:</p>
|
||||||
|
<pre class="gradle"><code>dependencies {
|
||||||
|
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.0.6'
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<p>or as a Maven artifact:</p>
|
||||||
|
<div class="sourceCode" id="cb5"><pre class="sourceCode xml"><code class="sourceCode xml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true"></a><span class="kw"><dependency></span></span>
|
||||||
|
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true"></a> <span class="kw"><groupId></span>net.thauvin.erik.httpstatus<span class="kw"></groupId></span></span>
|
||||||
|
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true"></a> <span class="kw"><artifactId></span>httpstatus<span class="kw"></artifactId></span></span>
|
||||||
|
<span id="cb5-4"><a href="#cb5-4" aria-hidden="true"></a> <span class="kw"><version></span>1.0.6<span class="kw"></version></span></span>
|
||||||
|
<span id="cb5-5"><a href="#cb5-5" aria-hidden="true"></a><span class="kw"></dependency></span></span></code></pre></div>
|
||||||
<h2 id="hscause">hs:cause</h2>
|
<h2 id="hscause">hs:cause</h2>
|
||||||
<p>The <code><hs:cause/></code> tag displays the cause of current HTTP status code, if any. A shorthand for:</p>
|
<p>The <code><hs:cause/></code> tag displays the cause of current HTTP status code, if any. A shorthand for:</p>
|
||||||
<div class="sourceCode" id="cb4"><pre class="sourceCode jsp"><code class="sourceCode jsp"><a class="sourceLine" id="cb4-1" title="1"><%= pageContext.getErrorData().getThrowable().getCause().getLocalizedMessage() %></a></code></pre></div>
|
<div class="sourceCode" id="cb6"><pre class="sourceCode jsp"><code class="sourceCode jsp"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true"></a><span class="pp"><%=</span> pageContext.<span class="fu">getErrorData</span>().<span class="fu">getThrowable</span>().<span class="fu">getCause</span>().<span class="fu">getLocalizedMessage</span>() <span class="pp">%></span></span></code></pre></div>
|
||||||
<p>Optional attributes are:</p>
|
<p>Optional attributes are:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -122,10 +135,10 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
|
||||||
</table>
|
</table>
|
||||||
<h2 id="hscode">hs:code</h2>
|
<h2 id="hscode">hs:code</h2>
|
||||||
<p>The <code><hs:code/></code> tag displays the current HTTP status code, if any. A shorthand for:</p>
|
<p>The <code><hs:code/></code> tag displays the current HTTP status code, if any. A shorthand for:</p>
|
||||||
<div class="sourceCode" id="cb5"><pre class="sourceCode jsp"><code class="sourceCode jsp"><a class="sourceLine" id="cb5-1" title="1"><%= pageContext.getErrorData().getStatusCode() %></a></code></pre></div>
|
<div class="sourceCode" id="cb7"><pre class="sourceCode jsp"><code class="sourceCode jsp"><span id="cb7-1"><a href="#cb7-1" aria-hidden="true"></a><span class="pp"><%=</span> pageContext.<span class="fu">getErrorData</span>().<span class="fu">getStatusCode</span>() <span class="pp">%></span></span></code></pre></div>
|
||||||
<h2 id="hsmessage">hs:message</h2>
|
<h2 id="hsmessage">hs:message</h2>
|
||||||
<p>The <code><hs:message/></code> tag displays the current error message, if any. A shorthand for:</p>
|
<p>The <code><hs:message/></code> tag displays the current error message, if any. A shorthand for:</p>
|
||||||
<div class="sourceCode" id="cb6"><pre class="sourceCode jsp"><code class="sourceCode jsp"><a class="sourceLine" id="cb6-1" title="1"><%= request.getAttribute(<span class="st">"javax.servlet.error.message"</span>) %></a></code></pre></div>
|
<div class="sourceCode" id="cb8"><pre class="sourceCode jsp"><code class="sourceCode jsp"><span id="cb8-1"><a href="#cb8-1" aria-hidden="true"></a><span class="pp"><%=</span> request.<span class="fu">getAttribute</span>(<span class="st">"javax.servlet.error.message"</span>) <span class="pp">%></span></span></code></pre></div>
|
||||||
<p>Optional attributes are:</p>
|
<p>Optional attributes are:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -169,6 +182,78 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
<h2 id="statuscode-bean">StatusCode Bean</h2>
|
||||||
|
<p>The <code>StatusCode</code> bean can be used to check the class of the status code error. For example, using the JSTL:</p>
|
||||||
|
<div class="sourceCode" id="cb9"><pre class="sourceCode jsp"><code class="sourceCode jsp"><span id="cb9-1"><a href="#cb9-1" aria-hidden="true"></a><span class="bu"><%@ taglib</span><span class="ot"> prefix</span>=<span class="st">"hs"</span><span class="ot"> uri</span>=<span class="st">"http://erik.thauvin.net/taglibs/httpstatus"</span><span class="ot"> </span><span class="bu">%></span></span>
|
||||||
|
<span id="cb9-2"><a href="#cb9-2" aria-hidden="true"></a><span class="bu"><%@ taglib</span><span class="ot"> prefix</span>=<span class="st">"c"</span><span class="ot"> uri</span>=<span class="st">"http://java.sun.com/jsp/jstl/core"</span><span class="ot"> </span><span class="bu">%></span></span>
|
||||||
|
<span id="cb9-3"><a href="#cb9-3" aria-hidden="true"></a></span>
|
||||||
|
<span id="cb9-4"><a href="#cb9-4" aria-hidden="true"></a><span class="bu"><jsp:useBean</span><span class="ot"> id</span>=<span class="st">"statusCode"</span><span class="ot"> class</span>=<span class="st">"net.thauvin.erik.httpstatus.StatusCode"</span><span class="bu">/></span></span>
|
||||||
|
<span id="cb9-5"><a href="#cb9-5" aria-hidden="true"></a><span class="kw"><c:set</span><span class="ot"> target</span>=<span class="dt">"</span><span class="pp">${</span>statusCode<span class="pp">}</span><span class="dt">"</span><span class="ot"> property</span>=<span class="dt">"code"</span><span class="kw">><hs:code/></c:set></span></span>
|
||||||
|
<span id="cb9-6"><a href="#cb9-6" aria-hidden="true"></a><span class="kw"><c:choose></span></span>
|
||||||
|
<span id="cb9-7"><a href="#cb9-7" aria-hidden="true"></a> <span class="kw"><c:when</span><span class="ot"> test</span>=<span class="dt">"</span><span class="pp">${</span>statusCode.<span class="fu">isClientError</span>()<span class="pp">}</span><span class="dt">"</span><span class="kw">></span></span>
|
||||||
|
<span id="cb9-8"><a href="#cb9-8" aria-hidden="true"></a> An error occurred on your side. (<span class="kw"><hs:reason/></span>)</span>
|
||||||
|
<span id="cb9-9"><a href="#cb9-9" aria-hidden="true"></a> <span class="kw"></c:when></span></span>
|
||||||
|
<span id="cb9-10"><a href="#cb9-10" aria-hidden="true"></a> <span class="kw"><c:otherwise></span></span>
|
||||||
|
<span id="cb9-11"><a href="#cb9-11" aria-hidden="true"></a> An error occurred on our side. (<span class="kw"><hs:message/></span>)</span>
|
||||||
|
<span id="cb9-12"><a href="#cb9-12" aria-hidden="true"></a> <span class="kw"></c:otherwise></span></span>
|
||||||
|
<span id="cb9-13"><a href="#cb9-13" aria-hidden="true"></a><span class="kw"></c:choose></span></span></code></pre></div>
|
||||||
|
<p>or in a Servlet:</p>
|
||||||
|
<div class="sourceCode" id="cb10"><pre class="sourceCode java"><code class="sourceCode java"><span id="cb10-1"><a href="#cb10-1" aria-hidden="true"></a><span class="kw">import</span><span class="im"> net.thauvin.erik.httpstatus.StatusCode;</span></span>
|
||||||
|
<span id="cb10-2"><a href="#cb10-2" aria-hidden="true"></a></span>
|
||||||
|
<span id="cb10-3"><a href="#cb10-3" aria-hidden="true"></a><span class="co">// ---</span></span>
|
||||||
|
<span id="cb10-4"><a href="#cb10-4" aria-hidden="true"></a></span>
|
||||||
|
<span id="cb10-5"><a href="#cb10-5" aria-hidden="true"></a>StatusCode statusCode = <span class="kw">new</span> <span class="fu">StatusCode</span>((<span class="bu">Integer</span>) request.<span class="fu">getAttribute</span>(<span class="st">"javax.servlet.error.status_code"</span>));</span>
|
||||||
|
<span id="cb10-6"><a href="#cb10-6" aria-hidden="true"></a><span class="kw">if</span> (statusCode.<span class="fu">isError</span>()) {</span>
|
||||||
|
<span id="cb10-7"><a href="#cb10-7" aria-hidden="true"></a> <span class="kw">if</span> (statusCode.<span class="fu">isServerError</span>()) {</span>
|
||||||
|
<span id="cb10-8"><a href="#cb10-8" aria-hidden="true"></a> <span class="bu">String</span> reason = statusCode.<span class="fu">getReason</span>();</span>
|
||||||
|
<span id="cb10-9"><a href="#cb10-9" aria-hidden="true"></a> } <span class="kw">else</span> {</span>
|
||||||
|
<span id="cb10-10"><a href="#cb10-10" aria-hidden="true"></a> <span class="co">// ...</span></span>
|
||||||
|
<span id="cb10-11"><a href="#cb10-11" aria-hidden="true"></a> }</span>
|
||||||
|
<span id="cb10-12"><a href="#cb10-12" aria-hidden="true"></a>}</span></code></pre></div>
|
||||||
|
<p>The <code>StatusCode</code> bean methods are:</p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr class="header">
|
||||||
|
<th>Method</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td><code>getReason</code></td>
|
||||||
|
<td>Returns the reason for the status code (eg: <code>Internal Server Error</code>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td><code>isClientError</code></td>
|
||||||
|
<td>Checks if the status code is a client error.</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td><code>isError</code></td>
|
||||||
|
<td>Checks if the status code is a server or client error.</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td><code>isInfo</code></td>
|
||||||
|
<td>Checks if the status code is informational.</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td><code>isRedirect</code></td>
|
||||||
|
<td>Checks if the status code is a redirect.</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td><code>isServerError</code></td>
|
||||||
|
<td>Checks if the status code is a server error.</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td><code>isSuccess</code></td>
|
||||||
|
<td>Checks if the status code is a success. (<code>OK</code>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td><code>isValid</code></td>
|
||||||
|
<td>Checks if the status code is valid.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<h2 id="reasons">Reasons</h2>
|
||||||
<p>The reasons are defined in a <a href="http://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html">ResourceBundle</a> properties as follows:</p>
|
<p>The reasons are defined in a <a href="http://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html">ResourceBundle</a> properties as follows:</p>
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
|
@ -544,39 +629,27 @@ code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warni
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h2 id="usage-with-gradle-or-maven">Usage with <a href="https://gradle.org/">Gradle</a> or <a href="http://maven.apache.org/">Maven</a></h2>
|
|
||||||
<p>Include the following in your <code>build.gradle</code> file:</p>
|
|
||||||
<pre class="gradle"><code>dependencies {
|
|
||||||
implementation 'net.thauvin.erik.httpstatus:httpstatus:1.0.6'
|
|
||||||
}
|
|
||||||
</code></pre>
|
|
||||||
<p>or as a Maven artifact:</p>
|
|
||||||
<div class="sourceCode" id="cb8"><pre class="sourceCode xml"><code class="sourceCode xml"><a class="sourceLine" id="cb8-1" title="1"><span class="kw"><dependency></span></a>
|
|
||||||
<a class="sourceLine" id="cb8-2" title="2"> <span class="kw"><groupId></span>net.thauvin.erik.httpstatus<span class="kw"></groupId></span></a>
|
|
||||||
<a class="sourceLine" id="cb8-3" title="3"> <span class="kw"><artifactId></span>httpstatus<span class="kw"></artifactId></span></a>
|
|
||||||
<a class="sourceLine" id="cb8-4" title="4"> <span class="kw"><version></span>1.0.6<span class="kw"></version></span></a>
|
|
||||||
<a class="sourceLine" id="cb8-5" title="5"><span class="kw"></dependency></span></a></code></pre></div>
|
|
||||||
<h2 id="command-line-usage">Command Line Usage</h2>
|
<h2 id="command-line-usage">Command Line Usage</h2>
|
||||||
<p>You can query the reason phrase for status codes as follows:</p>
|
<p>You can query the reason phrase for status codes as follows:</p>
|
||||||
<div class="sourceCode" id="cb9"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb9-1" title="1">$ <span class="ex">java</span> -jar httpstatus-1.0.6.jar 404 500</a>
|
<div class="sourceCode" id="cb11"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true"></a>$ <span class="ex">java</span> -jar httpstatus-1.0.6.jar 404 500</span>
|
||||||
<a class="sourceLine" id="cb9-2" title="2"><span class="ex">404</span>: Not Found</a>
|
<span id="cb11-2"><a href="#cb11-2" aria-hidden="true"></a><span class="ex">404</span>: Not Found</span>
|
||||||
<a class="sourceLine" id="cb9-3" title="3"><span class="ex">500</span>: Internal Server Error</a></code></pre></div>
|
<span id="cb11-3"><a href="#cb11-3" aria-hidden="true"></a><span class="ex">500</span>: Internal Server Error</span></code></pre></div>
|
||||||
<p>If no status code is specified, all will be printed:</p>
|
<p>If no status code is specified, all will be printed:</p>
|
||||||
<div class="sourceCode" id="cb10"><pre class="sourceCode sh"><code class="sourceCode bash"><a class="sourceLine" id="cb10-1" title="1">$ <span class="ex">java</span> -jar httpstatus-1.0.6.jar</a>
|
<div class="sourceCode" id="cb12"><pre class="sourceCode sh"><code class="sourceCode bash"><span id="cb12-1"><a href="#cb12-1" aria-hidden="true"></a>$ <span class="ex">java</span> -jar httpstatus-1.0.6.jar</span>
|
||||||
<a class="sourceLine" id="cb10-2" title="2"><span class="ex">100</span>: Continue</a>
|
<span id="cb12-2"><a href="#cb12-2" aria-hidden="true"></a><span class="ex">100</span>: Continue</span>
|
||||||
<a class="sourceLine" id="cb10-3" title="3"><span class="ex">101</span>: Switching Protocols</a>
|
<span id="cb12-3"><a href="#cb12-3" aria-hidden="true"></a><span class="ex">101</span>: Switching Protocols</span>
|
||||||
<a class="sourceLine" id="cb10-4" title="4"><span class="ex">102</span>: Processing</a>
|
<span id="cb12-4"><a href="#cb12-4" aria-hidden="true"></a><span class="ex">102</span>: Processing</span>
|
||||||
<a class="sourceLine" id="cb10-5" title="5"><span class="ex">103</span>: Early Hints</a>
|
<span id="cb12-5"><a href="#cb12-5" aria-hidden="true"></a><span class="ex">103</span>: Early Hints</span>
|
||||||
<a class="sourceLine" id="cb10-6" title="6"><span class="ex">200</span>: OK</a>
|
<span id="cb12-6"><a href="#cb12-6" aria-hidden="true"></a><span class="ex">200</span>: OK</span>
|
||||||
<a class="sourceLine" id="cb10-7" title="7"><span class="ex">201</span>: Created</a>
|
<span id="cb12-7"><a href="#cb12-7" aria-hidden="true"></a><span class="ex">201</span>: Created</span>
|
||||||
<a class="sourceLine" id="cb10-8" title="8"><span class="ex">202</span>: Accepted</a>
|
<span id="cb12-8"><a href="#cb12-8" aria-hidden="true"></a><span class="ex">202</span>: Accepted</span>
|
||||||
<a class="sourceLine" id="cb10-9" title="9"><span class="ex">203</span>: Non-Authoritative Information</a>
|
<span id="cb12-9"><a href="#cb12-9" aria-hidden="true"></a><span class="ex">203</span>: Non-Authoritative Information</span>
|
||||||
<a class="sourceLine" id="cb10-10" title="10"><span class="ex">204</span>: No Content</a>
|
<span id="cb12-10"><a href="#cb12-10" aria-hidden="true"></a><span class="ex">204</span>: No Content</span>
|
||||||
<a class="sourceLine" id="cb10-11" title="11"><span class="ex">205</span>: Reset Content</a>
|
<span id="cb12-11"><a href="#cb12-11" aria-hidden="true"></a><span class="ex">205</span>: Reset Content</span>
|
||||||
<a class="sourceLine" id="cb10-12" title="12"><span class="ex">206</span>: Partial Content</a>
|
<span id="cb12-12"><a href="#cb12-12" aria-hidden="true"></a><span class="ex">206</span>: Partial Content</span>
|
||||||
<a class="sourceLine" id="cb10-13" title="13"><span class="ex">207</span>: Multi-Status</a>
|
<span id="cb12-13"><a href="#cb12-13" aria-hidden="true"></a><span class="ex">207</span>: Multi-Status</span>
|
||||||
<a class="sourceLine" id="cb10-14" title="14"><span class="ex">208</span>: Already Reported</a>
|
<span id="cb12-14"><a href="#cb12-14" aria-hidden="true"></a><span class="ex">208</span>: Already Reported</span>
|
||||||
<a class="sourceLine" id="cb10-15" title="15"><span class="ex">226</span>: IM Used</a>
|
<span id="cb12-15"><a href="#cb12-15" aria-hidden="true"></a><span class="ex">226</span>: IM Used</span>
|
||||||
<a class="sourceLine" id="cb10-16" title="16"><span class="ex">...</span></a></code></pre></div>
|
<span id="cb12-16"><a href="#cb12-16" aria-hidden="true"></a><span class="ex">...</span></span></code></pre></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
269
gradlew
vendored
269
gradlew
vendored
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env sh
|
#!/bin/sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright 2015 the original author or authors.
|
# Copyright © 2015-2021 the original authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
@ -17,67 +17,101 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
##
|
#
|
||||||
## Gradle start up script for UN*X
|
# Gradle start up script for POSIX generated by Gradle.
|
||||||
##
|
#
|
||||||
|
# Important for running:
|
||||||
|
#
|
||||||
|
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||||
|
# noncompliant, but you have some other compliant shell such as ksh or
|
||||||
|
# bash, then to run this script, type that shell name before the whole
|
||||||
|
# command line, like:
|
||||||
|
#
|
||||||
|
# ksh Gradle
|
||||||
|
#
|
||||||
|
# Busybox and similar reduced shells will NOT work, because this script
|
||||||
|
# requires all of these POSIX shell features:
|
||||||
|
# * functions;
|
||||||
|
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||||
|
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||||
|
# * compound commands having a testable exit status, especially «case»;
|
||||||
|
# * various built-in commands including «command», «set», and «ulimit».
|
||||||
|
#
|
||||||
|
# Important for patching:
|
||||||
|
#
|
||||||
|
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||||
|
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||||
|
#
|
||||||
|
# The "traditional" practice of packing multiple parameters into a
|
||||||
|
# space-separated string is a well documented source of bugs and security
|
||||||
|
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||||
|
# options in "$@", and eventually passing that to Java.
|
||||||
|
#
|
||||||
|
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||||
|
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||||
|
# see the in-line comments for details.
|
||||||
|
#
|
||||||
|
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||||
|
# Darwin, MinGW, and NonStop.
|
||||||
|
#
|
||||||
|
# (3) This script is generated from the Groovy template
|
||||||
|
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
|
# within the Gradle project.
|
||||||
|
#
|
||||||
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
#
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
PRG="$0"
|
app_path=$0
|
||||||
# Need this for relative symlinks.
|
|
||||||
while [ -h "$PRG" ] ; do
|
# Need this for daisy-chained symlinks.
|
||||||
ls=`ls -ld "$PRG"`
|
while
|
||||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||||
if expr "$link" : '/.*' > /dev/null; then
|
[ -h "$app_path" ]
|
||||||
PRG="$link"
|
do
|
||||||
else
|
ls=$( ls -ld "$app_path" )
|
||||||
PRG=`dirname "$PRG"`"/$link"
|
link=${ls#*' -> '}
|
||||||
fi
|
case $link in #(
|
||||||
|
/*) app_path=$link ;; #(
|
||||||
|
*) app_path=$APP_HOME$link ;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
SAVED="`pwd`"
|
|
||||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||||
APP_HOME="`pwd -P`"
|
|
||||||
cd "$SAVED" >/dev/null
|
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=`basename "$0"`
|
APP_BASE_NAME=${0##*/}
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD="maximum"
|
MAX_FD=maximum
|
||||||
|
|
||||||
warn () {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
}
|
} >&2
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "`uname`" in
|
case "$( uname )" in #(
|
||||||
CYGWIN* )
|
CYGWIN* ) cygwin=true ;; #(
|
||||||
cygwin=true
|
Darwin* ) darwin=true ;; #(
|
||||||
;;
|
MSYS* | MINGW* ) msys=true ;; #(
|
||||||
Darwin* )
|
NONSTOP* ) nonstop=true ;;
|
||||||
darwin=true
|
|
||||||
;;
|
|
||||||
MINGW* )
|
|
||||||
msys=true
|
|
||||||
;;
|
|
||||||
NONSTOP* )
|
|
||||||
nonstop=true
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
@ -87,9 +121,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||||
else
|
else
|
||||||
JAVACMD="$JAVA_HOME/bin/java"
|
JAVACMD=$JAVA_HOME/bin/java
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
@ -98,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD="java"
|
JAVACMD=java
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
@ -106,80 +140,95 @@ location of your Java installation."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||||
MAX_FD_LIMIT=`ulimit -H -n`
|
case $MAX_FD in #(
|
||||||
if [ $? -eq 0 ] ; then
|
max*)
|
||||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
MAX_FD=$( ulimit -H -n ) ||
|
||||||
MAX_FD="$MAX_FD_LIMIT"
|
warn "Could not query maximum file descriptor limit"
|
||||||
fi
|
esac
|
||||||
ulimit -n $MAX_FD
|
case $MAX_FD in #(
|
||||||
if [ $? -ne 0 ] ; then
|
'' | soft) :;; #(
|
||||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
*)
|
||||||
fi
|
ulimit -n "$MAX_FD" ||
|
||||||
else
|
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Darwin, add options to specify how the application appears in the dock
|
|
||||||
if $darwin; then
|
|
||||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
|
||||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
|
||||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
|
||||||
|
|
||||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
|
||||||
|
|
||||||
# We build the pattern for arguments to be converted via cygpath
|
|
||||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
|
||||||
SEP=""
|
|
||||||
for dir in $ROOTDIRSRAW ; do
|
|
||||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
|
||||||
SEP="|"
|
|
||||||
done
|
|
||||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
|
||||||
# Add a user-defined pattern to the cygpath arguments
|
|
||||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
|
||||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
|
||||||
fi
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
i=0
|
|
||||||
for arg in "$@" ; do
|
|
||||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
|
||||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
|
||||||
|
|
||||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
|
||||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
|
||||||
else
|
|
||||||
eval `echo args$i`="\"$arg\""
|
|
||||||
fi
|
|
||||||
i=`expr $i + 1`
|
|
||||||
done
|
|
||||||
case $i in
|
|
||||||
0) set -- ;;
|
|
||||||
1) set -- "$args0" ;;
|
|
||||||
2) set -- "$args0" "$args1" ;;
|
|
||||||
3) set -- "$args0" "$args1" "$args2" ;;
|
|
||||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
|
||||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
|
||||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
|
||||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
|
||||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
|
||||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Escape application args
|
# Collect all arguments for the java command, stacking in reverse order:
|
||||||
save () {
|
# * args from the command line
|
||||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
# * the main class name
|
||||||
echo " "
|
# * -classpath
|
||||||
}
|
# * -D...appname settings
|
||||||
APP_ARGS=`save "$@"`
|
# * --module-path (only if needed)
|
||||||
|
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||||
|
|
||||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
if "$cygwin" || "$msys" ; then
|
||||||
|
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||||
|
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||||
|
|
||||||
|
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||||
|
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
for arg do
|
||||||
|
if
|
||||||
|
case $arg in #(
|
||||||
|
-*) false ;; # don't mess with options #(
|
||||||
|
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||||
|
[ -e "$t" ] ;; #(
|
||||||
|
*) false ;;
|
||||||
|
esac
|
||||||
|
then
|
||||||
|
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||||
|
fi
|
||||||
|
# Roll the args list around exactly as many times as the number of
|
||||||
|
# args, so each arg winds up back in the position where it started, but
|
||||||
|
# possibly modified.
|
||||||
|
#
|
||||||
|
# NB: a `for` loop captures its iteration list before it begins, so
|
||||||
|
# changing the positional parameters here affects neither the number of
|
||||||
|
# iterations, nor the values presented in `arg`.
|
||||||
|
shift # remove old arg
|
||||||
|
set -- "$@" "$arg" # push replacement arg
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Collect all arguments for the java command;
|
||||||
|
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||||
|
# shell script including quotes and variable substitutions, so put them in
|
||||||
|
# double quotes to make sure that they get re-expanded; and
|
||||||
|
# * put everything else in single quotes, so that it's not re-expanded.
|
||||||
|
|
||||||
|
set -- \
|
||||||
|
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||||
|
-classpath "$CLASSPATH" \
|
||||||
|
org.gradle.wrapper.GradleWrapperMain \
|
||||||
|
"$@"
|
||||||
|
|
||||||
|
# Use "xargs" to parse quoted args.
|
||||||
|
#
|
||||||
|
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||||
|
#
|
||||||
|
# In Bash we could simply go:
|
||||||
|
#
|
||||||
|
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||||
|
# set -- "${ARGS[@]}" "$@"
|
||||||
|
#
|
||||||
|
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||||
|
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||||
|
# character that might be a shell metacharacter, then use eval to reverse
|
||||||
|
# that process (while maintaining the separation between arguments), and wrap
|
||||||
|
# the whole thing up as a single "set" statement.
|
||||||
|
#
|
||||||
|
# This will of course break if any of these variables contains a newline or
|
||||||
|
# an unmatched quote.
|
||||||
|
#
|
||||||
|
|
||||||
|
eval "set -- $(
|
||||||
|
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||||
|
xargs -n1 |
|
||||||
|
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||||
|
tr '\n' ' '
|
||||||
|
)" '"$@"'
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue