warSourceExcludes和packagingExcludes参数的区别

本文解析了Maven war-plugin中的warSourceExcludes和packagingExcludes参数的区别。warSourceExcludes用于在复制src/main/webapp目录时排除特定文件;而packagingExcludes则在最终打包时排除指定文件。

本文转自http://www.kafeitu.me/2010/11/03/maven-war-plugin-parameters-diff.html

maven-war-plugin插件的warSourceExcludes和packagingExcludes参数的区别

项目中在打包的时候时常要忽略一些只在本地使用的文件,比如一些test文件夹或者本地配置,刚刚开始使用maven-war-plugin的warSourceExcludes和packagingExcludes这两个参数还真是搞得有点晕,多试验了几次明白了,现在分享一下我的理解。
引用官网的说明:

warSourceExcludes   String  -   The comma separated list of tokens to exclude when?copying the content?of the warSourceDirectory.
packagingExcludes   String  2.1-alpha-2 The comma separated list of tokens to?exclude from the WAR before packaging. This option may be used to implement?the skinny?WAR use case.

引用我负责的一个项目对maven-war-plugin的配置:

<packagingExcludes>**/application*.properties,**/spy.properties</packagingExcludes> <warSourceExcludes>test/*,venue/**</warSourceExcludes>
声明:packagingExcludes中的*.properties文件均位于src/main/resources目录中 warSourceExcludes中的?test/*,venue/**位于src/main/webapp目录中

运行mvn package命令后结果是:
target/mywebapp-1.0.4 (文件夹)下面原码中存在的test和venue目录没有复制过来(warSourceExcludes忽略成功),其他的文件和目录没有变化

对于packagingExcludes的配置意思是从mywebapp-1.0.4文件夹中复制文件时忽略的文件列表,所以最后打包的war里面不包含test、venue文件夹和packagingExcludes中指定的文件
简单一句话说明:

warSourceExcludes是在编译周期进行完成后从src/main/webapp目录复制文件时忽略,而packagingExcludes是在复制webapp目录完成后打包时忽略target/mywebapp-1.0.4 文件夹的文件

说明:
这里使用了warSourceExcludes和packagingExcludes两个参数为的就是演示一下含义,比如在打包产品的时候完全可以使用warSourceExcludes这一个参数来忽略文件,这样就可以省略packagingExcludes这个参数了

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.5.7</version> <relativePath/> </parent> <groupId>com.hkbn.ae</groupId> <artifactId>ae</artifactId> <version>2.7.2</version> <packaging>war</packaging> <name>ae</name> <description>ae</description> <properties> <java.version>17</java.version> <skipTests>true</skipTests> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <spring-boot.repackage.skip>false</spring-boot.repackage.skip> <!-- Dependency versions --> <org.mapstruct.version>1.5.5.Final</org.mapstruct.version> <lombok.version>1.18.24</lombok.version> <ojdbc11.version>23.4.0.24.05</ojdbc11.version> <httpclient5.version>5.4.1</httpclient5.version> <mybatis-plus.version>3.5.12</mybatis-plus.version> <dynamic-datasource.version>4.1.3</dynamic-datasource.version> <plexus-utils.version>3.4.2</plexus-utils.version> <jdependency.version>2.10</jdependency.version> <plexus-archiver.version>4.8.0</plexus-archiver.version> <lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> <exclusion> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> <exclusion> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc11</artifactId> <version>${ojdbc11.version}</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-client</artifactId> </dependency> <!-- mybatis-plus --> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-spring-boot3-starter</artifactId> <version>${mybatis-plus.version}</version> </dependency> <!-- mybatis-plus 动态数据源 --> <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot3-starter</artifactId> <version>${dynamic-datasource.version}</version> </dependency> <!-- 验证依赖:Spring Boot 3.x 需要显式添加 spring-boot-starter-validation 依赖 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-validation</artifactId> <exclusions> <exclusion> <groupId>org.hibernate</groupId> <artifactId>hibernate-core</artifactId> </exclusion> <exclusion> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </exclusion> </exclusions> </dependency> <!--SQL Server drive--> <dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssql-jdbc</artifactId> <version>13.2.1.jre11</version> <scope>runtime</scope> </dependency> </dependencies> <profiles> <profile> <id>dev</id> <properties> <profile-id>dev</profile-id> <spring.profiles.active>dev</spring.profiles.active> </properties> </profile> <profile> <id>prod</id> <properties> <profile-id>prod</profile-id> <spring.profiles.active>prod</spring.profiles.active> </properties> </profile> <profile> <id>uat</id> <properties> <profile-id>uat</profile-id> <spring.profiles.active>uat</spring.profiles.active> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> </profiles> <build> <finalName>ae</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <annotationProcessorPaths> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> </path> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok-mapstruct-binding</artifactId> <version>${lombok-mapstruct-binding.version}</version> </path> <path> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${org.mapstruct.version}</version> </path> </annotationProcessorPaths> <compilerArgs> <compilerArg> -Amapstruct.unmappedTargetPolicy=ERROR </compilerArg> <compilerArg> -Amapstruct.nullValueIterableMappingStrategy=RETURN_DEFAULT </compilerArg> </compilerArgs> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>3.5.7</version> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> <version>${plexus-utils.version}</version> </dependency> <dependency> <groupId>org.vafer</groupId> <artifactId>jdependency</artifactId> <version>${jdependency.version}</version> </dependency> </dependencies> <executions> <execution> <id>build-info</id> <goals> <goal>build-info</goal> </goals> </execution> </executions> <configuration> <excludes> <exclude> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </exclude> <exclude> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </exclude> </excludes> </configuration> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets> <fileset> <directory>${basedir}</directory> <includes> <include>**/resources/static/**</include> </includes> <followSymlinks>false</followSymlinks> </fileset> </filesets> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>${project.build.sourceEncoding}</encoding> </configuration> <executions> <execution> <id>copy-resources</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/src/main/resources/static</outputDirectory> <resources> <resource> <directory>../eform-fe/dist/eform-fe</directory> <filtering>false</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> <version>${plexus-archiver.version}</version> </dependency> </dependencies> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> </archive> <warSourceExcludes> META-INF/context.xml </warSourceExcludes> <packagingExcludes> WEB-INF/lib/hibernate-core-*.jar, WEB-INF/lib/byte-buddy-*.jar, WEB-INF/lib/commons-lang3-*.jar, %regex[WEB-INF/classes/application-(?:(?!${profile-id}).)*.properties], WEB-INF/classes/keystore/ </packagingExcludes> </configuration> </plugin> </plugins> </build> </project> 报错:[INFO] --- spring-boot:3.5.7:build-info (build-info) @ ae --- Downloading from Virtual-ESIT-Marven-Repo: http://192.168.236.139:8081/artifactory/Virtual-ESIT-Marven-Repo/org/apache/commons/commons-lang3/3.16.0/commons-lang3-3.16.0.jar [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.595 s [INFO] Finished at: 2025-11-28T15:31:00+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:3.5.7:build-info (build-info) on project ae: Execution build-info of goal org.springframework.boot:spring-boot-maven-plugin:3.5.7:build-info failed: Plugin org.springframework.boot:spring-boot-maven-plugin:3.5.7 or one of its dependencies could not be resolved: [ERROR] Could not transfer artifact org.apache.commons:commons-lang3:jar:3.16.0 from/to Virtual-ESIT-Marven-Repo (http://192.168.236.139:8081/artifactory/Virtual-ESIT-Marven-Repo): status code: 403, reason phrase: (403) [ERROR] [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException 如何全局排除org.apache.commons:commons-lang3
最新发布
11-29
### DB config # 动态数据源配置 # 设置默认的数据源 注意:primary属性指定了默认数据源,当没有明确指定数据源时,会使用这个默认数据源。 spring.datasource.dynamic.primary=master # 严格匹配数据源,未匹配到时使用默认数据源 spring.datasource.dynamic.strict=false # 主数据源配置 spring.datasource.dynamic.datasource.master.url=jdbc:oracle:thin:@//x08ddb02-vip.hkbn.com.hk:1526/ESIDDUAT spring.datasource.dynamic.datasource.master.username=fe_esone_user spring.datasource.dynamic.datasource.master.password=mpw:ZqHPBogWNSPTcHt11AdheATSlNujcH6bhhlEsbQyrQg= spring.datasource.dynamic.datasource.master.driver-class-name=oracle.jdbc.OracleDriver #spring.datasource.url=jdbc:oracle:thin:@//x08ddb02-vip.hkbn.com.hk:1526/ESIDDUAT #spring.datasource.username=fe_esone_user #spring.datasource.password=mpw:ZqHPBogWNSPTcHt11AdheATSlNujcH6bhhlEsbQyrQg= #spring.datasource.driver-class-name=oracle.jdbc.OracleDriver # 基础据源配置 #spring.datasource.dynamic.datasource.slave.url=jdbc:oracle:thin:@//x08ddb02-vip.hkbn.com.hk:1525/ESBNUAT #spring.datasource.dynamic.datasource.slave.username=FE_ESONE_USER #spring.datasource.dynamic.datasource.slave.password=mpw:/KYxwRh4EAYZfDqC5eVaeA== #spring.datasource.dynamic.datasource.slave.driver-class-name=oracle.jdbc.OracleDriver server.servlet.session.cookie.same-site=none ### SSL config server.ssl.key-store-type=PKCS12 # The path to the keystore containing the certificate server.ssl.key-store=classpath:keystore/selfsignsfdc.p12 # The password used to generate the certificate server.ssl.key-store-password=sfdcetl # The alias mapped to the certificate server.ssl.key-alias=sfdcEtl # server.ssl.enabled=false server.port=10001 server.ssl.protocol=TLS server.ssl.enabled-protocols=TLSv1.2 ### Development config embedded.tomcat.enabled=true dummy.login.enabled=false dummy.login.user.email=ben.kam@hkbn.com.hk # 开发时给默认值 test-dummy-token-123 dummy.login.token=test-dummy-token-123 logging.level.org.springframework.web.client.RestTemplate=DEBUG logging.config= # mybatis-plus Configure mapper file path mybatis-plus.mapper-locations=classpath:/mapper/*.xml mybatis-plus.type-aliases-package=com.hkbn.esidd.offer.**.entity # Print SQL log mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl logging.level.com.dormitory.dormitory_backend.mapper=DEBUG mybatis-plus.configuration.map-underscore-to-camel-case=true mybatis-plus.configuration.cache-enabled=false <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>3.4.1</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.hkbn.essr</groupId> <artifactId>esidd-offer</artifactId> <version>2.7.2</version> <packaging>war</packaging> <name>esidd-offer</name> <description>ESIDD-OFFER</description> <properties> <java.version>17</java.version> <skipTests>true</skipTests> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <spring-boot.repackage.skip>true</spring-boot.repackage.skip> <org.mapstruct.version>1.5.5.Final</org.mapstruct.version> <lombok.version>1.18.24</lombok.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-logging</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-security</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> <dependency> <groupId>com.oracle.database.jdbc</groupId> <artifactId>ojdbc11</artifactId> <version>23.4.0.24.05</version> <scope>runtime</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-configuration-processor</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <scope>provided</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-log4j2</artifactId> </dependency> <dependency> <groupId>org.springframework.security</groupId> <artifactId>spring-security-test</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-oauth2-client</artifactId> </dependency> <dependency> <groupId>com.azure.spring</groupId> <artifactId>spring-cloud-azure-starter-active-directory</artifactId> <version>4.19.0</version> </dependency> <dependency> <groupId>com.auth0</groupId> <artifactId>java-jwt</artifactId> <version>3.3.0</version> </dependency> <dependency> <groupId>com.auth0</groupId> <artifactId>mvc-auth-commons</artifactId> <version>1.11.0</version> </dependency> <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports</artifactId> <version>6.21.4</version> </dependency> <dependency> <groupId>net.sf.jasperreports</groupId> <artifactId>jasperreports-fonts</artifactId> <version>6.21.4</version> </dependency> <dependency> <groupId>org.mapstruct</groupId> <artifactId>mapstruct</artifactId> <version>${org.mapstruct.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>3.12.0</version> </dependency> <dependency> <groupId>org.reflections</groupId> <artifactId>reflections</artifactId> <version>0.10.2</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi</artifactId> <version>5.3.0</version> </dependency> <dependency> <groupId>org.apache.poi</groupId> <artifactId>poi-ooxml</artifactId> <version>5.3.0</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>core</artifactId> <version>3.5.3</version> </dependency> <dependency> <groupId>com.google.zxing</groupId> <artifactId>javase</artifactId> <version>3.5.3</version> </dependency> <dependency> <groupId>org.apache.httpcomponents.client5</groupId> <artifactId>httpclient5</artifactId> <version>5.4.1</version> </dependency> <dependency> <groupId>com.hkbnes.essr</groupId> <artifactId>eform_common</artifactId> <version>1.8.2.RELEASE</version> </dependency> <dependency> <groupId>com.hkbnes.dms</groupId> <artifactId>dms-util</artifactId> <version>1.0</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-jakarta-xmlbind-annotations</artifactId> <version>2.17.1</version> </dependency> <!-- mybatis-plus --> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-spring-boot3-starter</artifactId> <version>3.5.12</version> </dependency> <!-- mybatis-plus 动态数据源 --> <dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> <version>4.3.1</version> </dependency> </dependencies> <profiles> <profile> <id>dev</id> <properties> <profile-id>dev</profile-id> <spring.profiles.active>dev</spring.profiles.active> </properties> </profile> <profile> <id>prod</id> <properties> <profile-id>prod</profile-id> <spring.profiles.active>prod</spring.profiles.active> </properties> <activation> <activeByDefault>true</activeByDefault> </activation> </profile> </profiles> <build> <finalName>eform</finalName> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.8.1</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> <annotationProcessorPaths> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>${lombok.version}</version> </path> <path> <groupId>org.projectlombok</groupId> <artifactId>lombok-mapstruct-binding</artifactId> <version>0.2.0</version> </path> <path> <groupId>org.mapstruct</groupId> <artifactId>mapstruct-processor</artifactId> <version>${org.mapstruct.version}</version> </path> </annotationProcessorPaths> <compilerArgs> <compilerArg> -Amapstruct.unmappedTargetPolicy=ERROR </compilerArg> <compilerArg> -Amapstruct.nullValueIterableMappingStrategy=RETURN_DEFAULT </compilerArg> </compilerArgs> </configuration> </plugin> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> <version>3.4.2</version> </dependency> <dependency> <groupId>org.vafer</groupId> <artifactId>jdependency</artifactId> <version>2.10</version> </dependency> </dependencies> <executions> <execution> <id>build-info</id> <goals> <goal>build-info</goal> </goals> </execution> </executions> <configuration> <excludes> <exclude> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> </exclude> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> </exclusion> </excludes> </configuration> </plugin> <plugin> <artifactId>maven-clean-plugin</artifactId> <configuration> <filesets> <fileset> <directory>${basedir}</directory> <includes> <include>**/resources/static/**</include> </includes> <followSymlinks>false</followSymlinks> </fileset> </filesets> </configuration> </plugin> <!--<plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>3.0.0</version> <executions> <execution> <id>run-npm-install</id> <phase>generate-sources</phase> <goals> <goal>exec</goal> </goals> <configuration> <workingDirectory>../eform-fe</workingDirectory> <executable>npm</executable> <arguments> <argument>install</argument> </arguments> </configuration> </execution> <execution> <id>exec npm build</id> <phase>generate-sources</phase> <configuration> <workingDirectory>../eform-fe</workingDirectory> <executable>npm</executable> <arguments> <argument>run</argument> <argument>build:${profile-id}</argument> </arguments> </configuration> <goals> <goal>exec</goal> </goals> </execution> </executions> </plugin>--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <configuration> <encoding>${project.build.sourceEncoding}</encoding> </configuration> <executions> <execution> <id>copy-resources</id> <phase>generate-resources</phase> <goals> <goal>copy-resources</goal> </goals> <configuration> <outputDirectory>${basedir}/src/main/resources/static</outputDirectory> <resources> <resource> <directory>../eform-fe/dist/eform-fe</directory> <filtering>false</filtering> </resource> </resources> </configuration> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <dependencies> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-archiver</artifactId> <version>4.8.0</version> </dependency> </dependencies> <configuration> <archive> <manifest> <addClasspath>true</addClasspath> </manifest> <!-- <manifestEntries> <Implementation-Build-Date>${fixitBuildNumberDateVariable}</Implementation-Build-Date> <Implementation-Build-Version>${buildNumber}</Implementation-Build-Version> </manifestEntries> --> </archive> <warSourceExcludes> META-INF/context.xml </warSourceExcludes> <packagingExcludes> %regex[WEB-INF/classes/application-(?:(?!${profile-id}).)*.properties], WEB-INF/classes/keystore/ </packagingExcludes> <!-- <failOnMissingWebXml>false</failOnMissingWebXml> --> </configuration> </plugin> </plugins> </build> </project> 配置Mybatis-Plus 多数据源 报错:Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (the profiles dev are currently active). Disconnected from the target VM, address: '127.0.0.1:60791', transport: 'socket' Process finished with exit code 0
07-25
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值