我想在我的项目中过滤两个jsp
header_connect.jsp:
...
<bean:message key="version"/> <bean:message key="${numeroVersion}"/>
...
我的属性文件取决于当前的配置文件 示例filter-dev.properties:
mode=- Developpements
numeroVersion=numero.version.livraison.dev
我的pom.xml:
<!-- Profiles -->
<properties>
<jspFolder>src/main/webapp/WEB-INF/jsp/generic/tiles/</jspFolder>
</properties>
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<profileVersion>DEV</profileVersion>
<webXmlfolder>dev</webXmlfolder>
<mode>- Developpements</mode>
<filterFile>src/main/filters/filter-dev.properties</filterFile>
<configFolder>src/main/config/dev/</configFolder>
</properties>
</profile>
...
</profiles>
<!-- FIN Profiles -->
<build>
<finalName>${applicationShortname}_${majorVersion}_${minorVersion}_${profileVersion}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<filters>
<filter>src/main/filters/filter.properties</filter>
<filter>${filterFile}</filter>
</filters>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
<webResources>
...
<resource>
<directory>${jspFolder}</directory>
<includes>
<include>header_connected.jsp</include>
<include>template_blank.jsp</include>
</includes>
<targetPath>/WEB-INF/jsp/generic/tiles/</targetPath>
<filtering>true</filtering>
</resource>
</webResources>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
...
</plugin>
当我执行此操作时,jsp
未过滤