Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
5ad045d0
Commit
5ad045d0
authored
Sep 09, 2020
by
luoxj
Browse files
打包配置
parent
13f740b9
Changes
4
Show whitespace changes
Inline
Side-by-side
assembly/assembly.xml
0 → 100644
View file @
5ad045d0
<assembly>
<id>
bin
</id>
<formats>
<format>
zip
</format>
<format>
tar.gz
</format>
</formats>
<fileSets>
<!-- 从目标目录拷贝文件去压缩 -->
<fileSet>
<directory>
target
</directory>
<includes>
<include>
*.jar
</include>
</includes>
<outputDirectory>
./
</outputDirectory>
</fileSet>
<fileSet>
<directory>
target/lib
</directory>
<outputDirectory>
./lib
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/resources
</directory>
<outputDirectory>
./config
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/webapp/static
</directory>
<outputDirectory>
./static
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/webapp/html
</directory>
<outputDirectory>
./html
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/webapp/templets
</directory>
<outputDirectory>
./templets
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/webapp/upload
</directory>
<outputDirectory>
./upload
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/webapp/WEB-INF
</directory>
<outputDirectory>
./lib/WEB-INF
</outputDirectory>
</fileSet>
<fileSet>
<directory>
./bin
</directory>
<includes>
<include>
*.sh
</include>
<include>
*.cmd
</include>
<include>
*.bat
</include>
</includes>
<outputDirectory>
./
</outputDirectory>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
bin/start.bat
0 → 100644
View file @
5ad045d0
@echo
off
start
javaw
-XX
:MetaspaceSize
=
128
m
-XX
:MaxMetaspaceSize
=
128
m
-Xms
1024
m
-Xmx
1024
m
-Xmn
256
m
-Xss
256
k
-XX
:SurvivorRatio
=
8
-XX
:
+UseConcMarkSweepGC
^
-Dloader
.path
=
lib
,
config
^
-jar -Dfile
.encoding
=
utf
-
8
-Duser
.timezone
=
GMT
+
08
-Duser
.language
=
zh
-Duser
.region
=
CN
./ms
-mcms
.jar
:: > boot.log 2>&1
exit
\ No newline at end of file
bin/stop.bat
0 → 100644
View file @
5ad045d0
@echo
off
taskkill
-f -t -im
javaw
.exe
exit
\ No newline at end of file
pom.xml
View file @
5ad045d0
...
...
@@ -41,6 +41,68 @@
<target>
${java.version}
</target>
</configuration>
</plugin>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
<configuration>
<layout>
ZIP
</layout>
<!-- 重写包含依赖,包含不存在的依赖,jar里没有pom里的依赖 -->
<includes>
<include>
<groupId>
non-exists
</groupId>
<artifactId>
non-exists
</artifactId>
</include>
</includes>
<fork>
true
</fork>
</configuration>
</plugin>
<!--拷贝第三方依赖文件到指定目录-->
<plugin>
<artifactId>
maven-dependency-plugin
</artifactId>
<executions>
<execution>
<id>
copy-dependencies
</id>
<phase>
package
</phase>
<goals>
<goal>
copy-dependencies
</goal>
</goals>
<configuration>
<!--target/lib是依赖jar包的输出目录,根据自己喜好配置-->
<outputDirectory>
${project.build.directory}/lib
</outputDirectory>
<excludeTransitive>
false
</excludeTransitive>
<stripVersion>
false
</stripVersion>
<includeScope>
runtime
</includeScope>
</configuration>
</execution>
</executions>
</plugin>
<!-- 自定义打zip包 -->
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-assembly-plugin
</artifactId>
<version>
3.1.0
</version>
<configuration>
<descriptors>
<descriptor>
./assembly/assembly.xml
</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>
make-assembly
</id>
<phase>
package
</phase>
<goals>
<goal>
single
</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
...
...
@@ -50,14 +112,14 @@
<exclude>
html/**
</exclude>
<exclude>
upload/**
</exclude>
<exclude>
templets/**
</exclude>
<!-- 管理页面WEB-INF/manger单独配置在jar外面,修改部分ftl避免重新jar打包 -->
<!--<exclude>WEB-INF/</exclude>-->
</excludes>
</resource>
<resource>
<directory>
src/main/java
</directory>
<excludes>
<exclude>
**/*.java
</exclude>
<exclude>
**/MSApplication.class
</exclude>
<exclude>
**/MSServletInitializer.class
</exclude>
</excludes>
</resource>
</resources>
...
...
Write
Preview
Supports
Markdown
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