Re: Maven builds and *.lproj resources

From: Fabian Peters (lists.fabia..-lumo.com)
Date: Tue Mar 27 2007 - 08:21:50 EDT

  • Next message: WIESEN Bruno: "ERXTable"

    Hi Henrique,

    Thanks for your reply!

    Am 27.03.2007 um 03:55 schrieb Henrique Prange:

    > Make sense. Are you using a folder structure like that?
    >
    > project
    > |--Components
    > |--Resources
    > `--WebServerResources

    I did use a "Components" folder but reverted to keeping the
    components at the project root since I had major problems in
    development when the components were kept in a subfolder.

    > The "executeFolders" method seems to handle these 3 folders
    > (Components, Resources and WebServerResources) in a special way. I
    > am not using this folder structure, so I have not figured out this
    > issue. With the following folder structure almost everything is
    > working here:
    >
    > project
    > `--src
    > `--main
    > |--components
    > |--resources
    > `--webserver-resources

    My projects now look like this, with all components in the project root:

    project
       |--src (java sources only)
       |--Resources
       `--WebServerResources

    When I use the 2.0.4 snapshot of wolifecycle plugin, I get "English",
    "French", "German" etc. My own patched version produces
    "English.lproj" etc. and everything works like a charm. From what I
    see, the three folders are treated specially in that they are
    included by default, no matter what. The truncating of the suffix is
    independent from this.

    > Probably, Ulrich has more to say about this topic than I have.
    > Anyway, as it seems to be an incorrect behavior, I am creating a
    > patch with your solution.

    I'm almost sure he did this on purpose, I mean, why else would you go
    and code it in such a way to remove the ".lproj" suffix? But I have
    no idea what the aim might have been, the ".lproj" being a
    requirement according to the NSBundle API. So, let's see what Ulrich
    has to say... ;-)

    cheers

    Fabian

    > Fabian Peters wrote:
    >> Hi,
    >> I had a closer look at the maven stuff last week and find it very
    >> promising! Thanks a lot, Uli, Henrique, Andrus and all others!
    >> One thing I don't understand is line 192 of DefineResourcesMojo:
    >> resource.setTargetPath(fullTargetPath + File.separator +
    >> fileName.substring(0, fileName.length() - 6));
    >> This removes the ".lproj" suffixes from language resource
    >> directories. For me, this breaks localization since the localized
    >> resources aren't found anymore. I'd be interested to hear what's
    >> the idea behind this setup? When I change the code to simply use
    >> the fileName, everything works fine.
    >> cheers
    >> Fabian
    >
    > --
    >
    > \o/ Henrique Prange, Moleque de Idéias Educação e Tecnologia Ltda
    > | Phone: 55-21-2710-0178 E-mail: hprang..oleque.com.br
    > / \ http://www.moleque.com.br



    This archive was generated by hypermail 2.0.0 : Tue Mar 27 2007 - 08:22:18 EDT