mirror of
https://github.com/201206030/novel-plus.git
synced 2025-06-24 04:46:37 +00:00
feat(打包改为分包): 打包改为分包
This commit is contained in:
@ -87,14 +87,92 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- </build>-->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<!--打包时去除第三方依赖-->
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<layout>ZIP</layout>
|
||||
<includes>
|
||||
<include>
|
||||
<groupId>non-exists</groupId>
|
||||
<artifactId>non-exists</artifactId>
|
||||
</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<!--拷贝第三方依赖文件到指定目录-->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<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>target/lib</outputDirectory>
|
||||
<excludeTransitive>false</excludeTransitive>
|
||||
<stripVersion>false</stripVersion>
|
||||
<includeScope>runtime</includeScope>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<version>1.8</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<!-- 文件夹 -->
|
||||
<copy todir="${project.build.directory}/build/conf" overwrite="true">
|
||||
<fileset dir="${basedir}/src/main/resources">
|
||||
<include name="**/*.*"/>
|
||||
<exclude name="mybatis/*/*.*"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<move todir="${project.build.directory}/build/lib">
|
||||
<fileset dir="target/lib"/>
|
||||
</move>
|
||||
<copy file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
|
||||
tofile="${project.build.directory}/build/${project.artifactId}.jar" />
|
||||
|
||||
<fixcrlf srcdir="${basedir}/src/main/build/scripts" eol="unix"/>
|
||||
<copy todir="${project.build.directory}/build/bin">
|
||||
<fileset dir="${basedir}/src/main/build/scripts">
|
||||
<include name="*.sh" />
|
||||
<include name="*.txt" />
|
||||
<include name="*.bat" />
|
||||
</fileset>
|
||||
</copy>
|
||||
<zip destfile='${project.build.directory}/build/${project.artifactId}.zip'>
|
||||
<zipfileset filemode="755" dir= '${project.build.directory}/build/' />
|
||||
</zip>
|
||||
</tasks>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
</project>
|
||||
|
Reference in New Issue
Block a user