Uploaded image for project: 'Apache ServiceComb'
  1. Apache ServiceComb
  2. SCB-439

Provide Maven Archetypes in Java Chassis

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • java-chassis-1.0.0-m2
    • java-chassis-1.0.0-m2
    • Java-Chassis
    • None

    Description

      What's maven archetypes ?

      http://maven.apache.org/guides/introduction/introduction-to-archetypes.html

      Why we need provide archetypes ?

      If user create a blank maven project and want import chassis, he must do these steps:

      1. Our chassis support multi provider and transport, also support integration with spring boot, he must copy right dependencies into pom, and let "java-chassis-dependencies" manage versions.
      2. He must create "microservice.yaml" in resources folder and fill right setting, so I think he will copy from samples.
      3. He may copy endpoint implement and replace the operations for faster rewrite.

      So, I think if we need write long user guide (http://servicecomb.incubator.apache.org/users/) to explain how to do,why don't we just create one with a "hello world" provider, then Fire.

      What we will provide ?

            1.business-service-pojo

                Archetype for create a common microservice using pojo provider.

            2.business-service-springmvc

                Archetype for create a common microservice using springmvc provider.

            3.business-service-jaxrs

                Archetype for create a common microservice using jaxrs provider.

            4.business-service-with-spring-boot-starter

                Archetype for create a common microservice using spring-boot-starter-provider.

             5.edge-service

                Archetype for create an edge microservice using servicecomb edge-core with a general router dispatcher.

             6.edge-service-with-zuul

                Archetype for create an edge microservice using spring cloud zuul.

             7.auth-service

                Archetype for create an auth microservice with a simple jwt(Json Web Token) authentication.

      How these archetypes build and publish ?

      We will buid this archetypes via mvn archetype:create-from-project.

      Then publish them into maven center repository

      ```xml
      <groupId>org.apache.servicecomb.archetypes</groupId>
      <artifactId>${archetype-name}</artifactId>
      <version>${archetype-version}</version>
      ```

      How to use these archetypes generate project(module) ?

      create project(module) via IDE, or run command :

      ```bash

      mvn archetype:generate -DarchetypeGroupId=org.apache.servicecomb.archetypes -DarchetypeArtifactId=business-service-xxx-archetype -DarchetypeVersion=${archetype-version}

      ```

      Discussion mail :

      https://lists.apache.org/thread.html/15273af2af376e3d3000aa8864acfaee07c8ce08b927a3f9f8a7409d@%3Cdev.servicecomb.apache.org%3E

      Attachments

        Activity

          People

            zhengyangyong Yangyong Zheng
            zhengyangyong Yangyong Zheng
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: