-
Notifications
You must be signed in to change notification settings - Fork 0
Contributing to Crawljax code
- Apache Maven version 3.0.3 or later to build and manage the dependencies of Crawljax.
- Java 7
- One of the webdriver supported web browsers installed.
If Eclipse is your preferred IDE you can follow these steps:
- clone crawljax from GitHub.
- Make sure you have the Maven Eclipse plugin installed from the Eclipse marketplace.
- In Eclipse, go to File > Import..., and choose Existing maven projects. Find the Crawljax directory you have cloned and select it for import. Crawljax is now a multi-module project, so select all the modules you need. The crawling engine is in the core module.
To run the tests you can use the regular Maven command to test:
mvn test
This will run all fast (browserless) unit tests.
To run all the tests, including the slower (browser-dependent) tests, run:
mvn test -P integrationtests
Provide proper JavaDoc comments, especially for public methods.
- Use
mvn javadoc:javadoc
to generate the JavaDoc API (generated in target/site/apidocs).
Format the code according to the eclipse-formatter.xml
file in the root dir.
To automatically format your code on each save in Eclipse:
- Under Preferences, choose Java --> Editor --> Save Actions. Check the "Perform the selected actions on save", and check the "Format source code" box.
- All tests succeed,
- you've used the code formatter to format all Java code,
- clear description of the contribution,
- every pull requests fixes/features one thing and one thing only. If you fixed multiple things, open multiple pull requests from different branches,
- If you have too many commits, or commits with broken code etc. consider squashing the commits.
Crawljax related artifacts should be deployed to Maven repositories as follows: if all the third-party dependencies of an artifact are already available in Central, then the artifact should be deployed to Central as well via Sonatype. Make sure to carefully read their requirements and instructions.
This holds for releases as well as snapshots.
The hierarchy of the poms in Crawljax is as follows:
- Crawljax parent-pom inherits from sonatype oss-parent
- All crawljax artifacts inherit from crawljax parent-pom
- All Crawljax plugins inherit from plugins-parent-pom
- Use the Maven release plugin.
- Once a release is made, the following items need to be updated:
The latest release API need to be updated with
target/checkout/target/apidocs