Downloading all maven dependencies to a directory

Use case: Tired of having unwanted jars? Tired of finding dependent jars? Maven shall help to download all the dependencies of the project into a folder. Solution: If you already have a pom.xml execute command “mvn dependency:copy-dependencies” and you will find target/dependencies folder filled with all the dependencies. Else you can create simple pom.xml

Continue reading…

 

How to start windows command prompt as administrator?

If you wanted to start a batch file or any other executable from a command prompt as administrator user then its better to start the command prompt itself as administrator. To start command prompt as administrator, type cmd in the run window. Now instead of hitting the enter key, hit “Ctrl + Shift + Enter” [...]
Continue reading…

 

JSR 303 – How to write a custom validator?

Bean validation specifications. JSR 349 is the specification for Bean Validation 1.1. JSR 303 is the specification for Bean Validation 1.0 Bean validation is an important task irrespective of the architecture (enterprise web application or thick client-server) of the application. JSR 303 specification standardize the bean validation process. JSR 303 is not intended for use [...]
Continue reading…

 

How to create java maven project in Eclipse?

In this post we will talk about creating java maven project.  Steps involved in creating java maven project. 1. Lunch eclipse. Click “File->New->Maven Project” menu item. 2. In the new maven project dialog, select “create  a simple project” check box and click “Next” button. 3. Give appropriate “Group Id”, “Artifact Id”, “Version” and “Packaging Type”. [...]
Continue reading…