Skip to content

Commit 546965d

Browse files
committed
combine build process
1 parent 2bfd7ef commit 546965d

File tree

3 files changed

+187
-3
lines changed

3 files changed

+187
-3
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,7 @@
2626

2727
### Application specific ###
2828
application-dev.properties
29+
src/main/resources/static/css/
30+
src/main/resources/static/favicon.ico
31+
src/main/resources/static/js/
32+
src/main/resources/templates/index.html

front-end/vue.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
devServer: {
3+
port: 3000
4+
}
5+
}

pom.xml

Lines changed: 178 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55

66
<groupId>com.taskagile</groupId>
@@ -15,7 +15,8 @@
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
1717
<version>2.0.4.RELEASE</version>
18-
<relativePath/> <!-- lookup parent from repository -->
18+
<relativePath/>
19+
<!-- lookup parent from repository -->
1920
</parent>
2021

2122
<properties>
@@ -55,10 +56,184 @@
5556
</dependencies>
5657

5758
<build>
58-
<plugins>
59+
<plugins>
5960
<plugin>
6061
<groupId>org.springframework.boot</groupId>
6162
<artifactId>spring-boot-maven-plugin</artifactId>
63+
<executions>
64+
<execution>
65+
<id>pre integration test</id>
66+
<goals>
67+
<goal>start</goal>
68+
</goals>
69+
</execution>
70+
<execution>
71+
<id>post integration test</id>
72+
<goals>
73+
<goal>stop</goal>
74+
</goals>
75+
</execution>
76+
</executions>
77+
</plugin>
78+
<plugin>
79+
<groupId>org.codehaus.mojo</groupId>
80+
<artifactId>exec-maven-plugin</artifactId>
81+
<version>1.6.0</version>
82+
<executions>
83+
<execution>
84+
<id>font-end install</id>
85+
<goals>
86+
<goal>exec</goal>
87+
</goals>
88+
<phase>prepare-package</phase>
89+
<configuration>
90+
<executable>npm</executable>
91+
<arguments>
92+
<argument>install</argument>
93+
</arguments>
94+
</configuration>
95+
</execution>
96+
<execution>
97+
<id>font-end unit test</id>
98+
<goals>
99+
<goal>exec</goal>
100+
</goals>
101+
<phase>prepare-package</phase>
102+
<configuration>
103+
<executable>npm</executable>
104+
<arguments>
105+
<argument>run</argument>
106+
<argument>test:unit</argument>
107+
</arguments>
108+
</configuration>
109+
</execution>
110+
<execution>
111+
<id>font-end build package</id>
112+
<goals>
113+
<goal>exec</goal>
114+
</goals>
115+
<phase>prepare-package</phase>
116+
<configuration>
117+
<executable>npm</executable>
118+
<arguments>
119+
<argument>run</argument>
120+
<argument>build</argument>
121+
</arguments>
122+
</configuration>
123+
</execution>
124+
<execution>
125+
<id>front-end e2e test</id>
126+
<goals>
127+
<goal>exec</goal>
128+
</goals>
129+
<phase>integration-test</phase>
130+
<configuration>
131+
<executable>npm</executable>
132+
<arguments>
133+
<argument>run</argument>
134+
<argument>test:e2e</argument>
135+
</arguments>
136+
</configuration>
137+
</execution>
138+
</executions>
139+
<configuration>
140+
<workingDirectory>${basedir}/front-end</workingDirectory>
141+
</configuration>
142+
</plugin>
143+
<plugin>
144+
<artifactId>maven-resources-plugin</artifactId>
145+
<version>3.1.0</version>
146+
<executions>
147+
<execution>
148+
<id>copy front-end template</id>
149+
<goals>
150+
<goal>copy-resources</goal>
151+
</goals>
152+
<phase>prepare-package</phase>
153+
<configuration>
154+
<outputDirectory>${basedir}/src/main/resources/templates</outputDirectory>
155+
<resources>
156+
<resource>
157+
<directory>front-end/dist</directory>
158+
<includes>
159+
<include>index.html</include>
160+
</includes>
161+
</resource>
162+
</resources>
163+
</configuration>
164+
</execution>
165+
<execution>
166+
<id>copy front-end assets</id>
167+
<goals>
168+
<goal>copy-resources</goal>
169+
</goals>
170+
<phase>prepare-package</phase>
171+
<configuration>
172+
<outputDirectory>${basedir}/src/main/resources/static</outputDirectory>
173+
<resources>
174+
<resource>
175+
<directory>front-end/dist</directory>
176+
<excludes>
177+
<exclude>index.html</exclude>
178+
</excludes>
179+
</resource>
180+
</resources>
181+
</configuration>
182+
</execution>
183+
<execution>
184+
<id>copy front-end template to target</id>
185+
<goals>
186+
<goal>copy-resources</goal>
187+
</goals>
188+
<phase>prepare-package</phase>
189+
<configuration>
190+
<outputDirectory>${basedir}/target/classes/templates</outputDirectory>
191+
<resources>
192+
<resource>
193+
<directory>front-end/dist</directory>
194+
<includes>
195+
<include>index.html</include>
196+
</includes>
197+
</resource>
198+
</resources>
199+
</configuration>
200+
</execution>
201+
<execution>
202+
<id>copy front-end assets to target</id>
203+
<goals>
204+
<goal>copy-resources</goal>
205+
</goals>
206+
<phase>prepare-package</phase>
207+
<configuration>
208+
<outputDirectory>${basedir}/target/classes/static</outputDirectory>
209+
<resources>
210+
<resource>
211+
<directory>front-end/dist</directory>
212+
<excludes>
213+
<exclude>index.html</exclude>
214+
</excludes>
215+
</resource>
216+
</resources>
217+
</configuration>
218+
</execution>
219+
</executions>
220+
</plugin>
221+
<plugin>
222+
<artifactId>maven-clean-plugin</artifactId>
223+
<version>3.1.0</version>
224+
<configuration>
225+
<filesets>
226+
<fileset>
227+
<directory>${basedir}/src/main/resources/static/static</directory>
228+
</fileset>
229+
<fileset>
230+
<directory>${basedir}/src/main/resources/templates</directory>
231+
<includes>
232+
<include>index.html</include>
233+
</includes>
234+
</fileset>
235+
</filesets>
236+
</configuration>
62237
</plugin>
63238
</plugins>
64239
</build>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy