A maven archetype for EZCloud scaffolding

Overview

ezcloud-archetype

HnF0M9.png

mit contributors jdk automation

English Doc 中文文档

A maven archetype for EZCloud scaffolding.

💡 Usage

create single project

Customize the values of the following parameters according to the situation:

mvn -U -B archetype:generate \
-DarchetypeGroupId='io.github.project-h3phaestus' \
-DarchetypeArtifactId='ezcloud-archetype' \
-DarchetypeVersion='1.0.0-SNAPSHOT' \
-Dgitignore='.gitignore' \
-DprojectDescription='' \
-DgroupId='' \
-DartifactId='' \
-Dpackage='' \
-DjdkVersion='' \
-DserverPort='${random.int(1000,2000)}' \
-DnacosDevHost='' \
-DnacosTestHost='' \
-DnacosPrdHost='' \
-Dauthor='' \
-DezCloudVersion=''

batch create project

We can also generate multiple projects simultaneously through python script:

python version: 3.8

current running OS: ' + ('Windows' if os.name == 'nt' else 'Unix')) # parse JSON configuration: print('[ INFO] Start parsing json configuraiton...') configArray = json.loads(configJson) # exec dynamic commands print('> Fetch archetype from remote mvn repository?[y/n]:') fromRemoteFlag = input() print(f"""[ INFO ] Start generating {len(configArray)} projects...""") processes = [] try: for config in configArray: command = f""" mvn -U -B archetype:generate \ {f'-DarchetypeCatalog=internal {chr(92)}' if fromRemoteFlag != 'y' else ''} -DarchetypeGroupId='io.github.project-h3phaestus' \ -DarchetypeArtifactId='ezcloud-archetype' \ -DarchetypeVersion='1.0.0-SNAPSHOT' \ -Dgitignore='.gitignore' \ -DprojectDescription={config['projectDescription']} \ -DgroupId={config['groupId']} \ -DartifactId={config['artifactId']} \ -Dpackage={config['package']} \ -DjdkVersion={config['jdkVersion']} \ -DserverPort='{config['serverPort']}' \ -DnacosDevHost='{config['nacosDevHost']}' \ -DnacosTestHost='{config['nacosTestHost']}' \ -DnacosPrdHost='{config['nacosPrdHost']}' \ -Dauthor='{config['author']}' \ -DezCloudVersion='{config['ezCloudVersion']}' """ print(command) processes.append(subprocess.Popen(command, shell=True)) except Exception as e: print(f"""[ ERROR] Failed to generate projects: {str(e)}""") sys.exit(1) for process in processes: process.wait() print('[ OK ] Success!') ">
import json
import os
import sys
import subprocess

# JSON configuration:
configJson = """[
    {
        "projectDescription": "my test project",
        "groupId": "com.yangyunsen.test",
        "artifactId": "ezcloud-test",
        "package": "com.yangyunsen.test.ezcloudtest",
        "jdkVersion": "11",
        "author": "clouds3n",
        "ezCloudVersion": "1.0.0-SNAPSHOT",
        "serverPort": "${random.int(1000,2000)}",
        "nacosDevHost": "10.236.101.16:30848",
        "nacosTestHost": "192.168.2.157:8848",
        "nacosPrdHost": "nacos-headless.default.svc.cluster.local:8848",
        "driverType": "0"
    },
    {
        "projectDescription": "my test project2",
        "groupId": "com.yangyunsen.test",
        "artifactId": "ezcloud-test2",
        "package": "com.yangyunsen.test.ezcloudtest2",
        "jdkVersion": "11",
        "author": "clouds3n",
        "ezCloudVersion": "1.0.0-SNAPSHOT",
        "serverPort": "${random.int(1000,2000)}",
        "nacosDevHost": "10.236.101.16:30848",
        "nacosTestHost": "192.168.2.157:8848",
        "nacosPrdHost": "nacos-headless.default.svc.cluster.local:8848",
        "driverType": "0"
    },
    {
        "projectDescription": "my test project3",
        "groupId": "com.yangyunsen.test",
        "artifactId": "ezcloud-test3",
        "package": "com.yangyunsen.test.ezcloudtest3",
        "jdkVersion": "11",
        "author": "clouds3n",
        "ezCloudVersion": "1.0.0-SNAPSHOT",
        "serverPort": "${random.int(1000,2000)}",
        "nacosDevHost": "10.236.101.16:30848",
        "nacosTestHost": "192.168.2.157:8848",
        "nacosPrdHost": "nacos-headless.default.svc.cluster.local:8848",
        "driverType": "0"
    },
    {
        "projectDescription": "my test project4",
        "groupId": "com.yangyunsen.test",
        "artifactId": "ezcloud-test4",
        "package": "com.yangyunsen.test.ezcloudtest4",
        "jdkVersion": "11",
        "author": "clouds3n",
        "ezCloudVersion": "1.0.0-SNAPSHOT",
        "serverPort": "${random.int(1000,2000)}",
        "nacosDevHost": "10.236.101.16:30848",
        "nacosTestHost": "192.168.2.157:8848",
        "nacosPrdHost": "nacos-headless.default.svc.cluster.local:8848",
        "driverType": "0"
    },
    {
        "projectDescription": "my test project5",
        "groupId": "com.yangyunsen.test",
        "artifactId": "ezcloud-test5",
        "package": "com.yangyunsen.test.ezcloudtest5",
        "jdkVersion": "11",
        "author": "clouds3n",
        "ezCloudVersion": "1.0.0-SNAPSHOT",
        "serverPort": "${random.int(1000,2000)}",
        "nacosDevHost": "10.236.101.16:30848",
        "nacosTestHost": "192.168.2.157:8848",
        "nacosPrdHost": "nacos-headless.default.svc.cluster.local:8848",
        "driverType": "0"
    }
]"""

print('> current running OS: ' + ('Windows' if os.name == 'nt' else 'Unix'))

# parse JSON configuration:
print('[ INFO] Start parsing json configuraiton...')
configArray = json.loads(configJson)

# exec dynamic commands
print('> Fetch archetype from remote mvn repository?[y/n]:')
fromRemoteFlag = input()
print(f"""[ INFO ] Start generating {len(configArray)} projects...""")
processes = []
try:
    for config in configArray:
        command = f"""
        mvn -U -B archetype:generate \
        {f'-DarchetypeCatalog=internal {chr(92)}' if fromRemoteFlag != 'y' else ''}
        -DarchetypeGroupId='io.github.project-h3phaestus' \
        -DarchetypeArtifactId='ezcloud-archetype' \
        -DarchetypeVersion='1.0.0-SNAPSHOT' \
        -Dgitignore='.gitignore' \
        -DprojectDescription={config['projectDescription']} \
        -DgroupId={config['groupId']} \
        -DartifactId={config['artifactId']} \
        -Dpackage={config['package']} \
        -DjdkVersion={config['jdkVersion']} \
        -DserverPort='{config['serverPort']}' \
        -DnacosDevHost='{config['nacosDevHost']}' \
        -DnacosTestHost='{config['nacosTestHost']}' \
        -DnacosPrdHost='{config['nacosPrdHost']}' \
        -Dauthor='{config['author']}' \
        -DezCloudVersion='{config['ezCloudVersion']}'
        """
        print(command)
        processes.append(subprocess.Popen(command, shell=True))
except Exception as e:
    print(f"""[ ERROR] Failed to generate projects: {str(e)}""")
    sys.exit(1)
for process in processes:
    process.wait()
print('[ OK ] Success!')

🛠️ project yaml config sample

server:
  servlet:
    session:
      timeout: 30M
spring:
  profiles:
    active: dev
  application:
    name: ezcloud-test
  servlet:
    multipart:
      max-request-size: 20MB
      max-file-size: 20MB
  datasource:
    url: jdbc:postgresql://x454262h22.qicp.vip:5432/zd
    username: zd
    password: cquiss3
    hikari:
      connection-timeout: 60000
      minimum-idle: 1
      maximum-pool-size: 6
      idle-timeout: 30000
      pool-name: HikariPool
  cloud:
    sentinel:
      transport:
        port: 20100
        dashboard: 192.168.2.157:8080
  redis:
    host: 192.168.2.157
    port: 16379
    password: cquissE!
    timeout: 10s
    lettuce:
      pool:
        min-idle: 1
        max-idle: 3
        max-active: 4
        max-wait: -1ms

mybatis-plus:
  configuration:
    auto-mapping-behavior: full
    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
    default-enum-type-handler: org.apache.ibatis.type.EnumOrdinalTypeHandler
    local-cache-scope: statement
    cache-enabled: false
  global-config:
    banner: false
    db-config:
      id-type: assign_id
      table-prefix: tm
      logic-delete-field: deleted
      logic-not-delete-value: false
      logic-delete-value: true
      update-strategy: not_null
      insert-strategu: not_null

ezcloud:
  autoconfigure:
    enable-thread-pool: true
    enable-mvc: true
    enable-exception-handler: true
    enable-serializer: true
    enable-redisson-cache-manager: true

feign:
  sentinel:
    enabled: true

🔨 Contributing

PRs accepted.

Small note: If editing the Readme, please conform to the standard-readme specification.

😎 Contributors

📘 License

MIT © CloudS3n

You might also like...

The easiest way to integrate Maven into your project!

Maven Wrapper Ongoing Migration to Apache Maven The project codebase has been accepted to be included in the upstream Apache Maven project itself. Cur

Dec 23, 2022

Support alternative markup for Apache Maven POM files

Overview Polyglot for Maven is a set of extensions for Maven 3.3.1+ that allows the POM model to be written in dialects other than XML. Several of the

Dec 17, 2022

Randomized Testing (Core JUnit Runner, ANT, Maven)

RANDOMIZED TESTING ================== JUnit test runner and plugins for running JUnit tests with pseudo-randomness. See the following for more infor

Dec 26, 2022

Apache Maven core

Apache Maven Apache Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can man

Jan 2, 2023

Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE 8 and provides the functionalities to use and handle easily Tiles in your JavaFX application.

Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE 8 and provides the functionalities to use and handle easily Tiles in your JavaFX application.

Lib-Tile Intention Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE and provides the functionalities to use and handle easily Tile

Apr 13, 2022

Maven port of the Netflix Gradle code generation plugin for graphql. https://github.com/Netflix/dgs-codegen

This is port of the netflix codegen plugin for Gradle. Found here. COPIED FROM NETFLIX DOCUMENTATION. The DGS Code Generation plugin generates code fo

Dec 24, 2022

Maven plugin to help creating CHANGELOG by keeping one format and solving merge request conflicts problem by extraction of new CHANGELOG entries to seperate files.

keep-changelog-maven-plugin CHANGELOG.md is one of the most important files in a repository. It allows others to find out about the most important cha

Aug 28, 2022

A Maven plugin which fixes Scala dependencies incompatible with Java 9+

scala-suffix Maven Plugin A Maven plugin which fixes Scala dependencies incompatible with Java 9+. A bit of context First of all, you need this plugin

Jan 5, 2022

AspectJ Maven Plugin

AspectJ Maven Plugin Overview This plugin weaves AspectJ aspects into your classes using the AspectJ compiler ajc. Typically, aspects are used in one

Dec 9, 2022

Este é um projeto Maven que contém vários métodos e classes criados, além de vários testes unitários. Os métodos desse projeto não contém uma implementação de fato, sendo assim você desenvolvedor(a) deverá escreve-lo.

Complete o código em Java O projeto tem como objetivo auxiliar aqueles que estão iniciando sua jornada em programação, mais precisamente, em Java. Est

Nov 3, 2022

Spring Kurulumundan Başlayarak, Spring IOC ve Dependency Injection, Hibernate, Maven ve Spring Boot Konularına Giriş Yapıyoruz.

Spring Kurulumundan Başlayarak, Spring IOC ve Dependency Injection, Hibernate, Maven ve Spring Boot Konularına Giriş Yapıyoruz.

Spring Tutorial for Beginners File Directory Apache Tomcat Apache Tomcat - Eclipse Bağlantısı Spring Paketlerinin İndirilmesi ve Projeye Entegrasyonu

Apr 11, 2022

The shortest possible maven template / quickstarter for Java 16

The shortest possible Java 16 maven quickstarter The shortest possible Apache Maven template for Java 16 usage git clone https://github.com/AdamBien/j

Nov 8, 2021

A maven plugin to include features from jmeter-plugins.org for JMeterPluginsCMD Command Line Tool to create graphs, export csv files from jmeter result files and Filter Result tool.

A maven plugin to include features from jmeter-plugins.org for JMeterPluginsCMD Command Line Tool to create graphs, export csv files from jmeter result files and Filter Result tool.

jmeter-graph-tool-maven-plugin A maven plugin to create graphs using the JMeter Plugins CMDRunner from JMeter result files (*.jtl or *.csv) or using F

Nov 3, 2022

Apache Maven artifacts for bootstrapping new open-source projects

OSS Quickstart Apache Maven archetypes for bootstrapping new open-source projects. Think Maven Quickstart Archetype and friends, but more modern, comp

Dec 31, 2022

A base repo for creating RPC microservices in Java with gRPC, jOOQ, and Maven.

Wenower Core OSX local installation Install Protocol Buffer $ brew install protobuf Install Postgresql and joopc database and user $ brew install pos

Jan 9, 2022

This is simple project to show how to create a basic API using Java 11 + Maven + Spring Boot + PostgrSQL + Flyway.

This is simple project to show how to create a basic API using Java 11 + Maven + Spring Boot + PostgrSQL + Flyway.

Dec 10, 2022

A Spigot latest maven starter template.

NAME One sentence to describe your plugin. Introduction Describe your plugin clearly. Features Feature 1 Dependencies Commands /command Command functi

Jul 1, 2022
Owner
Project-Hephaestus
Focus on automation of software architecture, such as microservice scaffolding, automatic installation scripts, etc.
Project-Hephaestus
A Maven plugin which fixes Scala dependencies incompatible with Java 9+

scala-suffix Maven Plugin A Maven plugin which fixes Scala dependencies incompatible with Java 9+. A bit of context First of all, you need this plugin

Maciej Gorywoda 7 Jan 5, 2022
This project archetype is a template for creating a fully functional MVC web application using Hibernate, JSTL and Bootstrap

This project archetype is a template for creating a fully functional MVC web application using Hibernate, JSTL and Bootstrap. It has an automatic database creation, auto initial load of the data, with different variety of users. It also has a checkstyle to check the proper coding of your project immediately right after you enter the code.

null 90 Oct 21, 2022
Composable event handlers and skin scaffolding for JavaFX controls.

This project is no longer being maintained. See this issue for more details. WellBehavedFX This project provides a better mechanism for defining and o

null 52 Oct 9, 2022
Spring-Boot-Plus is a easy-to-use, high-speed, high-efficient,feature-rich, open source spring boot scaffolding

Everyone can develop projects independently, quickly and efficiently! What is spring-boot-plus? A easy-to-use, high-speed, high-efficient, feature-ric

geekidea 2.3k Dec 31, 2022
Kameleon - project scaffolding for Apache Camel

Kameleon - project scaffolding for Apache Camel This is a project generator for Apache Camel. It generates maven-based Java project with preconfigured

The Apache Software Foundation 31 Dec 14, 2022
Scaffolding is a library for Minestom that allows you to load and place schematics.

This library is very early in development and has too many bugs to count. For your own safety, you should not use it in a production environment.

Crystal Games 18 Nov 29, 2022
Paper-nms-maven-plugin - A maven plugin for using NMS on paper with Mojang mappings.

paper-nms-maven-plugin A maven plugin for using NMS on paper with Mojang mappings. This plugin will both create the mapped paper dependency and instal

null 56 Dec 28, 2022
:package: Gradle/Maven plugin to package Java applications as native Windows, Mac OS X, or GNU/Linux executables and create installers for them.

JavaPackager JavaPackager is a hybrid plugin for Maven and Gradle which provides an easy way to package Java applications in native Windows, Mac OS X

Francisco Vargas Ruiz 665 Jan 8, 2023
maven plugin for making chmod +x jar files

To use it, add a plugin to your pom like <!-- You need to build an exectuable uberjar, I like Shade for that --> <plugin> <groupId>org.apache.mave

Brian McCallister 113 Dec 8, 2022
Launch4j Maven Plugin

Launch4j Maven Plugin

Lukasz Lenart 301 Dec 29, 2022