1

I want to start a microservice project base on JEE 8 with payara micro. ( or maybe wildfly swarm). Anyway does anybody have a maven archetype for creating a microservice structure like those exist for spring boot ?

A complete structure containing DAO , MODEL , CONTROLLER , VIEW , CONFIGURATION file and ...

OmiD
  • 231
  • 2
  • 4
  • 14
  • Which Spring Boot archetype do you mean? I don't know of any SB archetype that generates such project structure. There's start.spring.io but that also doesn't generate application code apart from a simple Main class and a test for it. – OndroMih May 28 '18 at 23:36

2 Answers2

2

There's a Payara Micro maven archetype available in Maven Central repository. Here's how to use it to generate a project: https://github.com/payara/ecosystem-maven/tree/master/payara-micro-maven-archetype

You just need to set version.javaee to 8.0, version.payara.micro to 5.181 and also set version of the payara-micro-maven-plugin to 1.0.0, which is the last one available in Maven Central right now.

However, the generated project is fairly simple - it only configures the payara-micro-maven-plugin and contains a simple html page. There's no other generator for Payara Micro yet. However any Java EE 8 project generator would work because you don't need any special configuration to build and run a microservice with Payara Micro. You can simply run the final WAR with Payara Micro from command line or you can generate an executable JAR. Payara Micro Maven plugin only makes it easier to do this from within a maven build but it's not required.

OndroMih
  • 7,280
  • 1
  • 26
  • 44
0

I didn't find any good sample for microservice based on Java EE 8. So myself did a sample on wildfly swarm.

1- hibernate as JPA (eclipselink in pom.xml is also available)

2- EJB 3 , JAX-RS , JSON-B , JSON-P , JSF 2

OmiD
  • 231
  • 2
  • 4
  • 14