This software is distributed under the BSD License. See: https://raw.github.com/RIPE-NCC/whois/master/LICENSE.md
It is preferable to write integration tests during development, and commit them along with any code changes. All dependencies apart from the database are mocked.
You can run a standalone Whois server locally. Dependencies must be configured in a local properties file.
More information here
See Running whois from within Intellij for instructions.
Pre-commit hook can be found in tools/precommitcheck
. This can be optionally configured by running: ln -fsv tools/precommitcheck .git/hooks/pre-commit
mvn clean install -DfailIfNoTests=false -Pintegration -Dit.test=NrtmClientInvalidHostTestIntegration
mvn clean install -Pintegration -pl whois-query
Whois uses AspectJ to perform compile-time aspect weaving of the code. This is needed for some functionality, e.g. the @RetryFor annotation.
Compile-time weaving works during a command-line Maven build, as the pom.xml uses aspectj-maven-plugin.
Any code that depends on AspectJ will fail if modified in IntelliJ without using the Ajc (AspectJ) compiler.
You can configure Ajc in the Preferences as follows:
- First install the AspectJ plugin provided by JetBrains from the IDE plugin repository
- Go to Build, Execution, Deployment -> Compiler -> Java Compiler
- Choose "Use Compiler: Ajc"
- Configure Path to aspectjtools.jar, e.g. ~/.m2/repository/org/aspectj/aspectjtools/1.9.8/aspectjtools-1.9.7.jar
- Press "Test" to confirm it's working.
- Go to Build, Execution, Deployment -> Build Tools -> Maven -> Importing
- Uncheck "Detect compiler automatically" (otherwise IntelliJ will revert from Ajc to JavaC)