On Mon, 24 Jun 2024, Zoltán Csorba wrote:
> in my opinion, the "setup" section on the Project Lombok site is pretty
It’s good, unless you have no idea how things have to look in
the first place.
>On Monday 24 June 2024 at 19:45:47 UTC+1 Karl Schmitt wrote:
>
>> Dear mighty Lombok experts,
>>
>> can somebody point me to a simple lombok hello world example
>> using Mavon?
I just made a tiny example for you: in a new directory “lombokdemo”,
save the attached files:
• src/main/java/com/example/lombokdemo/Main.java
• lombok.config
• pom.xml
Then run “mvn clean package”. And:
$ java -jar target/lombokdemo-0.1-SNAPSHOT.jar foo bar baz
0=<foo>
1=<bar>
2=<baz>
This shows how to use the “val” feature, for other features,
use appropriate Java code, but this shows the integration
(also with a very nice useful (authored by me) parent POM to
reduce boilerplate from Maven, which supports building with
and for Java 8, 11, 17 and 21 currently, you’d fill the fields
url, licenses, developers, organization[sic!] and scm and the
properties yourself of course (outputTimestamp will be updated
by the Maven Release Plugin) and update groupId, artifactId,
version and description to suit your needs (retain name, this
is the recommended format for Maven Central). For more, see:
https://github.com/qvest-digital/maven-parent/blob/master/NOTES
(That also provides a test artefact you can include which makes
all logging, for all frameworks, log into target/tests-*.log and
at only INFO level to the console. This is useful for Lombok’s
log, but I wanted to avoid the discussion about what to use.)
Please feel free to take from these 3 files at will (consider
them CC0-licenced, but they are really trivial).
gl hf,
//mirabilos
--
Infrastrukturexperte • Qvest Digital AG
Am Dickobskreuz 10, D-53121 Bonn •
https://www.qvest-digital.com/
Telephon
+49 228 54881-393 • Fax:
+49 228 54881-235
HRB AG Bonn 18196 • USt-ID (VAT): DE274355441
Vorstand: Dr. Stefan Barth, Kai Ebenrett, Boris Esser, Alexander Steeg
Vorsitzender Aufsichtsrat: Peter Nöthen