Posts Tagged Java

copy-maven-plugin missing required class “org.sonatype.aether.RepositorySystem”

Today, when I tried to build one of our existing projects Maven gave me the following error:

[ERROR] Failed to execute goal com.github.goldin:copy-maven-plugin:0.2.5:copy ...
com.github.goldin:copy-maven-plugin:0.2.5:copy failed: A required class was missing while executing
com.github.goldin:copy-maven-plugin:0.2.5:copy: Lorg/sonatype/aether/RepositorySystem;

Read the rest of this entry »

, , ,

Leave a comment

Better Type Inference in Java 8 Generics

Java 7 gave us the diamond operator:

  Map<String, String> dict = new HashMap<>();

The code above doesn’t duplicate the type parameters unnecessarily as it made perfect sense to extend type inference to instantiation. Now Java 8 pushes type inference a little further. Read the rest of this entry »

, , ,

Leave a comment

Java 8 Lambda Expressions Capture Values, Not Variables

Before Java 8, when we needed to use a local variable inside an anonymous inner class, the local variable had to be declared final:

public class ValueCaptureAnon {
  public static void main(String[] args) {
    String name = "Yagiz"; //Compile error in Java 7...

    Runnable runnable = new Runnable() {
      public void run() {
        System.out.println("Name is " + name);

Read the rest of this entry »

, , , ,


Building a RESTful Service Layer with JAX-RS, RESTEasy and Spring Framework

Just like many of you, we’ve been developing RESTful services for a while. We’ve used various frameworks in .NET and in Java, in large systems as well as on the server-side of our mobile apps. Unless there’s a good reason not to do so, REST is our preferred approach in building a service layer. Recently we’ve had a series of discussions about different approaches in building a RESTful service layer and I decided to outline one of the ways to do it using RESTEasy, Jackson, JSON and Spring Framework on the Java platform.

Read the rest of this entry »

, , , , , , , ,

1 Comment

Showing Live Templates in Code Completion in IntelliJ IDEA

IntelliJ’s Live Templates are great help while one’s in the flow of development. You probably know a few by heart however it’s not easy, nor practical, to remember all the shortcuts. Wouldn’t it be nice to have them shown in the code completion pop-up?

Live Templates shown in the Code Completion pop-up

Go to “Help -> Find Action…”

Screen Shot 2013-12-31 at 14.05.37

Ensure that “Include non-menu actions” are checked. Search for “registry” and select “Registry”.

Screen Shot 2013-12-31 at 14.07.11

Find “” setting and enable it.

IntelliJ IDEA - Registry window

And voilà!

Happy New Year!

, , , ,

Leave a comment

JavaOne 2012 – Day 3

For me, finding time to blog in between sessions is almost impossible in JavaOne. Going back and forth between different hotels and trying to be in the room early enough to secure a nice seat are time consuming. And when you factor in the fact that the BOF (Birds of a Feather) sessions may end as late as 21:15, I’m not left with many viable options for blogging. Normally I’m a night owl. I can work well and be pretty productive late at night. However, this year I’m trying something new. I’m waking up at 5 AM to get some work done early in the morning.

When I blog about a day’s sessions, ideally I try to select a few sessions, the most interesting ones. But sometimes there are so many good sessions that it becomes really difficult to short-list them. Wednesday (javaOneDays[3]) was such a day when three of my Top 5 sessions took place. As an attendee it is a wonderful thing. However as a blogger it makes life harder. Read the rest of this entry »

, , , , , , , , , ,


JavaOne 2012 – Day 2

San Francisco is a busy city. Even though I wake up very early, the traffic and the noise outside suggest that this city never sleeps. But I’m sure most of the JavaOne attendees were sleeping at 5AM when I woke up to finish yesterday’s blog post. Anyway… Let’s get started. In today’s article I’m going to write about 4 of the sessions that I attended during Days[2] of JavaOne.

NoSQL Morning

JavaOne Day 2 started with two interesting NoSQL sessions. Read the rest of this entry »

, , , , , , , ,

Leave a comment