Categories
Java Tech

Where to store passwords / credentials in Gradle Project

Problem Statement Projects are checked in version control systems like git. You don’t want your credentials to be checked in git too. As such you need a way to easily inject your credentials in your build while keeping it away from prying eye. Solution The solution is to store it in ~/.gradle/gradle.properties. This file is […]

Categories
Featured Java Tech

Recommendation: Private / Corporate Maven Repository: Sonatype Nexus or jFrog Artifactory

Requirements: I am writing several reusable libraries which need to refer each other in myriad ways, each may be worked upon by different developer. I don’t want to create a jumbo project with sub-modules where access control is a pita. I don’t want the repository to be publicly accessible. There should be fine-grained access control […]

Categories
Java

How to rapidly test alternative ideas in Java during development

Problem Java is a compiled language and in any non-trivial project you use multiple libraries which are neatly assembled for you when you run the application with your build system like gradle. This makes it hard and slow to test alternative ideas as you have to compile and run the project each time which is […]

Categories
Java Tech

Grails: Validating User Domain class

Grails provides support for validating fields. Here is a typical User class with field validation. It ensure that email address & url is of proper format, login is unique and password is not openly displayed. package com.taragana class User { String login String password String email String url static constraints = { login unique: true […]

Categories
Java

Ubuntu: How to install Oracle JDK 8 with apt get

Oracle JDK can be easily installed in Ubuntu using apt. Using apt simplifies the job of updating the JDK from time to time. To install Oracle JDK 8 sudo apt update sudo add-apt-repository ppa:webupd8team/java sudo apt update sudo apt install oracle-java8-installer  

Categories
Java

Java 10 Modules: Complete details

Details of all Java 10 Modules along with dependencies. To effectively use this list use the search function in your browser to find the package you need and then go up to find the module which contains your package. java.activation@10.0.2 exports javax.activation requires java.base mandated requires java.datatransfer transitive requires java.logging contains com.sun.activation.registries java.base@10.0.2 exports java.io […]