Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,10 @@ Detailed tutorials are available here!

## Build/Run

First, for `api-gateway` and `monitor-dashboard` component, you have to enter the `src/main/resources/webroot` directory and install the frontend dependencies with **bower**:
Build the code using maven:

```
bower install
```

Then build the code:

```
mvn clean install -Dmaven.test.skip=true
mvn clean install -P front -Dmaven.test.skip=true
```

To run the microservice with Docker Compose, please refer to the [running instruction](http://www.sczyh30.com/vertx-blueprint-microservice/index.html#show-time-).
Expand Down
3 changes: 3 additions & 0 deletions api-gateway/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "src/main/resources/webroot/assets/lib"
}
2 changes: 1 addition & 1 deletion api-gateway/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ In current version, the SPA frontend is also integrated in the API gateway.

## Build

mvn clean install
mvn clean install -P front

File renamed without changes.
14 changes: 14 additions & 0 deletions api-gateway/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,18 @@
</plugins>
</build>

<profiles>
<profile>
<id>front</id>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
3 changes: 0 additions & 3 deletions api-gateway/src/main/resources/webroot/.bowerrc

This file was deleted.

9 changes: 2 additions & 7 deletions docs/en/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -1746,16 +1746,11 @@ And for Docker Machine users, memory might be an issue as well. If applications

## Build the code and containers

Before we build the code, we have to install the frontend dependencies with **bower** for `api-gateway` and `monitor-dashboard` component. Enter to each `src/main/resources/webroot` directory and execute:

```
bower install
```

Then we can build the code:
Build the code using maven:

```
mvn clean install -Dmaven.test.skip=true
mvn clean install -P front -Dmaven.test.skip=true
```

After that, we build all Docker containers:
Expand Down
8 changes: 1 addition & 7 deletions docs/zh-cn/tutorial.zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -1648,16 +1648,10 @@ sudo sysctl -w vm.max_map_count=262144

## 构建项目以及容器

在我们构建整个项目之前,我们需要先通过 **bower** 获取`api-gateway`和`monitor-dashboard`这两个组件中前端代码对应的依赖。它们的`bower.json`文件都在对应的`src/main/resources/webroot`目录中。我们分别进入这两个目录并执行:

```
bower install
```

然后我们就可以构建整个项目了:

```
mvn clean install -Dmaven.test.skip=true
mvn clean install -P front -Dmaven.test.skip=true
```

构建完项目以后,我们再来构建容器(需要root权限):
Expand Down
3 changes: 3 additions & 0 deletions monitor-dashboard/.bowerrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"directory": "src/main/resources/webroot/assets/lib"
}
7 changes: 2 additions & 5 deletions monitor-dashboard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ This component provides a monitor dashboard web UI to inspect the status of the

## Build

First enter the `src/main/resources/webroot` directory
and execute `bower install` command to prepare frontend resources.
build the code using maven:

Then build the code:

mvn clean install
mvn clean install -P front
13 changes: 13 additions & 0 deletions monitor-dashboard/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,18 @@
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>front</id>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
3 changes: 0 additions & 3 deletions monitor-dashboard/src/main/resources/webroot/.bowerrc

This file was deleted.

35 changes: 35 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,41 @@

<pluginManagement>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>installation de node</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
<configuration>
<nodeVersion>v5.3.0</nodeVersion>
<npmVersion>3.3.12</npmVersion>
</configuration>
</execution>
<execution>
<id>install bower</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>install bower</arguments>
</configuration>
</execution>
<execution>
<id>bower install</id>
<goals>
<goal>bower</goal>
</goals>
<configuration>
<arguments>install</arguments>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
Expand Down