2

I would like to use lombok 1.16.10 in Eclipse Neon in an EE project. When I create the simplest managed bean:

import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;

import lombok.Getter;
import lombok.Setter;

@ManagedBean
@SessionScoped
class IndexBean
{
  @Getter
  @Setter
  private String name;
}

And I refer to it in the simplest JSP page:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>
<body>
<f:view>
  <h:form>
    <h:inputText value="#{indexBean.name}"> </h:inputText>
  </h:form>
</f:view>
</body>
</html>

The compiler can not see the IndexBean.name field in the JSP. If I write the accessors manually, there is no problem (the lombok.jar is in the classpath of the project). What I missed?

Another questions:

  • Is there any way to create a JSF facelets instead of a JSP pages in Eclipse? This is an old fashioned and hard to maintain form.
  • How can I set that the code generation prefer the annotations against the dependencies? When I create a managed bean it does not contain the annotations.

All of this is working in NetBeans like a charm!

The Bitman
  • 1,279
  • 1
  • 11
  • 25
  • I must have the same problem http://stackoverflow.com/questions/42301333/eclipse-lombok-annotations-not-compiled-why – Zorglube Feb 17 '17 at 15:17

0 Answers0