Category: BuildTools

Apache tomcat easy deployment script

Following is the script that can be used to deploy application to Apache tomcat running on a Linux machine. Also this script can be called from a Jenkins to automate the deployment process. The script file can be downloaded from HotDeployScript #/bin/bash#/bin/bash # . ~/.profile export APP_ID=$1export URL1="http://localhost:8257/myWebApp/mvc/" export CHECK_URLS="$URL1" export CATALINA_HOME=/opt/myWebApp/tomcat7/ export CATALINA_BASE=$CATALINA_HOME echo CATALINA_HOME:
Read More »

XML Schema generation from Java 8 code and Gradle integration

Using Java 8 and Gradle I had to generate XSD schema. Most of the Gradle plugins out there are not compatible with Java 8 yet. So I tweaked my way and following is how I did it. I had following model class supporting both JAXB and JSON. @XmlType(namespace = "http://com.invalid/1.0/request/schema") @XmlAccessorType(XmlAccessType.FIELD) @XmlRootElement(name = "Person") @JsonRootName(value
Read More »

Create maven archetype project

A simple maven archetypes with most common set of libraries, configured property files and some boiler plate code that you often copy past in every project can be of great help. I had similar requirements and here I am sharing my experience of creating a maven archetype project. The source code is available here Java-maven-archetype-github
Read More »