JEXL does not use Velocity for parsing; JEXL was inspired by Velocity and JSP/EL (10 years ago).
Anyhow, if you are able to use the most current JEXL code (ie compile JEXL 3.2 from the trunk), you should be able to remove the quotes only from the first member of your expression.
Example test case follows.
Cheers
public static class CustomEnzo {
private final String name;
public CustomEnzo(String nm) {
this.name = nm;
}
public CustomEnzo getItem() {
return this;
}
public String getName() {
return name;
}
}
@Test
public void testEnzo001() throws Exception {
Map<String, Object> cmap = new TreeMap<>();
Map<String, CustomEnzo> vmap = new TreeMap<>();
vmap.put("ProductName", new CustomEnzo("000"));
vmap.put("Product.Name", new CustomEnzo("001"));
vmap.put("Product...Name", new CustomEnzo("002"));
cmap.put("GroupName", vmap);
JexlContext ctxt = new MapContext(cmap);
JexlEngine jexl = new JexlBuilder().create();
Object result;
result = jexl.createExpression("GroupName.ProductName.item.name").evaluate(ctxt);
Assert.assertEquals("000", result);
result = jexl.createExpression("GroupName.'ProductName'.item.name").evaluate(ctxt);
Assert.assertEquals("000", result);
result = jexl.createExpression("GroupName.'Product.Name'.item.name").evaluate(ctxt);
Assert.assertEquals("001", result);
result = jexl.createExpression("GroupName.'Product...Name'.item.name").evaluate(ctxt);
Assert.assertEquals("002", result);
result = jexl.createExpression("GroupName.'Product...Name'.'item'.'name'").evaluate(ctxt);
Assert.assertEquals("002", result);
}