Return-Path: X-Original-To: apmail-flex-dev-archive@www.apache.org Delivered-To: apmail-flex-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 26A6A18426 for ; Tue, 1 Sep 2015 10:13:43 +0000 (UTC) Received: (qmail 37147 invoked by uid 500); 1 Sep 2015 10:13:32 -0000 Delivered-To: apmail-flex-dev-archive@flex.apache.org Received: (qmail 37061 invoked by uid 500); 1 Sep 2015 10:13:32 -0000 Mailing-List: contact dev-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list dev@flex.apache.org Received: (qmail 36758 invoked by uid 99); 1 Sep 2015 10:13:32 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Sep 2015 10:13:32 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id DDFCBF05C1 for ; Tue, 1 Sep 2015 10:13:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.312 X-Spam-Level: * X-Spam-Status: No, score=1.312 tagged_above=-999 required=6.31 tests=[SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id NvU1mk6brNWR for ; Tue, 1 Sep 2015 10:13:22 +0000 (UTC) Received: from emea01-db3-obe.outbound.protection.outlook.com (mail-db3on0113.outbound.protection.outlook.com [157.55.234.113]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTPS id 7C98E2576F for ; Tue, 1 Sep 2015 10:13:21 +0000 (UTC) Received: from DB5PR05MB1285.eurprd05.prod.outlook.com (10.162.157.147) by DB5PR05MB1287.eurprd05.prod.outlook.com (10.162.157.149) with Microsoft SMTP Server (TLS) id 15.1.256.15; Tue, 1 Sep 2015 10:13:14 +0000 Received: from DB5PR05MB1285.eurprd05.prod.outlook.com ([10.162.157.147]) by DB5PR05MB1285.eurprd05.prod.outlook.com ([10.162.157.147]) with mapi id 15.01.0256.013; Tue, 1 Sep 2015 10:13:14 +0000 From: Christofer Dutz To: "dev@flex.apache.org" Subject: AW: FlexMojos with RSLs Thread-Topic: FlexMojos with RSLs Thread-Index: AQHQ4PsHDU9omkpoIESG8yAAx1Rdyp4neGaD Date: Tue, 1 Sep 2015 10:13:13 +0000 Message-ID: References: <1440701872589-48944.post@n4.nabble.com> In-Reply-To: <1440701872589-48944.post@n4.nabble.com> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=christofer.dutz@c-ware.de; x-originating-ip: [109.84.0.21] x-microsoft-exchange-diagnostics: 1;DB5PR05MB1287;5:BdAPd5dPyuFfhKYNMHCawXrfbsOKS1hvRPp1Zh5gbcEezwLlueu3+8kBJhfgQOpipvFI9Gmm4V2dwQ7DeIkM1JXIqHS4Lqdt7vj99xWOaxYZdmFQfUsJDG4X/fekz2/n+bIg/xqnNV61CpV5ru1bDw==;24:1vqZgfNZvjvTiY1QjTYgVWVCY3vFu8xPIv+Hc6Azo63UrLh43RATcIqx3p8rNL1xParVZx4UgwvB7R27it3dVQ1UGKw5kCvMiigxs4rPD4c=;20:ReTc03I8V0klBwz48A/CsQrNsmuxdHqiOxbJoO7k6j3wNxQRc3i9Ajxv+oPwvV5PTljrMsVD4x/uvzwnNf0dKg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1287; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(8121501046)(5005006)(3002001);SRVR:DB5PR05MB1287;BCL:0;PCL:0;RULEID:;SRVR:DB5PR05MB1287; x-forefront-prvs: 06860EDC7B x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(189002)(199003)(101416001)(450100001)(54356999)(86362001)(5003600100002)(2950100001)(77096005)(76176999)(5001860100001)(2501003)(5001830100001)(106116001)(5001960100002)(68736005)(19580405001)(50986999)(102836002)(15975445007)(76576001)(75402003)(74482002)(81156007)(5004730100002)(33656002)(105586002)(62966003)(10400500002)(64706001)(77156002)(4001540100001)(189998001)(87936001)(74316001)(2656002)(19580395003)(122556002)(110136002)(66066001)(229853001)(97736004)(106356001)(46102003)(5002640100001)(107886002)(2900100001)(40100003)(5007970100001)(2351001)(92566002);DIR:OUT;SFP:1102;SCL:1;SRVR:DB5PR05MB1287;H:DB5PR05MB1285.eurprd05.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: c-ware.de does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: c-ware.de X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2015 10:13:13.8043 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 9d387546-1437-4b89-846c-691d64a7e74d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR05MB1287 Hi, sorry for the late response ... I flagged the mail but didn't have the time= to respond :-( What page are you explicitly talking about? I hope you didn't edit it, as I= do have some comments to your findings. As far as I know as soon as you set scope of a swc to "rsl" it is used and = delivered as swf file, so you don't need to provide the swf dependency. If = you look at what the flexmojos copy-resources goal creates you will probabl= y see a "rsls" directory in your war containing swf files. The problem with the resources is unfortunately not directly related to Fle= xmojos 7.1, but to Maven. In maven they "fixed" a dependency scope resoluti= on problem that Maven had from the dark ages. Unfortunately we were relying= on this. The result of Using Flexmojos 7.1 is that you have to use Maven 3= .1 or higher and therefore the rb.swc dependencies are stripped from the ma= ven dependency graph. The only way to fix this is to currently add an expli= cit dependency to those transitive resources. With the simplified extension= s mechanism of Maven 3.3.1, I'm thinking of a flex-maven-extension (That's = also the reason for me renaming the mavenizer artifact) that tells Maven ho= w to resolve the "rsl" scopes. This will get rid of the warnings and the ne= ed to re-define the rb.swcs of rsl dependencies and all should work as desi= red, but I'm completely swamped with getting mobile support in Flexmojos at= the moment. In your case you shouldn't use the classifier to the rb, but use this inste= ad: org.apache.flex.framework framework ${flex.sdk.version} rb.swc As Flexmojos knows how to handle this. Your solution would only work for on= e language, with this option flexmojos uses a dummy rb.swc and resolves the= correct languages at build time, depending on the languages you define. Ju= st have a look at what the mavenizer generates in the pom.xml for "framewor= k" for example ... you simply have to copy the transitive dependencies to y= our project. Chris ________________________________________ Von: mscharp Gesendet: Donnerstag, 27. August 2015 20:57 An: dev@flex.apache.org Betreff: FlexMojos with RSLs Hey Chris. In converting my company's project over to FM 7.1.0-SNAPSHOT and flex 4.14.1, I had to make some changes regarding how the RSLs were specified in the pom. I see that you have a page to address this in the wiki, so though= t I would give a go at writing some of it based off my experience. Please look at this and use whatever pieces of it you can. If there is anything that I've done incorrectly or made bad assumptions, please let me know as well. In order to use RSLs in your flex project, you need to declare their usage in the dependencies section of your pom, eg: org.apache.flex.framework framework ${flex.sdk.version} swc rsl Maven will complain that it doesn't know about the 'rsl' scope type, but yo= u can safely ignore that warning. It looks like this: [WARNING] 'dependencies.dependency.scope' for org.apache.flex.framework:framework:swc must be one of [provided, compile, runtime, test, system] but is 'rsl'. The 'rsl' scope type will instruct the compiler not to compile the RSLs int= o the final swf and instead will load the RSLs at runtime. When Flex moved over from Adobe to Apache, the RSL signing went the way of the dinosaurs. Before, the RSLs were loaded as swz files. These were Adobe's signed RSLs that lived on their servers and the flashplayer would load the RSLs from there. The nice thing about this approach was that you could visit any website and if you had loaded the RSLs once, it would just pull them from your cache. Now, however, you must host the RSLs on your own server. The RSLs that are loaded are now loaded as swf files, and will only be cached for other flex applications on the same domain. Because of this limitation, RSLs are a bi= t less useful than before. If you have multiple different flex applications under the same domain however, it can make sense to load the RSLs at runtim= e rather than compiling them into your flex application. In order to get these RSLs as swfs, you also need to depend on the swf version of the RSL. org.apache.flex.framework framework ${flex.sdk.version} swf test Previous to FM 7.1.0 and Flex 4.14.1 this was all that was needed in the dependency section. However, now this will result in build errors like this: Error: Unable to resolve resource bundle "components" for locale "en_US". Error: Unable to resolve resource bundle "textLayout" for locale "en_US". ... etcetera To resolve these errors, you must also declare the resource bundles for the RSLs you are using. org.apache.flex.framework framework ${flex.sdk.version} ${language}.rb swc rsl You also need to add an element to the configuration section of the flex mojos plugin to tell the flex application where it needs to look for the RSLs. net.flexmojos.oss flexmojos-maven-plugin ${flex.mojo.version} true ... rsl/{artifactId}-{version}.{extension} ... Another helpful configuration parameter you can specify is the removeUnusedRsls parameter. true Lastly, you also need to copy the RSLs into the directory where you've told your application to look for them. This will depend on your project and deployment structure as to whether you need this or not, but a helpful plugin to do this automatically is the maven-dependency-plugin. org.apache.maven.plugins maven-dependency-plugin 2.8 copy-rsls process-resources copy-dependencies ${flex.groupId}.framework swf true ${basedir}/target/rsl Putting this all together, a basic pom would look like this: 4.0.0 com.groupId artifactId 1.0.0-SNAPSHOT swf My Project 7.1.0-SNAPSHOT 4.14.1 org.apache.flex 18.0 4.3.0-SNAPSHOT en_US src/main/flex src/test/flex net.flexmojos.oss flexmojos-maven-plugin ${flex.mojo.version} true true rsl/{artifactId}-{version}.{extension} true org.apache.flex compiler 4.14.1 pom com.adobe fontkit 1.0 net.flexmojos.oss flexmojos-threadlocaltoolkit-wrapper 7.1.0-SNAPSHOT org.apache.maven.plugins maven-dependency-plugin 2.8 copy-rsls process-resources copy-dependencies ${flex.groupId}.framework swf true ${basedir}/target/rsl ${flex.groupId} framework ${flex.sdk.version} pom com.adobe.flash.framework playerglobal ${flashplayer.version} swc ${flex.groupId}.flexunit flexunit-flex ${flexunit.version} swc test org.apache.flex.framework framework ${flex.sdk.version} swc rsl org.apache.flex.framework framework ${flex.sdk.version} ${language}.rb swc rsl org.apache.flex.framework framework ${flex.sdk.version} swf test -- View this message in context: http://apache-flex-development.2333347.n4.nab= ble.com/FlexMojos-with-RSLs-tp48944.html Sent from the Apache Flex Development mailing list archive at Nabble.com.=