Reloading a flex mojos project takes a long time

Hi all,
Whenever I change a pom file that has a flexmojos plugin defined in it, IntelliJ recreates the relevant projects' flex facets or something. I see the message "Generating Flex Compiler Configuration File" appear for each project and it takes a really long time. Any way to shorten this?
Thanks,
Guy

11 comments
Comment actions Permalink

It should be long for the first time but almost instant for the second and further until project closed.

0
Comment actions Permalink

Well that's not how it happens. On every pom change it reloads them all and it takes about 10-20  seconds at least for each project which amounts to a long time for all projects put together

0
Comment actions Permalink

And by the way, I'm using idea 9.04 if it makes a difference

0
Comment actions Permalink

It is not normal neither for IDEA 9.0.x nor for IDEA 10.x.x. Unfortunately we do not plan 9.0.x update releases any more. You may try IDEA 10 and if the problem is still there then we'll fix it.

0
Comment actions Permalink

OK, I tried IntelliJ 10 and it is still happening.
I changed a pom for one project, and it generated the "Flex compiler configuration file" for all dependent projects.
I don't understand if it is not normal for it to create the files at all, or it is not normal that it takes a long time?
Thanks for the help...

0
Comment actions Permalink

It is normal that all dependent projects are reimported but it is not normal if second and further reimports take too much time (at least generating flex configs). Is it possible to attach your pom files (at least one pom.xml file that takes more than 3 seconds for generating flex config)?

0
Comment actions Permalink

I should also mention that our project is pretty large - Every time we change the root POM it reimports 170 projects

Here is a sample:

<project>
 <modelVersion>4.0.0</modelVersion>
 <parent>
 <groupId>com.company.something</groupId>
 <artifactId>cnc-automation-execution</artifactId>
 <version>oasis-SNAPSHOT</version>
 </parent>

 <artifactId>automationExecutionLauncher</artifactId>
 <packaging>swf</packaging>

 <dependencies>
 <dependency>
 <groupId>com.comp.onyx</groupId>
 <artifactId>appinfra</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.adobe.flex</groupId>
 <artifactId>cairngorm</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>org.un.flex</groupId>
 <artifactId>graphLayout</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.adobe.flex</groupId>
 <artifactId>compiler</artifactId>
 <type>pom</type>
 </dependency>
 <dependency>
 <groupId>com.company.something</groupId>
 <artifactId>initializer</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.adobe.flex.framework</groupId>
 <artifactId>flex-framework</artifactId>
 <type>pom</type>
 </dependency>
 <dependency>
 <groupId>flex</groupId>
 <artifactId>flexlib</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.company.silver</groupId>
 <artifactId>silverPhasePromoter</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.company.silver</groupId>
 <artifactId>clientTester</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.company.silver</groupId>
 <artifactId>silver</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.company.something</groupId>
 <artifactId>execution</artifactId>
 <type>swc</type>
 </dependency>
 <dependency>
 <groupId>com.company.something</groupId>
 <artifactId>viewdisplayshared</artifactId>
 <type>swc</type>
 </dependency>
        <dependency>
            <groupId>com.company.silver</groupId>
            <artifactId>processTimer</artifactId>
            <type>swc</type>
        </dependency>
 </dependencies>
 <build>
 <sourceDirectory>src/main/flex</sourceDirectory>
 <testSourceDirectory>src/test/flex</testSourceDirectory>
 <plugins>
 <plugin>
 <!-- unpack-flex-config -->
 <artifactId>maven-dependency-plugin</artifactId>
 </plugin>
 <plugin>
 <groupId>org.sonatype.flexmojos</groupId>
 <artifactId>flexmojos-maven-plugin</artifactId>
 <configuration>
 <output>target/${project.artifactId}.swf</output>
 <sourceFile>${project.artifactId}.mxml</sourceFile>                                                                        
 <ideOutputFolderPath>running/folder/servers/server-0/webapps/folder</ideOutputFolderPath>
 </configuration>
 </plugin>
 </plugins>
 </build>
</project>

And here's the flexmojos definition in the root pom file:

<plugin>
 <groupId>org.sonatype.flexmojos</groupId>
 <artifactId>flexmojos-maven-plugin</artifactId>
 <version>3.8</version>
 <extensions>true</extensions>
 <configuration>
 <licenses>
 <flexbuilder3>${flex3.license}</flexbuilder3>
 </licenses>
 <!--sourcePaths>
 <path>src/main/flex</path>
 <path>src/main/resources</path>
 </sourcePaths-->
 <configFile>target/flex-config/flex-config.xml</configFile>
 <services>target/flex-config/services-config.xml</services>
 <skipTests>true</skipTests>
 <configurationReport>true</configurationReport>
 <ideOutputFolderPath>target</ideOutputFolderPath>
 <ideOutputFolderLocation>target</ideOutputFolderLocation>
 <debug>${flexmojos.maven.plugin.debug}</debug>
 <targetPlayer>9.0.124</targetPlayer>
 <!--enableModuleDebug>false</enableModuleDebug-->
 <!--allowSourcePathOverlap>true</allowSourcePathOverlap-->
 
 <keepAs3Metadatas>
 <keepAs3Metadata>Autowired</keepAs3Metadata>
 </keepAs3Metadatas>
 </configuration>         
 <dependencies>
 <dependency>
 <groupId>com.adobe.flex</groupId>
 <artifactId>compiler</artifactId>
 <version>${flex.sdk.version}</version>
 <type>pom</type>
 </dependency>
 <dependency>
 <groupId>com.adobe.flex.framework</groupId>
 <artifactId>flex-framework</artifactId>
 <version>${flex.sdk.version}</version>
 <type>pom</type>
 </dependency>
 <dependency>
 <groupId>com.adobe.flex.compiler</groupId>
 <artifactId>license</artifactId>
 <version>${flex.sdk.version}</version>
 </dependency>
 </dependencies>
 </plugin>

0
Comment actions Permalink

Sorry for delay.
Well, I don't see anything suspicious in your pom. And still could not reproduce long reimport. What is your environment: OS, java, maven? We'd greatly appreciate if you manage to create sample project that illustrates the issue.

0
Comment actions Permalink

Well now I'm sorry for the delay :)
I am currently reevaluating version 10 and it seems better. I think one of our problems is the amount of SWC and SWF pom files...
Thanks for the help,
Guy

0
Comment actions Permalink

I think we have found the reason of long flexmojos reimport but so far don't how to fix it. See my comments here http://youtrack.jetbrains.net/issue/IDEA-67994 If you have any more comments/considerations please write them to the issue.

0

Please sign in to leave a comment.