|
| 1 | +# HtmlUnit - CSSParser |
| 2 | + |
| 3 | +This is the code repository of the CSS parser used by HtmlUnit starting with version 1.30. |
| 4 | + |
| 5 | +For a long time HtmlUnit uses the CSSParser (http://cssparser.sourceforge.net/). But as HtmlUnit has to support more |
| 6 | +and more css related features a solution was required that offer more flexibility regarding the resulting object model. |
| 7 | +This implementation starts based on CSSParser 0.9.25; we removed the sac dependency and did some cleanup. |
| 8 | + |
| 9 | +We will try to stay in sync with CSSParser regarding the features in the future. |
| 10 | + |
| 11 | +[](https://maven-badges.herokuapp.com/maven-central/net.sourceforge.htmlunit/htmlunit-cssparser) |
| 12 | + |
| 13 | +:heart: [Sponsor](https://github.com/sponsors/rbri) |
| 14 | + |
| 15 | +### Project News |
| 16 | +[HtmlUnit@Twitter][3] |
| 17 | + |
| 18 | +### Latest release Version 3.6.0 / October 3, 2023 |
| 19 | + |
| 20 | +For maven, you would add: |
| 21 | + |
| 22 | + <dependency> |
| 23 | + <groupId>org.htmlunit</groupId> |
| 24 | + <artifactId>htmlunit-cssparser</artifactId> |
| 25 | + <version>3.6.0</version> |
| 26 | + </dependency> |
| 27 | + |
| 28 | +### Latst CI build |
| 29 | +The latest builds are available from our |
| 30 | +[Jenkins CI build server][2] |
| 31 | + |
| 32 | +[](https://jenkins.wetator.org/job/HtmlUnit%20-%20CSS%20Parser/) |
| 33 | + |
| 34 | +If you use maven please add: |
| 35 | + |
| 36 | + <dependency> |
| 37 | + <groupId>org.htmlunit</groupId> |
| 38 | + <artifactId>htmlunit-cssparser</artifactId> |
| 39 | + <version>3.7.0-SNAPSHOT</version> |
| 40 | + </dependency> |
| 41 | + |
| 42 | +You have to add the sonatype snapshot repository to your pom `repositories` section also: |
| 43 | + |
| 44 | + <repository> |
| 45 | + <id>OSS Sonatype snapshots</id> |
| 46 | + <url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url> |
| 47 | + <snapshots> |
| 48 | + <enabled>true</enabled> |
| 49 | + <updatePolicy>always</updatePolicy> |
| 50 | + </snapshots> |
| 51 | + <releases> |
| 52 | + <enabled>false</enabled> |
| 53 | + </releases> |
| 54 | + </repository> |
| 55 | + |
| 56 | + |
| 57 | +## Start HtmlUnit - CSSParser Development |
| 58 | + |
| 59 | +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. |
| 60 | + |
| 61 | +### Prerequisites |
| 62 | + |
| 63 | +You simply only need a local maven installation. |
| 64 | + |
| 65 | + |
| 66 | +### Building |
| 67 | + |
| 68 | +Create a local clone of the repository and you are ready to start. |
| 69 | + |
| 70 | +Open a command line window from the root folder of the project and call |
| 71 | + |
| 72 | +``` |
| 73 | +mvn compile |
| 74 | +``` |
| 75 | + |
| 76 | +### Running the tests |
| 77 | + |
| 78 | +``` |
| 79 | +mvn test |
| 80 | +``` |
| 81 | + |
| 82 | +## Contributing |
| 83 | + |
| 84 | +Pull Requests and and all other Community Contributions are essential for open source software. |
| 85 | +Every contribution - from bug reports to feature requests, typos to full new features - are greatly appreciated. |
| 86 | + |
| 87 | +## Deployment and Versioning |
| 88 | + |
| 89 | +This part is intended for committer who are packaging a release. |
| 90 | + |
| 91 | +* Check all your files are checked in |
| 92 | +* Execute "mvn -U clean test" to be sure all tests are passing |
| 93 | +* Update the version number in pom.xml and README.md |
| 94 | +* Commit the changes |
| 95 | + |
| 96 | + |
| 97 | +* Build and deploy the artifacts |
| 98 | + |
| 99 | +``` |
| 100 | + mvn -up clean deploy |
| 101 | +``` |
| 102 | + |
| 103 | +* Go to [Sonatype staging repositories](https://s01.oss.sonatype.org/index.html#stagingRepositories) and process the deploy |
| 104 | + - select the repository and close it - wait until the close is processed |
| 105 | + - release the package and wait until it is processed |
| 106 | + |
| 107 | +* Create the version on Github |
| 108 | + * login to Github and open project https://github.com/HtmlUnit/htmlunit-cssparser |
| 109 | + * click Releases > Draft new release |
| 110 | + * fill the tag and title field with the release number (e.g. 3.0.0) |
| 111 | + * append |
| 112 | + * htmlunit-cssparser-3.x.x.jar |
| 113 | + * htmlunit-cssparser-3.x.x.jar.asc |
| 114 | + * htmlunit-cssparser-3.x.x-javadoc.jar |
| 115 | + * htmlunit-cssparser-3.x.x-javadoc.jar.asc |
| 116 | + * and publish the release |
| 117 | + |
| 118 | +* Update the version number in pom.xml to start next snapshot development |
| 119 | +* Update the htmlunit pom to use the new release |
| 120 | + |
| 121 | +## Authors |
| 122 | + |
| 123 | +* **RBRi** |
| 124 | +* all the contributors to CSSParser |
| 125 | + |
| 126 | +## License |
| 127 | + |
| 128 | +This project is licensed under the Apache 2.0 License |
| 129 | + |
| 130 | +## Acknowledgments |
| 131 | + |
| 132 | +Many thanks to all of you contributing to HtmlUnit/CSSParser/Rhino in the past. |
| 133 | + |
| 134 | + |
| 135 | +[2]: https://jenkins.wetator.org/job/HtmlUnit%20-%20CSS%20Parser/ "HtmlUnit - CSS Parser CI" |
| 136 | +[3]: https://twitter.com/HtmlUnit "https://twitter.com/HtmlUnit" |
0 commit comments