Hi guys.
I’m converting a normal project to a maven one and i’m using lombok into it. I had no problems without maven but now i get errors while Getter and Setter methods are called (not when they’re declarated).
Example:
@Getter private ArrayList<Weapon> weapons = new ArrayList<>(); (No error)
for(Weapon weap:map.getWeapons()) (This gives me error)
The error is that the method doesn’t exist. I use this code into pom.xml to register lombok:
Well without seeing the error it’s hard to tell what’s wrong. However, when you declare a dependency using provided scope, you’re telling maven to not bundle that jar with your application and that you will sort that out yourself later on. Now assuming you get a class not found exception or similar, I would remove the line altogether and let maven include it in the built artifact for you.
Depends on the IDE you are using. AFAIK all ide’s do not use gradle/maven for compiling/error checking.
For Eclipse you have to install the official lombok plugin.
For IntelliJ there is also a lombok plugin, and you have to enable annotation processing in the compiler settings
I guess for Netbeans there is also a solution
Lombok does offer quite a few nice features. Why writing getters/setters? They are just boilerplate and increase the number of lines you have to scroll.
And the more advanced stuff like @Builder are pretty nice because you don’t have to refactor your Builder/Factory
1)Yes,it is,you can see it in the screen.
2) AbstractMap map=(AbstractMap) Helpers.compileClass(name,Helpers.modPath+"/Maps/"+name);
3) @Getter private ArrayList<Weapon> weapons = new ArrayList<>();
Sorry to update thread but i still haven’t got a solution :\
The problem is that i don’t know how to specify the asset folder. Do i have to change all my paths in the game or is there a way to make it work like a jme3 pre-configurated project like the one that IDE propose?