Monday, August 21, 2017

Disable JavaDoc DocLint from CommandLine

DocLint is a plugin that validates your JavaDoc comments for html tags and several other syntax like missing params etc..
DocLint is enabled by default in Java 8. There can be legacy code that is not compliant with these validations which is hard to fix as well. But when you release such a code base in Java 8 with java doc generation enabled, your release will fail.

This can be done by disabling DocLint while the Maven release using following command.

mvn  -Darguments='-Dadditionalparam=-Xdoclint:none' release:prepare release:perform 

Reference : https://maven.apache.org/plugins/maven-javadoc-plugin/javadoc-mojo.html#doclint

Friday, August 18, 2017

WSO2 ESB - Adding a thread sleep

There can be situations where your ESB logic need thread sleeps to delay the executions. In WSO2 ESB, this can be easily done using the script mediator.

Following is the synapse code of the script mediator to add 1000ms thread sleep.



Feel free to use and share !!