Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hel-developer-guide
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Spencer Chang
hel-developer-guide
Commits
067d4c0c
Commit
067d4c0c
authored
Sep 15, 2017
by
刘鹏程
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update project-create.md
parent
382b3074
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
project-create.md
project-create.md
+10
-9
No files found.
project-create.md
View file @
067d4c0c
...
...
@@ -25,6 +25,7 @@
> eclipse 中 JRE 的配置需要指定 JDK 目录,不能是 JRE。(maven 需要 JDK)
#### Git 安装
1.
在
[
Git 官网
](
https://git-scm.com/download/
)
下载对应平台的 Git。
...
...
@@ -70,7 +71,7 @@
`注意`
maven-archetype-plugin
`2.4`
及以下版本可以正常使用下面命令
```
mvn archetype:generate -D archetypeGroupId=h
el-custom -D archetypeArtifactId=hel-custom-parent-archetype -D archetypeVersion=1.0-RELEASE -D groupId=hel -D artifactId=HelParent -D package=Hel.core -D version=1.0-RELEASE -D archetypeRepository=https://hel.hand-china.com/nexus/content/repositories/Hel
-Releases
mvn archetype:generate -D archetypeGroupId=h
ls-custom -D archetypeArtifactId=hls-custom-parent-archetype -D archetypeVersion=1.0-RELEASE -D groupId=hls -D artifactId=HlsParent -D package=Hls.core -D version=1.0-RELEASE -D archetypeRepository=https://hls.hand-china.com/nexus/content/repositories/Hls
-Releases
```
...
...
@@ -80,12 +81,12 @@ mvn archetype:generate -D archetypeGroupId=hel-custom -D archetypeArtifactId=he
解决方案:
指定使用2.4版本的archetype-plugin插件:
```
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -D archetypeGroupId=h
el-custom -D archetypeArtifactId=hel-custom-parent-archetype -D archetypeVersion=1.0-RELEASE -D groupId=hel -D artifactId=HelParent -D package=Hel.core -D version=1.0-RELEASE -D archetypeRepository=https://hel.hand-china.com/nexus/content/repositories/Hel
-Releases
mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -D archetypeGroupId=h
ls-custom -D archetypeArtifactId=hls-custom-parent-archetype -D archetypeVersion=1.0-RELEASE -D groupId=hls -D artifactId=HlsParent -D package=Hls.core -D version=1.0-RELEASE -D archetypeRepository=https://hls.hand-china.com/nexus/content/repositories/Hls
-Releases
```
> 以下内容所指的 `H
el
Parent` 均指上面命令中的参数 `artifactId` 的值,请按实际情况替换
> 以下内容所指的 `H
ls
Parent` 均指上面命令中的参数 `artifactId` 的值,请按实际情况替换
新的项目目录结构如下:
```
...
...
@@ -96,7 +97,7 @@ mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -D archetypeGr
│ └── src
│ └── main
│ ├── java
│ │ ├── h
el
│ │ ├── h
ls
│ │ │ └── core(前面的包名称)
│ │ │ ├── db(数据表结构,数据初始化入口文件)
│ │ │ │ └── liquibase.groovy
...
...
@@ -115,7 +116,7 @@ mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -D archetypeGr
│ └── src
│ └── main
│ └── java
│ └── h
el
│ └── h
ls
│ └── core
│ └── db
│ ├── data(数据文件)
...
...
@@ -130,7 +131,7 @@ mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -D archetypeGr
> 目前已经测试过支持的数据库有Mysql,Oracle,SqlServer
> 按照[创建数据库](/后端开发/database-init.md)中的步骤创建数据库
> 请修改 `H
elParent/core/src/main/java/hel
/core/db/liquibase.groovy` 以适配不同的数据库
> 请修改 `H
lsParent/core/src/main/java/hls
/core/db/liquibase.groovy` 以适配不同的数据库
### 修改项目配置文件
...
...
@@ -147,11 +148,11 @@ mvn clean install -Dmaven.test.skip=true
在 HlsParent 项目录下执行:
-
MySql
-
`mvn process-resources -D skipLiquibaseRun=false -D db.driver=com.mysql.jdbc.Driver -D db.url="jdbc:mysql://127.0.0.1:3306/h
el_dev?useUnicode=true&characterEncoding=utf8" -Ddb.user=hel_dev -Ddb.password=hel
_dev`
-
`mvn process-resources -D skipLiquibaseRun=false -D db.driver=com.mysql.jdbc.Driver -D db.url="jdbc:mysql://127.0.0.1:3306/h
ls_dev?useUnicode=true&characterEncoding=utf8" -Ddb.user=hls_dev -Ddb.password=hls
_dev`
-
SqlServer
-
`mvn process-resources -D skipLiquibaseRun=false -Ddb.user=h
el_dev -Ddb.password=hel_dev-D db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver -D db.url="jdbc:sqlserver://127.0.0.1:1433; DatabaseName=hel
"`
-
`mvn process-resources -D skipLiquibaseRun=false -Ddb.user=h
ls_dev -Ddb.password=hls_dev-D db.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver -D db.url="jdbc:sqlserver://127.0.0.1:1433; DatabaseName=hls
"`
-
Oracle
-
`mvn process-resources -D skipLiquibaseRun=false -D db.driver=oracle.jdbc.driver.OracleDriver -D db.url=jdbc:oracle:thin:@127.0.0.1:1521:h
el -Ddb.user=hel_dev -Ddb.password=hel
_dev`
-
`mvn process-resources -D skipLiquibaseRun=false -D db.driver=oracle.jdbc.driver.OracleDriver -D db.url=jdbc:oracle:thin:@127.0.0.1:1521:h
ls -Ddb.user=hls_dev -Ddb.password=hls
_dev`
-
以上命令中,需要按实际情况修改 url,user,password
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment