Maven:如何配置native2ascii-maven-plugin [英] Maven: How to configure native2ascii-maven-plugin

查看:419
本文介绍了Maven:如何配置native2ascii-maven-plugin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我向你们提出这个问题,因为项目页面本身并没有很多信息。
基本上我设置了native2ascii-maven-plugin来处理我的一些资源。它适用于处理根目录中的文件。但现在我有子目录下的文件: / template / email / 并希望它们包含在处理中。你能帮我解决一下吗?

Im firing this question at you guys since the project-page itself has not a lot of information. Basicly im setting up the native2ascii-maven-plugin to process some of my resources. It works fine for processing the files in root directory. But now i have files under subdirectory: /template/email/ and would like them to be included in the processing. Can you guys please help me out?

    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>native2ascii-maven-plugin</artifactId>
        <version>1.0-alpha-1</version>
        <configuration>
            <dest>target/resources</dest>
            <src>src/main/resources</src>
        </configuration>
        <executions>
            <execution>
                <id>native2ascii-utf8</id>
                <goals>
                    <goal>native2ascii</goal>
                </goals>
                <configuration>
                    <encoding>UTF8</encoding>
                    <includes>ApplicationResources*.properties, errors.properties, /template/email/newBooking*.ftl</includes>
                </configuration>
            </execution>
        </executions>
    </plugin>

非常感谢!

推荐答案

您需要为要处理的每个文件夹定义一个执行部分,并将src和dest移动到执行部分:

You need to define a execution section for every folder you want to process and move the src and dest to the execution part:

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>native2ascii-maven-plugin</artifactId>
    <version>1.0-alpha-1</version>
    <executions>
        <execution>
            <id>native2ascii-utf8-resources</id>
            <goals>
                <goal>native2ascii</goal>
            </goals>
            <configuration>
                <dest>target/resources</dest>
                <src>src/main/resources</src>
                <encoding>UTF8</encoding>
                <includes>ApplicationResources*.properties, errors.properties, /template/email/newBooking*.ftl</includes>
            </configuration>
        </execution>
        <execution>
            <id>native2ascii-utf8-email</id>
            <goals>
                <goal>native2ascii</goal>
            </goals>
            <configuration>
                <dest>target/resources/email</dest>
                <src>src/main/templates/email</src>
                <encoding>UTF8</encoding>
            </configuration>
        </execution>
    </executions>
</plugin>

这篇关于Maven:如何配置native2ascii-maven-plugin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆