Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Can Native2Ascii write to the /build directory?
Can Native2Ascii write to the /build directory? [message #223368] Mon, 03 November 2008 09:01 Go to next message
Eric Getchell is currently offline Eric Getchell
Messages: 3
Registered: July 2009
Junior Member
I would like to automate the Unicode conversion during the build/publish
step when doing local development in Eclipse. (Our production builds are
done via Maven and the native2ascii conversion is fully integrated in the
build process). Has anyone had any success with integrating the custom
Builder in Eclipse to invoke the native2ascii Ant task?

I understand that Eclipse stages classes and resources to the /build
directory and then publishes to the local application server from this
directory. Invoking native2ascii via a custom Builder does not seem to
write the Unicode converted .properties files in the /build directory. If
I point the destination directory of the Builder to any directory *but*
the /build directory, the resource bundles are correctly converted. Ideas?

Eric Getchell | Sr. Technologist

Distributed Logic Corporation
600 Unicorn Park
Woburn, MA 01801
Re: Can Native2Ascii write to the /build directory? [message #223384 is a reply to message #223368] Mon, 03 November 2008 16:20 Go to previous messageGo to next message
Eric Getchell is currently offline Eric Getchell
Messages: 3
Registered: July 2009
Junior Member
One update during my day of struggling with this.

If, as part of my builder task, I issue a delete of all .properties files
in the /build directory prior to running native2ascii, the files are
properly Unicode converted. However, when doing this delete, no .property
files are then deployed to the application server.
Re: Can Native2Ascii write to the /build directory? [message #223392 is a reply to message #223384] Mon, 03 November 2008 17:19 Go to previous messageGo to next message
Konstantin Komissarchik is currently offline Konstantin Komissarchik
Messages: 935
Registered: July 2009
Senior Member
Are you refreshing the folders that ant modifies? If you don't refresh,
Eclipse will not see your changes. If you hooked up your ant script via
standard builder hookup, you should be able to configure what to refresh
after ant script is executed in the same dialog where you configured the
path to the ant script.
Re: Can Native2Ascii write to the /build directory? [message #223453 is a reply to message #223392] Tue, 04 November 2008 13:56 Go to previous message
Eric Getchell is currently offline Eric Getchell
Messages: 3
Registered: July 2009
Junior Member
Thanks for the tip. The issue seems to lie in the fact that the
native2ascii task does not convert the files when the destination
directory is the staging directory used by Eclipse (any other directory is
fine). When I add the following delete task:
<project name="unicode-property-converter" default="convert">
<target name="convert">
<delete>
<fileset dir="build/classes/" includes="**/*.properties"/>
</delete>
<native2ascii encoding="UTF-8"
src="resources/"
dest="build/classes"
includes="**/*.properties" />
</target>
</project>

... coupled with the Refresh option cited in the previous post, I get the
following output during any incremental compile or full build:

>Buildfile: E:\workspace\wallet\unicode-property-converter.xml
>
>convert:
>[native2ascii] Converting 60 files from E:\workspace\wallet\resources to
>E:\workspace\wallet\build\classes
>BUILD SUCCESSFUL
>Total time: 562 milliseconds

And the .properties files are correctly deployed as Unicode.

However, if I do not include the "delete" task, I get the following output
in all situations:
>Buildfile: E:\workspace\wallet\unicode-property-converter.xml
>
>convert:
>BUILD SUCCESSFUL
>Total time: 157 milliseconds

Looking at the contents of the \build directory, the .property files are
still in their native UTF-8 format. I've never seen anyone note that the
properties files need to be deleted prior to running the native2ascii
task, so I still feel the error is on my part.
Previous Topic:JSDT: IJavaElement for 'this' source element?
Next Topic:XML comment colors
Goto Forum:
  


Current Time: Wed Jul 23 20:27:33 EDT 2014

Powered by FUDForum. Page generated in 0.01814 seconds