AppFuse
  1. AppFuse
  2. APF-561

Figure out how to do native2ascii with Maven 2

    Details

      Activity

      Hide
      Matt Raible added a comment -

      The following plugin might be just what the doctor ordered!

      http://mojo.codehaus.org/native2ascii-maven-plugin/index.html

      Show
      Matt Raible added a comment - The following plugin might be just what the doctor ordered! http://mojo.codehaus.org/native2ascii-maven-plugin/index.html
      Show
      Matt Raible added a comment - This plugin doesn't seem to work on OS X: http://www.nabble.com/native2ascii-maven-plugin-is-now-in-mojo%27s-sandbox-tf2944026s177.html#a8232282
      Hide
      Matt Raible added a comment -

      To get native2ascii working in 2.0 M2, perform the following steps:

      1. Disable the GzipFilter's filter-mapping in web.xml (commenting it out is easiest). This is because there's currently a bug in the implementation:

      http://tinyurl.com/37nzhc

      2. Add the following plugin information to your pom.xml:

      <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>native2ascii-maven-plugin</artifactId>
      <version>1.0-beta-1-SNAPSHOT</version>
      <configuration>
      <dest>target/classes</dest>
      <src>src/main/resources</src>
      </configuration>
      <executions>
      <execution>
      <id>native2ascii-utf8</id>
      <goals>
      <goal>native2ascii</goal>
      </goals>
      <configuration>
      <encoding>UTF8</encoding>
      <includes>ApplicationResources_zh*</includes>
      </configuration>
      </execution>
      <execution>
      <id>native2ascii-8859_1</id>
      <goals>
      <goal>native2ascii</goal>
      </goals>
      <configuration>
      <encoding>8859_1</encoding>
      <includes>
      ApplicationResources_de.properties,
      ApplicationResources_fr.properties,
      ApplicationResources_nl.properties,
      ApplicationResources_pt*.properties
      </includes>
      </configuration>
      </execution>
      </executions>
      </plugin>

      3. In your pom.xml, change the following:

      <resources>
      <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
      </resource>
      </resources>

      To:

      <resources>
      <resource>
      <directory>src/main/resources</directory>
      <excludes>
      <exclude>ApplicationResources_zh*.properties</exclude>
      <exclude>ApplicationResources_de.properties</exclude>
      <exclude>ApplicationResources_fr.properties</exclude>
      <exclude>ApplicationResources_nl.properties</exclude>
      <exclude>ApplicationResources_pt*.properties</exclude>
      </excludes>
      <filtering>true</filtering>
      </resource>
      </resources>

      Show
      Matt Raible added a comment - To get native2ascii working in 2.0 M2, perform the following steps: 1. Disable the GzipFilter's filter-mapping in web.xml (commenting it out is easiest). This is because there's currently a bug in the implementation: http://tinyurl.com/37nzhc 2. Add the following plugin information to your pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>native2ascii-maven-plugin</artifactId> <version>1.0-beta-1-SNAPSHOT</version> <configuration> <dest>target/classes</dest> <src>src/main/resources</src> </configuration> <executions> <execution> <id>native2ascii-utf8</id> <goals> <goal>native2ascii</goal> </goals> <configuration> <encoding>UTF8</encoding> <includes>ApplicationResources_zh*</includes> </configuration> </execution> <execution> <id>native2ascii-8859_1</id> <goals> <goal>native2ascii</goal> </goals> <configuration> <encoding>8859_1</encoding> <includes> ApplicationResources_de.properties, ApplicationResources_fr.properties, ApplicationResources_nl.properties, ApplicationResources_pt*.properties </includes> </configuration> </execution> </executions> </plugin> 3. In your pom.xml, change the following: <resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> </resource> </resources> To: <resources> <resource> <directory>src/main/resources</directory> <excludes> <exclude>ApplicationResources_zh*.properties</exclude> <exclude>ApplicationResources_de.properties</exclude> <exclude>ApplicationResources_fr.properties</exclude> <exclude>ApplicationResources_nl.properties</exclude> <exclude>ApplicationResources_pt*.properties</exclude> </excludes> <filtering>true</filtering> </resource> </resources>

        People

        • Assignee:
          Matt Raible
          Reporter:
          Matt Raible
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development