How to Remove Duplicates from a Property File Easily?

Development projects would need internationalization generally. Most people use property files backed by a ResourceBundle to support it. Developers tend to keep different property files for different countries and keep adding new keys and values whenever they need. If you are a developer, you might have already been there in a situation where once in a while you would need to clean up the property files and remove duplicates.

Read the rest

How to setup a Gradle continuous build for your java project

One of the major benefit Gradle can provide you is continuous build feature. First of all let me explain what is meant by continuous build. A normal build is where you make any changes in the source files  (It can be in .java file or in the resources you use) and you need to explicitly build your project to create a new jar/war/ear file.

Read the rest

Java Compile Time And Run Time Dependencies, Provided Scope And More

This post is inspired from the mess I have made in my java project around compile time and runtime dependencies. There are lots of questions you will ask when you try to resolve all the dependencies for your project using tools like Maven or Gradle. These tools make a distinction between compile time and run time dependency, like compile scope, provided scope etc.

Read the rest

How to use Papercut with java mail API

How to use Papercut with java mail API

Are you looking for a way to use Papercut with java mail API? If so, then I will share the method I stumbled upon while searching for the same.

As a software developer, I too got stuck with this problem. I had to check and verify whether the mail content is in place while sending a mail using JAVA mail API. During Development phase we cannot send the mail directly to someone. We have to make sure that the mail is presentable to the end user. The code for java mail is as shown below

Share this article:
Share

How to increase the timeout of wildfly server

Sometimes when we try to fetch very large results from a database (transactions), it may take hell lot of time. But within that time, our server will get timed out and show you a timeout error. Argh, annoying. Isn’t it?  This may even happen when we are involved in an important task which may take hours to complete. Usually, the Wildfly server may get a timeout by 300 seconds (5 minutes) for a transaction. We can change this timeout problem by just adding a small piece of code in the standalone.xml file which will be available in \wildfly-8.0.0.Final\standalone\configuration.  Below, I have provided the code change which is required to alter the timeout. First, open standalone.xml and search for

Share this article:
Share

Top 5 Gradle Tips And Tricks For Beginners

Release Engineers are inevitable part in software engineering field, who is concerned with compilation, wrapping up or assembly and delivery (deployment) of the source code. These days bigger projects are using Gradle as the build tool since it makes the release of the code much faster and hassle-free. Gradleware is the Enterprise Automation Company supporting Gradle doing a great job in keeping Gradle open source, community developed and they are giving high-quality training in build and automation using Gradle.

Read the rest

How to write and call methods in gradle script

As mentioned in our previous post where we discussed the flow of a gradle custom task, we will now talk about how we can define a custom method inside the Gradle script so that we can arrange our coding for a better understanding.

In one approach of writing methods are given below:

ext.myCustomMethod = {  parameter_1, parameter_2 ->

   <logic>

}

The above declaration of method will be globally available along the project.

Read the rest