Skip to content

Commit

Permalink
Merge pull request #2 from vsachinv/publish_changes
Browse files Browse the repository at this point in the history
Add publish package changes.
  • Loading branch information
vsachinv authored Aug 11, 2023
2 parents 4dbe653 + 52abd9b commit c67818f
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
with:
arguments: publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The following entries in a web application's web.xml would enable the Request Du

**Steps:**

1. Download jar from release and add Jar to tomcat path **CATALINA_BASE/lib/TomcatCustomFilters-< VERSION >.jar**
1. Download jar from release/packages and add Jar to tomcat path **CATALINA_BASE/lib/tomcatCustomFilters-< VERSION >.jar**

2. If the entries were added to CATALINA_BASE/conf/**web.xml**, the Request Dumper Filter would be enabled for all web applications.

Expand Down
53 changes: 51 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ plugins {
id 'java'
}

group 'com.rxlogix'
version '1.0-SNAPSHOT'
apply plugin: 'maven'
apply plugin: 'maven-publish'

group 'org.apache.catalina.custom'
version '0.1'

sourceCompatibility = 1.8

Expand All @@ -15,3 +18,49 @@ dependencies {
testCompile group: 'junit', name: 'junit', version: '4.12'
implementation 'org.apache.tomcat.embed:tomcat-embed-core:8.5.35'
}

javadoc {
source = sourceSets.main.allJava
classpath = configurations.compileClasspath

options
{
setMemberLevel JavadocMemberLevel.PUBLIC
setAuthor true

links "https://docs.oracle.com/javase/8/docs/api/"
}
}

task sourceJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
}

task packageJavadoc(type: Jar) {
from javadoc
classifier = 'javadoc'
}


publishing {

repositories {
maven {
name = "GitHubPackages"
url = "https://maven.pkg.github.com/vsachinv/TomcatCustomFilters"
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
}
}
}

publications {
gpr(MavenPublication) {
from components.java
artifact sourceJar
artifact packageJavadoc
}
}
}
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rootProject.name = 'TomcatCustomFilters'
rootProject.name = 'tomcatCustomFilters'

0 comments on commit c67818f

Please sign in to comment.