optimus-archetype-java

a maven archetype for the microService of java

License

License

Categories

Categories

Java Languages
GroupId

GroupId

com.github.donhac
ArtifactId

ArtifactId

optimus-archetype-java
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

optimus-archetype-java
a maven archetype for the microService of java
Project URL

Project URL

https://github.com/donhac/optimus-archetype-java
Source Code Management

Source Code Management

https://github.com/donhac/optimus-archetype-java.git

Download optimus-archetype-java

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.donhac/optimus-archetype-java/ -->
<dependency>
    <groupId>com.github.donhac</groupId>
    <artifactId>optimus-archetype-java</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.donhac/optimus-archetype-java/
implementation 'com.github.donhac:optimus-archetype-java:1.1.0'
// https://jarcasting.com/artifacts/com.github.donhac/optimus-archetype-java/
implementation ("com.github.donhac:optimus-archetype-java:1.1.0")
'com.github.donhac:optimus-archetype-java:jar:1.1.0'
<dependency org="com.github.donhac" name="optimus-archetype-java" rev="1.1.0">
  <artifact name="optimus-archetype-java" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.donhac', module='optimus-archetype-java', version='1.1.0')
)
libraryDependencies += "com.github.donhac" % "optimus-archetype-java" % "1.1.0"
[com.github.donhac/optimus-archetype-java "1.1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

optimus-archetype-java

a maven archetype for optimus service.

generate project from archetype

使用案例

with interactive mode

mvn archetype:generate                             \
  -DarchetypeGroupId=com.github.donhac             \
  -DarchetypeArtifactId=optimus-archetype-java  \
  -DarchetypeVersion=1.0.0

you will required to input groupId, artifactId for your new project.

without interactive mode

mvn archetype:generate                             \
  -DarchetypeGroupId=com.github.donhac             \
  -DarchetypeArtifactId=optimus-archetype-java  \
  -DarchetypeVersion=1.0.0                         \
  -DgroupId=x.y                                    \
  -DartifactId=a                                   \
  -DarchetypeCatalog=local

this process should be slow, but if you had already run once successfully, to speed up, add this param:

-DarchetypeCatalog=local

Setting up Zookeeper

in src/main/resources/dubbo.properties

modify following line:

dubbo.registry.address=zookeeper://127.0.0.1:2181

Setting up zookeeper in MacOS

brew install zookeeper

then start zookeeper by run:

zkServer start

or using the LaunchRocket GUI.

run

mvn spring-boot:run

deploy service client jar to repository

setup the login and password required to authenticate to this server in ~/.m2/settings.xml file:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                          https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <servers>
    <server>
      <id>moria-snapshots</id>
      <username>username</username>
      <password>password</password>
    </server>
    <server>
      <id>moria-release</id>
      <username>username</username>
      <password>password</password>
    </server>
  </servers>
</settings>

deploy artifact:

mvn deploy

reference

Versions

Version
1.1.0