I am trying to create executable jar in Eclipse with Maven. My program perfectly works if I run it in Eclipse but if try to build it with Maven it will write this error and build failed. Can someone please help me!!!

```
 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile 
 (default-compile) on project myProject: Compilation failure
 [ERROR] C\FacebookGet.java:[34,25] error: for-each not applicable to expression type

```

Here is code where is error

```
Connection<Post> result = fbclient.fetchConnection(
            "********/feed", Post.class);

    Session session = GeneralSession.getSession();
    session.beginTransaction();
    34 - for (List<Post> page : result) {
    35 -   for (Post apost : page) {
    36 -     if (apost.getMessage() != null  

```