That doesn't solve problem. I moved my properties file to C:\Temp
\FlexTest\SampleLib\src\main\locales\en_US\Sample.properties, and
removed <localesSourcePath>. However I still get
'Error: unable to open 'C:\Temp\FlexTest\SampleLib\src\main\locales\
{locale}'' because such folder doesn't exists. As I mentioned before,
problem only exists when packaging is swc, it works with swf
packaging.On Aug 1, 4:00 pm, Christofer Dutz <[email protected]> wrote: > Hi Pawel, > > I Usually have my locales defined in: > > src/main/locales/{the locale code en_US} > > This is the default location where FM looks for them. Then you don't > have to provide any type of localesSourcePath. As soon as you define a > compiled or runntime locale, FM will automatically look there. So if > you want to add german locales, simpy add "de_DE" to the > localesCompiled and add a directory called "de_DE" to > src/main/locales. > > Hope this helps. > > Chris > > 2011/8/1 pawel <[email protected]>: > > > > > > > > > At my company's other project that I looked at, looking for solution, > > I saw that they just added folder named {locale}, just to avoid that > > problem, but it's kind of hack, so if there is other solution, than > > please share. > > Btw I found out that there are two entries in properties dump file: > > <source-path> > > <path-element>C:\Temp\FlexTest\SampleLib\src\main\flex</path- > > element> > > </source-path> > > <source-path> > > <path-element>C:\Temp\FlexTest\SampleLib\src\locale\{locale}</ > > path-element> > > </source-path> > > > and > > <include-sources> > > <path-element>C:\Temp\FlexTest\SampleLib\src\main\flex</path- > > element> > > </include-sources> > > <include-sources> > > <path-element>C:\Temp\FlexTest\SampleLib\src\locale\{locale}</ > > path-element> > > </include-sources> > > > but when I change packaging to swf, then there is only the first one > > from above, so probably the <include-sources> entries is causing > > problems. > > > On Aug 1, 12:49 pm, pawel <[email protected]> wrote: > >> So I checked flexmojos 3.5.0 code and there {locale} token is > >> explicitly replaced with proper locale, and in 4.0 version there is no > >> such code, I mean there is some function in MavenUtils class in both > >> versions, but in 4.0 it is not used. > >> Therefore it must have been removed on purpose. Is there a way to > >> compile what I need with 4.0 version? > > >> On Aug 1, 12:39 pm, pawel <[email protected]> wrote: > > >> > Hi, > > >> > I have problem with compiling swc with resource bundles. So I use > >> > flexmojos 4.0-beta-7. I generated sample application with: > >> > mvn archetype:generate -DarchetypeRepository=https:// > >> > repository.sonatype.org/content/groups/forge/ - > >> > DarchetypeGroupId=org.sonatype.flexmojos - > >> > DarchetypeArtifactId=flexmojos-archetypes-library - > >> > DarchetypeVersion=4.0-SNAPSHOT > > >> > Then I added such lines to flexmojos-maven-plugin configuration: > >> > <dependencies> > >> > <dependency> > >> > <groupId>com.adobe.flex</groupId> > >> > <artifactId>compiler</artifactId> > >> > <version>4.5.0.17689</version> > >> > <type>pom</type> > >> > </dependency> > >> > </dependencies> > >> > <configuration> > >> > > >> > <localesSourcePath>${basedir}/src/locale/{locale}</ > >> > localesSourcePath> > >> > <localesRuntime> > >> > <locale>en_US</locale> > >> > </localesRuntime> > >> > </configuration> > > >> > And that works fine. But I need to use 3.3.0.4852 flex sdk. So I > >> > changed version of compiler to 3.3.0.4852, and also added to flexmojos- > >> > maven-plugin dependencies: > >> > <dependency> > >> > <groupId>org.sonatype.flexmojos</groupId> > >> > <artifactId>flexmojos-flex3-compatibility-layer</ > >> > artifactId> > >> > <version>4.0-beta-7</version> > >> > </dependency> > > >> > And now I get: Error: "unable to open 'C:\Temp\FlexTest\SampleLib\src > >> > \locale\{locale}'". So it seems that {locale} token is not replaced > >> > with proper locale. Btw. when I swich packaging to swf, then it works. > >> > I searched the flexmojos code for place where {locale} token is > >> > changed to proper locale, but couldn't find one. Maybe it is passed > >> > with {locale} token to compiler, but it replaced it itself, but 3.3.0 > >> > version of compiler could not do it? > > >> > Also there is such file generated: SampleLib-1.0-SNAPSHOT-en_US- > >> > configs.xml, and there is something lake that: > >> > <source-path> > >> > <path-element>C:\Temp\FlexTest\SampleLib\src\main\flex</path- > >> > element> > >> > </source-path> > >> > <source-path> > >> > <path-element>C:\Temp\FlexTest\SampleLib\src\locale\{locale}</ > >> > path-element> > >> > </source-path> > > >> > That suggest that it is indeed passed to compiler with {locale} token, > >> > but 4.x compiler replaces it with locale itself, and 3.3.0 swc > >> > compiler doesn't. > >> > Another thing is that when I use 3.x flexmojos, then it works fine. > > >> > Any ideas how can I solve that? Am I doing something wrong, or is it a > >> > bug? > > > -- > > You received this message because you are subscribed to the Google > > Groups "Flex Mojos" group. > > To post to this group, send email to [email protected] > > To unsubscribe from this group, send email to > > [email protected] > > For more options, visit this group at > >http://groups.google.com/group/flex-mojos > > >http://flexmojos.sonatype.org/ -- You received this message because you are subscribed to the Google Groups "Flex Mojos" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex-mojos http://flexmojos.sonatype.org/
