Skip to content

donhac/optimus-archetype-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

a maven archetype for optimus service.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published