Added maven POM info.
This commit is contained in:
parent
439d8e9669
commit
1539462d1d
4 changed files with 82 additions and 32 deletions
16
README.html
16
README.html
|
@ -447,14 +447,16 @@ Cause: <pre><span class="kw"><hs:cause</span><span class="ot"> default<
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<hr />
|
<hr />
|
||||||
<h2 id="use-with-gradle">Use with <a href="https://gradle.org/">Gradle</a></h2>
|
<h2 id="use-with-gradle-or-maven">Use 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>
|
<p>Include the following in your <code>build.gradle</code> file:</p>
|
||||||
<pre class="gradle"><code>repositories {
|
<pre class="gradle"><code>dependencies {
|
||||||
jcenter()
|
compile 'net.thauvin.erik.httpstatus:httpstatus:1.0.3'
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
compile 'net.thauvin.erik.httpstatus:httpstatus:1.0.2'
|
|
||||||
}</code></pre>
|
}</code></pre>
|
||||||
|
<p>or as a Maven artifact:</p>
|
||||||
|
<div class="sourceCode"><pre class="sourceCode xml"><code class="sourceCode xml"><span class="kw"><dependency></span>
|
||||||
|
<span class="kw"><groupId></span>net.thauvin.erik.httpstatus<span class="kw"></groupId></span>
|
||||||
|
<span class="kw"><artifactId></span>httpstatus<span class="kw"></artifactId></span>
|
||||||
|
<span class="kw"><version></span>1.0.3<span class="kw"></version></span>
|
||||||
|
<span class="kw"></dependency></span></code></pre></div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
18
README.md
18
README.md
|
@ -147,15 +147,21 @@ Status Code | Reason
|
||||||
|
|
||||||
----
|
----
|
||||||
|
|
||||||
## Use with [Gradle](https://gradle.org/)
|
## Use with [Gradle](https://gradle.org/) or [Maven](http://maven.apache.org/)
|
||||||
Include the following in your `build.gradle` file:
|
Include the following in your `build.gradle` file:
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'net.thauvin.erik.httpstatus:httpstatus:1.0.2'
|
compile 'net.thauvin.erik.httpstatus:httpstatus:1.0.3'
|
||||||
}
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
or as a Maven artifact:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<dependency>
|
||||||
|
<groupId>net.thauvin.erik.httpstatus</groupId>
|
||||||
|
<artifactId>httpstatus</artifactId>
|
||||||
|
<version>1.0.3</version>
|
||||||
|
</dependency>
|
||||||
```
|
```
|
76
build.gradle
76
build.gradle
|
@ -14,7 +14,19 @@ defaultTasks 'deploy'
|
||||||
def deployDir = 'deploy'
|
def deployDir = 'deploy'
|
||||||
def localProps = 'local.properties'
|
def localProps = 'local.properties'
|
||||||
def isRelease = 'release' in gradle.startParameter.taskNames
|
def isRelease = 'release' in gradle.startParameter.taskNames
|
||||||
|
|
||||||
def mavenGroupId = 'net.thauvin.erik.httpstatus'
|
def mavenGroupId = 'net.thauvin.erik.httpstatus'
|
||||||
|
def mavenName = 'HttpStatus'
|
||||||
|
def mavenDescription = 'HttpStatus JSP Tag Library'
|
||||||
|
def mavenUrl = 'https://github.com/ethauvin/HttpStatus'
|
||||||
|
def mavenLicense = 'The BSD 3-Clause License'
|
||||||
|
def mavenLicenseUrl = 'http://opensource.org/licenses/BSD-3-Clause'
|
||||||
|
def mavenScmCon = 'https://github.com/ethauvin/HttpStatus.git'
|
||||||
|
def mavenScmDevCon = 'git@github.com:ethauvin/HttpStatus.git'
|
||||||
|
|
||||||
|
def pkgLicenses = ['BSD 3-Clause']
|
||||||
|
def pkgIssueTrackerUrl = mavenUrl + '/issues'
|
||||||
|
def pkgLabels = ['jsp', 'tag library', 'http', 'status code', 'java']
|
||||||
|
|
||||||
def getVersion(isIncrement = false)
|
def getVersion(isIncrement = false)
|
||||||
{
|
{
|
||||||
|
@ -51,10 +63,10 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'servletapi:servlet-api:+'
|
compile 'javax.servlet:javax.servlet-api:3.1.0'
|
||||||
compile 'javax.servlet.jsp:jsp-api:+'
|
compile 'javax.servlet.jsp:jsp-api:2.2'
|
||||||
|
|
||||||
testCompile 'org.testng:testng:+'
|
testCompile 'org.testng:testng:6.9.10'
|
||||||
}
|
}
|
||||||
|
|
||||||
bintray {
|
bintray {
|
||||||
|
@ -65,13 +77,13 @@ bintray {
|
||||||
publications = ['MyPublication']
|
publications = ['MyPublication']
|
||||||
pkg {
|
pkg {
|
||||||
repo = 'maven'
|
repo = 'maven'
|
||||||
name = 'HttpStatus'
|
name = mavenName
|
||||||
licenses = ['BSD 3-Clause']
|
licenses = pkgLicenses
|
||||||
desc = 'HttpStatus JSP Tag Library'
|
desc = mavenDescription
|
||||||
websiteUrl = 'https://github.com/ethauvin/HttpStatus'
|
websiteUrl = mavenUrl
|
||||||
issueTrackerUrl = 'https://github.com/ethauvin/HttpStatus/issues'
|
issueTrackerUrl = pkgIssueTrackerUrl
|
||||||
vcsUrl = 'https://github.com/ethauvin/HttpStatus.git'
|
vcsUrl = mavenScmCon
|
||||||
labels = ['jsp', 'tag library', 'http', 'status code', 'java']
|
labels = pkgLabels
|
||||||
publicDownloadNumbers = true
|
publicDownloadNumbers = true
|
||||||
version {
|
version {
|
||||||
name = project.version
|
name = project.version
|
||||||
|
@ -84,6 +96,28 @@ bintray {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def pomConfig = {
|
||||||
|
licenses {
|
||||||
|
license {
|
||||||
|
name mavenLicense
|
||||||
|
url mavenLicenseUrl
|
||||||
|
distribution 'repo'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
developers {
|
||||||
|
developer {
|
||||||
|
id 'ethauvin'
|
||||||
|
name 'Erik C. Thauvin'
|
||||||
|
email 'erik@thauvin.net'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
scm {
|
||||||
|
connection 'scm:git:' + mavenScmCon
|
||||||
|
developerConnection 'scm:git:' + mavenScmDevCon
|
||||||
|
url mavenScmCon
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
publications {
|
publications {
|
||||||
MyPublication(MavenPublication) {
|
MyPublication(MavenPublication) {
|
||||||
|
@ -93,6 +127,14 @@ publishing {
|
||||||
groupId mavenGroupId
|
groupId mavenGroupId
|
||||||
artifactId rootProject.name
|
artifactId rootProject.name
|
||||||
version project.version
|
version project.version
|
||||||
|
|
||||||
|
pom.withXml {
|
||||||
|
def root = asNode()
|
||||||
|
root.appendNode('name', mavenName)
|
||||||
|
root.appendNode('description', mavenDescription)
|
||||||
|
root.appendNode('url', mavenUrl)
|
||||||
|
root.children().last() + pomConfig
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -125,7 +167,7 @@ compileJava {
|
||||||
doFirst {
|
doFirst {
|
||||||
project.version = getVersion(isRelease)
|
project.version = getVersion(isRelease)
|
||||||
}
|
}
|
||||||
//options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
|
//options.compilerArgs << '-Xlint:unchecked' << '-Xlint:deprecation'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -147,7 +189,7 @@ task wrapper(type: Wrapper) {
|
||||||
|
|
||||||
task copyToDeploy(type: Copy) {
|
task copyToDeploy(type: Copy) {
|
||||||
from(configurations.runtime) {
|
from(configurations.runtime) {
|
||||||
exclude 'servlet-api-*.jar'
|
exclude 'javax.servlet-api-*.jar'
|
||||||
exclude 'jsp-api-*.jar'
|
exclude 'jsp-api-*.jar'
|
||||||
}
|
}
|
||||||
from jar
|
from jar
|
||||||
|
@ -155,21 +197,21 @@ task copyToDeploy(type: Copy) {
|
||||||
}
|
}
|
||||||
|
|
||||||
task deploy(dependsOn: ['build', 'copyToDeploy']) {
|
task deploy(dependsOn: ['build', 'copyToDeploy']) {
|
||||||
description = "Copies all needed files to the ${deployDir} directory."
|
description = 'Copies all needed files to the ${deployDir} directory.'
|
||||||
group = "Publishing"
|
group = 'Publishing'
|
||||||
outputs.dir deployDir
|
outputs.dir deployDir
|
||||||
inputs.files copyToDeploy
|
inputs.files copyToDeploy
|
||||||
mustRunAfter clean
|
mustRunAfter clean
|
||||||
}
|
}
|
||||||
|
|
||||||
task release(dependsOn: ['deploy', 'wrapper']) << {
|
task release(dependsOn: ['deploy', 'wrapper']) << {
|
||||||
group = "Publishing"
|
group = 'Publishing'
|
||||||
description = "Releases new version."
|
description = 'Releases new version.'
|
||||||
isRelease = true
|
isRelease = true
|
||||||
}
|
}
|
||||||
|
|
||||||
task pandoc(type: Exec) {
|
task pandoc(type: Exec) {
|
||||||
group = "Documentation"
|
group = 'Documentation'
|
||||||
def pandoc_args = ['--from', 'markdown_github', '--to', 'html5', '-s', '-o', 'README.html', 'README.md']
|
def pandoc_args = ['--from', 'markdown_github', '--to', 'html5', '-s', '-o', 'README.html', 'README.md']
|
||||||
if (Os.isFamily(Os.FAMILY_WINDOWS))
|
if (Os.isFamily(Os.FAMILY_WINDOWS))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#Thu, 21 Jan 2016 15:05:31 -0800
|
#Fri, 22 Jan 2016 13:17:16 -0800
|
||||||
version.major=1
|
version.major=1
|
||||||
version.minor=0
|
version.minor=0
|
||||||
version.patch=2
|
version.patch=3
|
||||||
version.buildmeta=
|
version.buildmeta=
|
||||||
version.prerelease=
|
version.prerelease=
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue