Simplest Possible MicroProfile Maven Kickstarter

Execute: mvn archetype:generate -DarchetypeGroupId=com.airhacks -DarchetypeArtifactId=microprofile-essentials-archetype -DarchetypeVersion=0.0.2

for interactive mode or (replace [PROJECT_NAME]) in batch mode:

mvn archetype:generate -DarchetypeGroupId=com.airhacks -DarchetypeArtifactId=microprofile-essentials-archetype -DarchetypeVersion=0.0.2 -DgroupId=com.airhacks -DartifactId=[PROJECT_NAME] -Dversion=0.0.1 -Darchetype.interactive=false --batch-mode

Output: MicroProfile 1.3 ThinWar (4.5kB) project with:

  • MicroProfile HealthCheck: LivenessCheck
  • No-dependencies pom.xml (25 LoC)
  • Configured JAX-RS resource /resources/ping
  • Configured DI in beans.xml descriptor (a single tag, formatted. Takes 5 LoC)

Payara 5 Full and openliberty.io servers, are not only Java EE 8 compliant, they also come with MicroProfile 1.3 APIs -- so you don't have to use any esoteric runtimes.

Payara 5, OpenLiberty Dockerfile is also available from: docklands. The Maven Archetype is available in: https://github.com/AdamBien/microprofile-essentials-archetype.

See you at MicroProfile With or Without Jakarta EE, at Munich Airport, Terminal 2

Comments:

There is an Eclipse Wiki page for MicroProfile which lists implementation statuses:

https://wiki.eclipse.org/MicroProfile/Implementation

It's not always updated immediately when a new implementation is available but each implementation shows its own version so it is still quite a useful page.

Posted by Mike on May 11, 2018 at 02:28 PM CEST #

Hi Adam,
Is there a reason why you don't use [1] dockerfile-maven plugin, with it you can get rid of the shell script?

Regards,
Dejan

[1]https://github.com/spotify/dockerfile-maven

Posted by Dejan Kitic on May 11, 2018 at 03:25 PM CEST #

I get the following error trying this:

Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.0.1:generate (default-cli) on project standalone-pom: The desired archetype does not exist (com.airhacks:microprofile-essentials-archetype:0.0.1) -> [Help 1]

Do I need a special maven repo for this?

Thanks for your help.

Posted by Mike on May 13, 2018 at 01:49 AM CEST #

Hi, Adam! It seems you removed this archetype from the repository, right? I can't find it...
Thanks!

Posted by André on May 26, 2018 at 04:20 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
...the last 150 posts
...the last 10 comments
License