packagingExcludes 和 maven 属性 变量
packagingExcludes and maven property variable
我的文件夹结构如下所示 src/main/webapp/
我有一个maven 属性 ${sencha.env} 可以是开发|测试或生产。我想在制作 WAR 时从 build 目录中排除其他人。我正在尝试以下但它不起作用。请指导-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<directory>src/main/webapp/build/${sencha.env}/BACK</directory>
</resource>
</webResources>
<packagingExcludes>.sencha/**,app/**,ext/**,sass/**,%regex[build/(?!${sencha.env})]</packagingExcludes>
</configuration>
</plugin>
请注意:
%regex[build/(?!${sencha.env})] in packagingExcludes
谢谢!
你们很亲近;你需要 %regex[build/(?!${sencha.env}/).*]
。请注意 .*
,这意味着您要排除 build/(?!${sencha.env}/
.
以下的所有路径
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<directory>src/main/webapp/build/${sencha.env}/BACK</directory>
</resource>
</webResources>
<packagingExcludes>.sencha/**,app/**,ext/**,sass/**,%regex[build/(?!${sencha.env}/).*]</packagingExcludes>
</configuration>
</plugin>
我的文件夹结构如下所示 src/main/webapp/
我有一个maven 属性 ${sencha.env} 可以是开发|测试或生产。我想在制作 WAR 时从 build 目录中排除其他人。我正在尝试以下但它不起作用。请指导-
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<directory>src/main/webapp/build/${sencha.env}/BACK</directory>
</resource>
</webResources>
<packagingExcludes>.sencha/**,app/**,ext/**,sass/**,%regex[build/(?!${sencha.env})]</packagingExcludes>
</configuration>
</plugin>
请注意: %regex[build/(?!${sencha.env})] in packagingExcludes
谢谢!
你们很亲近;你需要 %regex[build/(?!${sencha.env}/).*]
。请注意 .*
,这意味着您要排除 build/(?!${sencha.env}/
.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<webResources>
<resource>
<directory>src/main/webapp/build/${sencha.env}/BACK</directory>
</resource>
</webResources>
<packagingExcludes>.sencha/**,app/**,ext/**,sass/**,%regex[build/(?!${sencha.env}/).*]</packagingExcludes>
</configuration>
</plugin>