Skip to content

Commit

Permalink
Issue #1 Updated plugin's site
Browse files Browse the repository at this point in the history
  • Loading branch information
dmatej committed Dec 23, 2017
1 parent 6df6234 commit b2a1b1a
Show file tree
Hide file tree
Showing 6 changed files with 135 additions and 66 deletions.
41 changes: 41 additions & 0 deletions src/site/apt/examples/inplace2ascii.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
------
Converting Resources Inplace
------
David Matejcek
------
2017-12-23
------

Converting UTF-8 properties to standard inplace

This goal targets the scenario known from 1-beta version - conversion of
UTF-8 file content to Unicode-escaped content on the same file.

Note that this target is not covered by eclipse lifecycle.

---
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>____</version>
<executions>
<execution>
<id>utf8-to-latin1</id>
<goals>
<goal>inplace</goal>
</goals>
<phase>process-resources</phase><!-- default -->
<configuration>
<dir>${project.build.testOutputDirectory}/localized</dir><!-- must be set -->
<encoding>${project.build.sourceEncoding}</encoding><!-- default -->
<includes>
<include>**/*.properties</include><!-- default -->
</includes>
<excludes>
<exclude></exclude><!-- nothing by default -->
</excludes>
</configuration>
</execution>
</executions>
</plugin>
---
40 changes: 40 additions & 0 deletions src/site/apt/examples/resources2ascii.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
------
Converting Resources
------
David Matejcek
------
2017-12-23
------

Converting UTF-8 properties to standard

This goal targets the basic scenario - conversion of UTF-8 files to Unicode-escaped files
without any change of the originals.

---
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>____</version>
<executions>
<execution>
<id>utf8-to-latin1</id>
<goals>
<goal>resources</goal>
</goals>
<phase>process-resources</phase><!-- default -->
<configuration>
<srcDir>src/main/native2ascii</srcDir><!-- default -->
<targetDir>${project.build.outputDirectory}</targetDir><!-- default -->
<encoding>${project.build.sourceEncoding}</encoding><!-- default -->
<includes>
<include>**/*.properties</include><!-- default -->
</includes>
<excludes>
<exclude></exclude><!-- nothing by default -->
</excludes>
</configuration>
</execution>
</executions>
</plugin>
---
40 changes: 40 additions & 0 deletions src/site/apt/examples/test-resources2ascii.apt
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
------
Converting Test Resources
------
David Matejcek
------
2017-12-23
------

Converting UTF-8 properties to standard

This goal targets the basic testing scenario - conversion of UTF-8 files to Unicode-escaped files
without any change of the originals or the target artifact.

---
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>____</version>
<executions>
<execution>
<id>utf8-to-latin1</id>
<goals>
<goal>testResources</goal>
</goals>
<phase>process-test-resources</phase><!-- default -->
<configuration>
<srcDir>src/test/native2ascii</srcDir><!-- default -->
<targetDir>${project.build.testOutputDirectory}</targetDir><!-- default -->
<encoding>${project.build.sourceEncoding}</encoding><!-- default -->
<includes>
<include>**/*.properties</include><!-- default -->
</includes>
<excludes>
<exclude></exclude><!-- nothing by default -->
</excludes>
</configuration>
</execution>
</executions>
</plugin>
---
25 changes: 9 additions & 16 deletions src/site/apt/index.apt
Original file line number Diff line number Diff line change
@@ -1,26 +1,19 @@
------
Introduction
------
Evgeny Mandrikov
<mandrikov@gmail.com>
David Matejcek
<dmatej79@gmail.com>
------
2011-11-04
2017-12-23
------

Native2Ascii Maven Plugin

This plugin converts files with characters in any supported character encoding to one with ASCII and/or Unicode escapes.


* Goals Overview

* {{{./native2ascii-mojo.html}native2ascii:native2ascii}}: Run the conversion.

[]


* Usage

Instructions on how to use the Native2Ascii Maven Plugin can be found on the {{{./usage.html}usage page}}.
This plugin provides solution for developers who maintain property files in UTF-8 encoding
but runtime needs ASCII and supports Unicode-escaped characters just like Java's
java.util.Properties class.

This plugin converts files in any supported character encoding to one with ASCII
and/or Unicode escapes.

See {{{./plugin-info.html}Goals}} and Examples to see more.
45 changes: 0 additions & 45 deletions src/site/apt/usage.apt

This file was deleted.

10 changes: 5 additions & 5 deletions src/site/site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<menu name="Overview">
<item name="Introduction" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
<!--
<item name="Usage" href="usage.html"/>
<!--
<item name="FAQ" href="faq.html"/>
-->
-->
</menu>
<!--
<menu name="Examples">
<item name="UTF8 to ASCII" href="examples/utf8-2ascii.html"/>
<item name="Resources to ASCII" href="examples/resources2ascii.html"/>
<item name="Test Resources to ASCII" href="examples/test-resources2ascii.html"/>
<item name="Inplace Conversion to ASCII" href="examples/inplace2ascii.html"/>
</menu>
-->
</body>
</project>

0 comments on commit b2a1b1a

Please sign in to comment.