|
2 | 2 |
|
3 | 3 | ## HtmlUnitDriver Development |
4 | 4 |
|
5 | | -These instructions will get you a copy of the project up and running on your local machine |
6 | | -for development and testing purposes. See deployment for notes on how to deploy the project on a live system. |
| 5 | +These instructions will help you set up the project on your local machine for development and testing purposes. |
7 | 6 |
|
8 | 7 | ### Prerequisites |
9 | 8 |
|
10 | | -You simply only need a local maven installation. |
11 | | - |
| 9 | +You only need: |
| 10 | +- Java Development Kit (JDK) 8 or higher |
| 11 | +- Apache Maven (latest stable version recommended) |
12 | 12 |
|
13 | 13 | ### Building |
14 | 14 |
|
15 | | -Create a local clone of the repository and you are ready to start. |
| 15 | +1. Clone the repository to your local machine: |
| 16 | + ```bash |
| 17 | + git clone https://github.com/SeleniumHQ/htmlunit-driver.git |
| 18 | + cd htmlunit-driver |
| 19 | + ``` |
16 | 20 |
|
17 | | -Open a command line window from the root folder of the project and call |
| 21 | +2. Compile the project: |
| 22 | + ```bash |
| 23 | + mvn compile |
| 24 | + ``` |
18 | 25 |
|
19 | | -``` |
20 | | -mvn compile |
21 | | -``` |
| 26 | +### Running the Tests |
22 | 27 |
|
23 | | -### Running the tests |
| 28 | +Execute the test suite with: |
| 29 | + ```bash |
| 30 | + mvn test |
| 31 | + ``` |
24 | 32 |
|
25 | | -``` |
26 | | -mvn test |
27 | | -``` |
| 33 | +To run a clean build with all tests: |
| 34 | + ```bash |
| 35 | + mvn clean test |
| 36 | + ``` |
28 | 37 |
|
29 | 38 | ## Contributing |
30 | 39 |
|
31 | | -Pull Requests and all other Community Contributions are essential for open source software. |
32 | | -Every contribution - from bug reports to feature requests, typos to full new features - are greatly appreciated. |
| 40 | +Pull requests and all other community contributions are essential for open source software. |
| 41 | +Every contribution—from bug reports to feature requests, typos to full new features—is greatly appreciated. |
| 42 | + |
| 43 | +Before submitting a pull request: |
| 44 | +- Ensure all tests pass |
| 45 | +- Follow the existing code style |
| 46 | +- Add tests for new features |
| 47 | +- Update documentation as needed |
33 | 48 |
|
34 | 49 | ## Deployment and Versioning |
35 | 50 |
|
36 | | -This part is intended for committer who are packaging a release. |
| 51 | +**This section is intended for committers who are packaging a release.** |
37 | 52 |
|
38 | | -* Check all your files are checked in |
39 | | -* Execute these mvn commands to be sure all tests are passing and everything is up to data |
| 53 | +### Pre-release Checklist |
40 | 54 |
|
41 | | -``` |
| 55 | +1. Ensure all changes are committed and pushed |
| 56 | + |
| 57 | +2. Verify everything is up to date and all tests pass: |
| 58 | + ```bash |
42 | 59 | mvn versions:display-plugin-updates |
43 | 60 | mvn versions:display-dependency-updates |
44 | 61 | mvn -U clean test |
45 | | -``` |
46 | | - |
47 | | -* Update the version number in pom.xml and README.md |
48 | | -* Commit the changes |
| 62 | + ``` |
49 | 63 |
|
| 64 | +3. Update version numbers: |
| 65 | + - Update version in `pom.xml` (remove `-SNAPSHOT` suffix) |
| 66 | + - Update version in `README.md` |
| 67 | + - Commit these changes |
50 | 68 |
|
51 | | -* Build and deploy the artifacts |
| 69 | +### Build and Deploy |
52 | 70 |
|
53 | | -``` |
| 71 | +1. Build and deploy artifacts to Maven Central: |
| 72 | + ```bash |
54 | 73 | mvn -up clean deploy |
55 | | -``` |
56 | | - |
57 | | -* Go to [Maven Central Portal](https://central.sonatype.com/) and process the deploy |
58 | | - - publish the package and wait until it is processed |
59 | | - |
60 | | -* Create the version on GitHub |
61 | | - * login to GitHub and open project https://github.com/HtmlUnit/htmlunit-cssparser |
62 | | - * click Releases > Draft new release |
63 | | - * fill the tag and title field with the release number (e.g. 4.0.0) |
64 | | - * append/ the build artifacts and |
65 | | - * publish the release |
66 | | - |
67 | | -* Update the version number in pom.xml to start next snapshot development |
68 | | -* Update the htmlunit pom to use the new release |
| 74 | + ``` |
| 75 | + |
| 76 | +2. Publish to Maven Central: |
| 77 | + - Go to [Maven Central Portal](https://central.sonatype.com/) |
| 78 | + - Log in and locate your deployment |
| 79 | + - Verify the contents |
| 80 | + - Publish the package |
| 81 | + - Wait for processing to complete (usually 10-30 minutes) |
| 82 | + |
| 83 | +### Create GitHub Release |
| 84 | + |
| 85 | +1. Navigate to https://github.com/SeleniumHQ/htmlunit-driver |
| 86 | +2. Click **Releases** → **Draft a new release** |
| 87 | +3. Fill in the release information: |
| 88 | + - **Tag**: Version number (e.g., `4.0.0`) |
| 89 | + - **Release title**: Same as tag (e.g., `4.0.0`) |
| 90 | + - **Description**: Add release notes highlighting new features, fixes, and breaking changes |
| 91 | +4. Attach build artifacts (JARs) |
| 92 | +5. Click **Publish release** |
| 93 | + |
| 94 | +### Post-release Tasks |
| 95 | + |
| 96 | +1. Update `pom.xml` to next SNAPSHOT version: |
| 97 | + ```xml |
| 98 | + <version>X.Y.Z-SNAPSHOT</version> |
| 99 | + ``` |
| 100 | + |
| 101 | +2. Commit the snapshot version: |
| 102 | + ```bash |
| 103 | + git commit -am "Begin development of X.Y.Z-SNAPSHOT" |
| 104 | + git push |
| 105 | + ``` |
| 106 | + |
| 107 | +3. Update dependent projects: |
| 108 | + - Update the HtmlUnit `pom.xml` to reference the new release version |
| 109 | + |
| 110 | +### Versioning |
| 111 | + |
| 112 | +We use [Semantic Versioning](https://semver.org/): |
| 113 | +- **MAJOR** version for incompatible API changes |
| 114 | +- **MINOR** version for backwards-compatible functionality additions |
| 115 | +- **PATCH** version for backwards-compatible bug fixes |
0 commit comments