This is the code repository of the Content Security Policy support used by HtmlUnit.
The library was created by forking the salvation project as it is apparently no longer maintained.
For HtmlUnit, the code has been adapted to the code style rules used, and support for editing policies has been removed.
The code is being expanded, restructured and improved primarily to meet the requirements of this project.
❤️ Sponsor
HtmlUnit@mastodon | HtmlUnit@Twitter
Add to your pom.xml:
<dependency>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit-csp</artifactId>
<version>3.8.0</version>
</dependency>Add to your build.gradle:
implementation group: 'org.htmlunit', name: 'htmlunit-csp', version: '3.8.0'The latest builds are available from our Jenkins CI build server
If you use maven please add:
<dependency>
<groupId>org.htmlunit</groupId>
<artifactId>htmlunit-csp</artifactId>
<version>3.9.0-SNAPSHOT</version>
</dependency>
You have to add the sonatype snapshot repository to your pom repositories section also:
<repository>
<id>OSS Sonatype snapshots</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
You simply only need a local maven installation.
Create a local clone of the repository and you are ready to start.
Open a command line window from the root folder of the project and call
mvn compile
mvn test
Pull Requests and and all other Community Contributions are essential for open source software. Every contribution - from bug reports to feature requests, typos to full new features - are greatly appreciated.
This part is intended for committer who are packaging a release.
-
Check all your files are checked in
-
Execute "mvn -U clean test" to be sure all tests are passing
-
Update the version number in pom.xml and README.md
-
Commit the changes
-
Build and deploy the artifacts
mvn -up clean deploy
-
Go to Sonatype staging repositories and process the deploy
- select the repository and close it - wait until the close is processed
- release the package and wait until it is processed
-
Create the version on Github
- login to Github and open project https://github.com/HtmlUnit/htmlunit-csp
- click Releases > Draft new release
- fill the tag and title field with the release number (e.g. 3.8.0)
- append
- htmlunit-csp-3.x.x.jar
- htmlunit-csp-3.x.x.jar.asc
- htmlunit-csp-3.x.x-javadoc.jar
- htmlunit-csp-3.x.x-javadoc.jar.asc
- and publish the release
-
Update the version number in pom.xml to start next snapshot development
-
Update the htmlunit pom to use the new release
- RBRi
- all the contributors to salvation
This project is licensed under the Apache 2.0 License
Many thanks to all of you contributing to HtmlUnit/CSSParser/Rhino and salvation in the past.