IntelliJ/Flexmojos - flex sdk RSL configuration

Hi,

I was trying to fill the gap between our Flex/JEE application and IntelliJ and found that the final problem to get IntelliJ properly configured to work is located in flexmojos flex sdk configuration.

IntelliJ does not provided a way to configure flex SDK as RSL (neither CACHING nor EXTERNAL) since flexmojos is configured merged by default. I suppose that IntelliJ developers couldn't provide RSL configuration through flexmojos due to the fact that flexmojos default configuration for flex sdk is "merged".

Our app is configured with flex SDK as RSL and libraries are configured with flex sdk as EXTERNAL so we don't find any way to be able to work with IntelliJ due to this problem.



Could someone at IntelliJ let me know if I'm right? if this is a problem that should be solved in both flexmojos and IntelliJ? is only a problem in IntelliJ?

We like intelliJ IDE but we are frustated since we are unable to make it fully work for our application.

Thanks

Carlos Rovira
PD: btw, one final problem is that swf artifacts (created from flex projects) are not deployed to our exploded webapp, what is another big problem (even when all that projects are specified in the webapp's pom)
8 comments
Comment actions Permalink

When IntelliJ IDEA imports Flexmojos project it generates Flex compiler config file based on your pom. You can see path to this file in the 'Additional compiler config path' at Compiler Options tab of the Flash build configuration (Project Structure dialog). Libraries in this file are configured correctly (according to your pom) and you'll see both external and RSL dependencies there. Although you see 'Merged' at Dependencies tab fror all SWCs, in fact at compile time settings from this additional config file win and you get correct linkage in resulting swf.

As for swf deployment - you need to check corresponding artifact configuration (Project Structure | Artifacts).

0
Comment actions Permalink

Hi Alexander,

As you say I'm seeing code like this in the flexmojos config in intelliJ:

<output>/Users/carlosrovira/Developer/git/directwriter/flex/flexlogin/target/flexlogin-1.2.2-SNAPSHOT.swf</output>
    <remove-unused-rsls>false</remove-unused-rsls>
    <runtime-shared-library-path>
        <path-element>/Users/carlosrovira/.m2/repository/com/adobe/flex/framework/framework/4.5.1.21328/framework-4.5.1.21328.swc</path-element>
        <rsl-url>framework-4.5.1.21328.swz</rsl-url>
    </runtime-shared-library-path>
    <runtime-shared-library-path>
        <path-element>/Users/carlosrovira/.m2/repository/com/adobe/flex/framework/textLayout/4.5.1.21328/textLayout-4.5.1.21328.swc</path-element>
        <rsl-url>textLayout-4.5.1.21328.swz</rsl-url>
    </runtime-shared-library-path>
    <runtime-shared-library-path>
        <path-element>/Users/carlosrovira/.m2/repository/com/adobe/flex/framework/osmf/4.5.1.21328/osmf-4.5.1.21328.swc</path-element>
        <rsl-url>osmf-4.5.1.21328.swz</rsl-url>
    </runtime-shared-library-path>
    <runtime-shared-library-path>
        <path-element>/Users/carlosrovira/.m2/repository/com/adobe/flex/framework/rpc/4.5.1.21328/rpc-4.5.1.21328.swc</path-element>
        <rsl-url>rpc-4.5.1.21328.swz</rsl-url>
    </runtime-shared-library-path>
    <runtime-shared-library-path>
        <path-element>/Users/carlosrovira/.m2/repository/com/adobe/flex/framework/charts/4.5.1.21328/charts-4.5.1.21328.swc</path-element>
        <rsl-url>charts-4.5.1.21328.swz</rsl-url>
    </runtime-shared-library-path>



but the screenshot attached shows a complete different configuration. So this seems like a bug in representation to me that confuse the intellij user, isn't it? (intellij reports merged but really is RSL)

So taking into account that flex sdk RSL configuration is ok (although is showing merged), I still can't understand ok the second problem: swf - deployment.
Can you elaborate more on "As for swf deployment - you need to check corresponding artifact configuration (Project Structure | Artifacts)."?

btw, I was thinking that the webapp's pom would be sufficient to configure this as it's when I use maven from command line and it ends copying the swf artifacts on the proper folder.

Thanks Alexander for your help.

Carlos

Attachment(s):
Screen Shot 2012-10-16 at 4.49.41 PM.png
0
Comment actions Permalink

Impressive project size!

You are right, linkage type shown in UI may be different from the actual linkage type at compile time for Flexmojos projects because actual linkage type comes from Flex compiler config file generated when pom is imported. Often maven users do not care about IntelliJ IDEA project structure UI and configure everything in pom and rely on correct importing.

As far as I understand as as result of webapp pom import IntelliJ IDEA should configure an artifact (in terms of IntelliJ IDEA artifacts) that contains the rules - which files should be copied to deployment folder. So please check what is there at Project Structure | Artifacts page. May be all you need to get files copied is to click Build | Build Artifacts or as an alternative check 'Build on make' check box at Artifact configuration page.

0
Comment actions Permalink

> Impressive project size!

Yes! we have right now 125 subprojects (half java , half flex )  :)

Regarding swf deployment, we use flexmojos 3.9 in our webapp's pom to copy the flex dependencies. This feature is no longer available in flexmojos 4.x and beyond (this was the author decission).

Our code is like this:

    <build>
        <finalName>webapp</finalName>
        <plugins>
            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>3.9</version>
                <executions>
                    <execution>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-flex-resources</goal>
                        </goals>
                        <configuration>
                            <stripVersion>false</stripVersion>
                            <copyRuntimeLocales>false</copyRuntimeLocales>
                            <useFinalName>true</useFinalName>
                            <copyRSL>true</copyRSL>
                            <webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.1</version>    
                <configuration>
                    <outputDirectory>src/main/webapp/WEB-INF/lib</outputDirectory>
                    <excludeTypes>swf,swc,pom,rb.swc,zip</excludeTypes>
                    <includeScope>compile</includeScope>
                    <excludeArtifactIds>servlet-api,spring</excludeArtifactIds>    
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <warName>ourwebapp</warName>
                    <warSourceExcludes>WEB-INF/lib/**</warSourceExcludes>
                </configuration>
            </plugin>
        </plugins>




This is more transparent for the user since it resolves transitive dependencies of RSLs (avoiding the manual maintenance by the final user), so very convenient in the end.

Could this (along the fix in UI regarding RSL, CACHING, and so on... visual description) be included in IntelliJ? I think it would be improve really the product, since right now we still can't use it due to this problems, and we really want to push this IDE in our business and migrate from Eclipse/Flash Builder to IntelliJ.

Thanks for your support.

Carlos Rovira
0
Comment actions Permalink

"copy-flex-resources" feature is not supported yet (tracked as IDEA-61107). This shouldn't prevent you from moving to IntelliJ IDEA because Flash Builder doesn't support flexmojos at all. And as far as I know there's no way to manually configure "copy-flex-resources" functionality.
In IntelliJ IDEA you can configure an artifact manually and you'll get whatever you need copied to deployment folder or packed into jar/war/ear.

0
Comment actions Permalink

Hi Alexander,

is great to see the "copy-flex-resources" taken into account, since it's a needed feature to make flexmojos integration finaly valid in IntelliJ.

Regarding election of IDE: Flash Builder does not support flexmojos, but right now the current IntelliJ integration is not valid enough for our size project since we need to manually configure lots of things. Create up to 125 artifacts for each project (and growing) and relationing those artifacts with the web app is not assumible for our development teams.

Until we don't get IntelliJ configure flexmojos projects as it does with java, and make us productive, we can't propose the tool internaly because the way we operate with both IDEs will be the same: not relying in flexmojos at development time, only in CI. So we really don't get any gain with the change.

As I'm responsible of propose tools in my company and my team likes IntelliJ, we offer our help to IntelliJ team in order to test and propose solutions to make flexmojos integration reach the level it needs to make it a killer feature. We are active in both apache flex and flexmojos to solve this tooling integration problem since we think is very close to fill the final gaps to be finaly valid.

0
Comment actions Permalink

Unbeaten IntelliJ IDEA advantage is smart coding assistance. Live errors highlighting, quick fixes, intentions, really smart code completion, code generation, etc... Yep, IDE change requires some learnig curve, getting used to a bit different project setup and shortcuts. And I've met a lot of happy users who switched to IntelliJ after years of working with other tool, but I can't recall anybody switched to any other IDE after years of working with IntelliJ.
Unlike Adobe who announced that they drop Flex support in Flash Builder after next 4.x update release we at JetBrains keep supporting new features, fixing user issues and improving overall usability.
You say the level of Flexmojos support is not enough for your project. I failed to find any YouTrack issues reported by you. Can you please submit bugs and feature requests that would make your day-to-day work more productive. Good chances that you'll get fixes in the upcoming IntelliJ IDEA 12 release.

0
Comment actions Permalink

Hi Alexander,

as you say all what you comment is true, and the good press generated by IntelliJ is what made us explore the product and try it. We want to change due to Adobe leaving support for Flex in Flash Builder 5. For that reason we are trying to make the switch, because we don't want to get stuck in the future. But as I say we need to close the circle with flexmojos in order to change all organization and make it happen.

Thanks to let me know about YouTrack and the contribution we can make there. We'll be filling issues ASAP that stop us to make IntelliJ our IDE of choice since we'll love to make it solved and be able to switch in version 12.

Best and thanks for your quick help and support,

C

0

Please sign in to leave a comment.