├── .gitattributes
├── .github
└── workflows
│ ├── ci.yaml
│ ├── codeql.yml
│ ├── coveralls.yaml
│ └── sonatype.yaml
├── .gitignore
├── .mvn
├── extensions.xml
├── maven.config
├── settings.xml
└── wrapper
│ ├── MavenWrapperDownloader.java
│ └── maven-wrapper.properties
├── CHANGELOG.md
├── LICENSE
├── LICENSE_HEADER
├── README.md
├── TODO.md
├── format.xml
├── mvnw
├── mvnw.cmd
├── pom.xml
├── renovate.json
└── src
├── main
├── assembly
│ └── distributive.xml
├── java
│ ├── com
│ │ └── googlecode
│ │ │ └── htmlcompressor
│ │ │ ├── CmdLineCompressor.java
│ │ │ ├── analyzer
│ │ │ ├── HtmlAnalyzer.java
│ │ │ └── package-info.java
│ │ │ ├── compressor
│ │ │ ├── ClosureJavaScriptCompressor.java
│ │ │ ├── Compressor.java
│ │ │ ├── HtmlCompressor.java
│ │ │ ├── HtmlCompressorStatistics.java
│ │ │ ├── HtmlMetrics.java
│ │ │ ├── XmlCompressor.java
│ │ │ ├── YuiCssCompressor.java
│ │ │ ├── YuiJavaScriptCompressor.java
│ │ │ └── package-info.java
│ │ │ ├── package-info.java
│ │ │ ├── taglib
│ │ │ ├── CssCompressorTag.java
│ │ │ ├── HtmlCompressorTag.java
│ │ │ ├── JavaScriptCompressorTag.java
│ │ │ ├── XmlCompressorTag.java
│ │ │ └── package-info.java
│ │ │ └── velocity
│ │ │ ├── CssCompressorDirective.java
│ │ │ ├── HtmlCompressorDirective.java
│ │ │ ├── JavaScriptCompressorDirective.java
│ │ │ ├── XmlCompressorDirective.java
│ │ │ └── package-info.java
│ └── jargs
│ │ └── gnu
│ │ ├── CmdLineParser.java
│ │ └── package-info.java
└── resources
│ └── META-INF
│ └── htmlcompressor.tld
├── site
├── resources
│ └── images
│ │ ├── hazendaz-banner.jpg
│ │ └── hazendaz.png
└── site.xml
└── test
├── java
└── com
│ └── googlecode
│ └── htmlcompressor
│ └── compressor
│ ├── HtmlCompressorTest.java
│ └── XmlCompressorTest.java
└── resources
├── html
├── testCompress.html
├── testCompressCss.html
├── testCompressCssResult.html
├── testCompressJavaScript.html
├── testCompressJavaScriptClosureResult.html
├── testCompressJavaScriptYuiResult.html
├── testCompressResult.html
├── testEnabled.html
├── testEnabledResult.html
├── testPreserveLineBreaks.html
├── testPreserveLineBreaksResult.html
├── testPreservePatterns.html
├── testPreservePatternsResult.html
├── testRemoveComments.html
├── testRemoveCommentsResult.html
├── testRemoveFormAttributes.html
├── testRemoveFormAttributesResult.html
├── testRemoveHttpProtocol.html
├── testRemoveHttpProtocolResult.html
├── testRemoveHttpsProtocol.html
├── testRemoveHttpsProtocolResult.html
├── testRemoveInputAttributes.html
├── testRemoveInputAttributesResult.html
├── testRemoveIntertagSpaces.html
├── testRemoveIntertagSpacesResult.html
├── testRemoveJavaScriptProtocol.html
├── testRemoveJavaScriptProtocolResult.html
├── testRemoveLinkAttributes.html
├── testRemoveLinkAttributesResult.html
├── testRemoveMultiSpaces.html
├── testRemoveMultiSpacesResult.html
├── testRemoveQuotes.html
├── testRemoveQuotesResult.html
├── testRemoveScriptAttributes.html
├── testRemoveScriptAttributesResult.html
├── testRemoveSpacesInsideTags.html
├── testRemoveSpacesInsideTagsResult.html
├── testRemoveStyleAttributes.html
├── testRemoveStyleAttributesResult.html
├── testSimpleBooleanAttributes.html
├── testSimpleBooleanAttributesResult.html
├── testSimpleDoctype.html
├── testSimpleDoctypeResult.html
├── testSurroundingSpaces.html
└── testSurroundingSpacesResult.html
└── xml
├── testCompress.xml
├── testCompressResult.xml
├── testEnabled.xml
├── testEnabledResult.xml
├── testRemoveComments.xml
├── testRemoveCommentsResult.xml
├── testRemoveIntertagSpaces.xml
└── testRemoveIntertagSpacesResult.xml
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/.github/workflows/ci.yaml:
--------------------------------------------------------------------------------
1 | name: Java CI
2 |
3 | on: [workflow_dispatch, push, pull_request]
4 |
5 | permissions: read-all
6 |
7 | jobs:
8 | test:
9 | runs-on: ${{ matrix.os }}
10 | strategy:
11 | matrix:
12 | cache: [maven]
13 | distribution: [temurin]
14 | java: [21, 24, 25-ea]
15 | os: [macos-latest, ubuntu-latest, windows-latest]
16 | fail-fast: false
17 | max-parallel: 4
18 | name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
19 |
20 | steps:
21 | - uses: actions/checkout@v4
22 | - name: Setup Java ${{ matrix.java }} ${{ matrix.distribution }}
23 | uses: actions/setup-java@v4
24 | with:
25 | cache: ${{ matrix.cache }}
26 | distribution: ${{ matrix.distribution }}
27 | java-version: ${{ matrix.java }}
28 | - name: Test with Maven
29 | run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true"
30 |
--------------------------------------------------------------------------------
/.github/workflows/codeql.yml:
--------------------------------------------------------------------------------
1 | name: "CodeQL"
2 |
3 | on:
4 | push:
5 | branches: [ "master" ]
6 | pull_request:
7 | branches: [ "master" ]
8 | schedule:
9 | - cron: "43 10 * * 2"
10 |
11 | jobs:
12 | analyze:
13 | name: Analyze
14 | runs-on: ubuntu-latest
15 | permissions:
16 | actions: read
17 | contents: read
18 | security-events: write
19 |
20 | strategy:
21 | fail-fast: false
22 | matrix:
23 | language: [ javascript, java ]
24 |
25 | steps:
26 | - name: Checkout
27 | uses: actions/checkout@v4
28 |
29 | - name: Setup Java
30 | uses: actions/setup-java@v4
31 | with:
32 | cache: maven
33 | java-version: 21
34 | distribution: 'temurin'
35 |
36 | - name: Initialize CodeQL
37 | uses: github/codeql-action/init@v3
38 | with:
39 | languages: ${{ matrix.language }}
40 | queries: +security-and-quality
41 |
42 | - name: Autobuild
43 | uses: github/codeql-action/autobuild@v3
44 |
45 | - name: Perform CodeQL Analysis
46 | uses: github/codeql-action/analyze@v3
47 | with:
48 | category: "/language:${{ matrix.language }}"
49 |
--------------------------------------------------------------------------------
/.github/workflows/coveralls.yaml:
--------------------------------------------------------------------------------
1 | name: Coveralls
2 |
3 | on: [push, pull_request]
4 |
5 | permissions: read-all
6 |
7 | jobs:
8 | coveralls:
9 | if: github.repository_owner == 'hazendaz'
10 | runs-on: ubuntu-latest
11 | steps:
12 | - uses: actions/checkout@v4
13 | - name: Setup Java
14 | uses: actions/setup-java@v4
15 | with:
16 | cache: maven
17 | distribution: temurin
18 | java-version: 21
19 | - name: Report Coverage to Coveralls for Pull Requests
20 | if: github.event_name == 'pull_request'
21 | run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
22 | env:
23 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 | PR_NUMBER: ${{ github.event.number }}
25 | - name: Report Coverage to Coveralls for General Push
26 | if: github.event_name == 'push'
27 | run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
28 | env:
29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 |
--------------------------------------------------------------------------------
/.github/workflows/sonatype.yaml:
--------------------------------------------------------------------------------
1 | name: Sonatype
2 |
3 | on:
4 | push:
5 | branches:
6 | - master
7 |
8 | permissions: read-all
9 |
10 | jobs:
11 | build:
12 | if: github.repository_owner == 'hazendaz' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v4
16 | - name: Setup Java
17 | uses: actions/setup-java@v4
18 | with:
19 | cache: maven
20 | distribution: temurin
21 | java-version: 21
22 | - name: Deploy to Sonatype
23 | run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
24 | env:
25 | CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
26 | CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /.settings
2 | /.classpath
3 | /.project
4 | /target
5 | .mvn/wrapper/maven-wrapper.jar
6 | pom.xml.releaseBackup
7 | release.properties
8 | .factorypath
9 |
--------------------------------------------------------------------------------
/.mvn/extensions.xml:
--------------------------------------------------------------------------------
1 |
2 |
19 |
7 | 11 |12 | -------------------------------------------------------------------------------- /src/test/resources/html/testCompressCssResult.html: -------------------------------------------------------------------------------- 1 |
2 | 6 |7 | -------------------------------------------------------------------------------- /src/test/resources/html/testCompressJavaScript.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 |
16 | 21 |22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/test/resources/html/testCompressJavaScriptClosureResult.html: -------------------------------------------------------------------------------- 1 |
2 | 7 |8 | -------------------------------------------------------------------------------- /src/test/resources/html/testCompressJavaScriptYuiResult.html: -------------------------------------------------------------------------------- 1 |
2 | 7 |8 | -------------------------------------------------------------------------------- /src/test/resources/html/testCompressResult.html: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /src/test/resources/html/testEnabled.html: -------------------------------------------------------------------------------- 1 | html html 2 | -------------------------------------------------------------------------------- /src/test/resources/html/testEnabledResult.html: -------------------------------------------------------------------------------- 1 | html html 2 | -------------------------------------------------------------------------------- /src/test/resources/html/testPreserveLineBreaks.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
aaa bbb5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/test/resources/html/testRemoveCommentsResult.html: -------------------------------------------------------------------------------- 1 |
aaa bbb5 | -------------------------------------------------------------------------------- /src/test/resources/html/testRemoveFormAttributes.html: -------------------------------------------------------------------------------- 1 |