开发者

How to exclude file from filtering when overlay is processing?

开发者 https://www.devze.com 2022-12-20 09:35 出处:网络
I would not want to filter some files in overlays, when building a war file. For example how I can exclude from filtering all jsp files from overlay module2?

I would not want to filter some files in overlays, when building a war file. For example how I can exclude from filtering all jsp files from overlay module2?

            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <version>2.1-beta-2-SNAPSHOT</version>
            <configuration>
                <archiveClasses>true</archiveClasses>
                <filters>
                    <filter>src/main/filters/config.properties</filter>
                </filters>

                <overlays>
                    <overlay>
                        <groupId>com.company</groupId>
                        <artifactId>module1&开发者_StackOverflowlt;/artifactId>
                        <filtered>true</filtered>
                    </overlay>
                    <overlay>
                        <groupId>com.company</groupId>
                        <artifactId>module2</artifactId>
                        <filtered>true</filtered>
                    </overlay>
                    <overlay>
                        <groupId>com.company</groupId>
                        <artifactId>module3</artifactId>
                        <filtered>true</filtered>
                    </overlay>
                </overlays>
            </configuration>


You could "cheat" and declare jsp as an extensions that will not be filtered.

    ...
    <configuration>
      <archiveClasses>true</archiveClasses>
      <filters>
        <filter>src/main/filters/config.properties</filter>
      </filters>
      <nonFilteredFileExtensions>
        <!-- default value contains jpg,jpeg,gif,bmp,png -->
        <nonFilteredFileExtension>jsp</nonFilteredFileExtension>
      </nonFilteredFileExtensions>
      ...
    </configuration>

But this is a global settings, i.e. it will affect all overlays, I don't know how you could exclude only of them.

0

精彩评论

暂无评论...
验证码 换一张
取 消