Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ, Maven, Flexmojos - Failed to generate Flex compiler configuration file

I'm running a multi-project build in IntelliJ setup with Flexmojos.

All of the flex modules have a common parent pom file which is downloaded from Artifactory. This dependency seems to be resolved properly but when I hit "Reimport All Maven Projects", or do changes to any child pom file, I get an error

Flexmojos Project Import
**Failed to generate Flex compiler configuration file.**
The pipe has been ended

Flexmojos Project Import
**Failed to generate Flex compiler configuration file.** 
exit code: 1

Globals (using maven 'defines' tag) defined in the parent pom are not visible in any child project and if I go into "Project Structure" there is

"Build configurations '[child artifactId]': additional compiler configuration file not found: [absolute path]"

, which is a symptom of the missing configuration files.

I think it is a settings (IntelliJ? Maven? Java?) issue because my colleague has the same code from SVN and does not have the same issue.

Any clues as to where to start looking?

EDIT:

Excerpt from idea.log

2013-08-13 16:35:34,213 [1978178]   INFO -      #org.jetbrains.idea.maven - Generating flex configs pathToBundledJar: C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\plugins\flex\lib\flexmojos-flex-configs-generator-server.jar 
2013-08-13 16:35:34,214 [1978179]   INFO -      #org.jetbrains.idea.maven - Generate Flex Configs Task:"c:\program files\java\jdk1.7.0_25\jre\bin\java" -Dfile.encoding=windows-1252 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 12.1.4\plugins\flex\lib\flexmojos-flex-configs-generator-server.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-api-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-connector-wagon-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-impl-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-spi-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aether-util-0.9.0.M2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\aopalliance-1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\asm-3.3.1.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\cdi-api-1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\guava-11.0.2.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\javax.inject-1.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\jsr250-api-1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\jsr305-1.3.9.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-aether-provider-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-artifact-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-compat-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-core-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-model-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-model-builder-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-plugin-api-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-repository-metadata-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-settings-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\maven-settings-builder-3.1.0.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\org.eclipse.sisu.inject-0.0.0.M2a.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\org.eclipse.sisu.plexus-0.0.0.M2a.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-cipher-1.7.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-component-annotations-1.5.5.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-interpolation-1.16.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-sec-dispatcher-1.3.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\plexus-utils-3.0.10.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\sisu-guice-3.1.3-no_aop.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\slf4j-api-1.7.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\slf4j-simple-1.7.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\wagon-file-2.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\wagon-http-2.4-shaded.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\lib\wagon-provider-api-2.4.jar;C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\boot\plexus-classworlds-2.4.2.jar" com.intellij.flex.maven.GeneratorServer "C:\Program Files (x86)\maven-3.1.0\apache-maven-3.1.0\conf\settings.xml" " " C:\Users\XXXXXXXX\.m2\repository f D:/XXXXXXXXXXX/trunk/.idea/flexmojos 
2013-08-13 16:35:34,534 [1978499]  ERROR -      #org.jetbrains.idea.maven - The pipe has been ended 
java.io.IOException: The pipe has been ended
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:318)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
    at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
    at java.io.DataOutputStream.flush(DataOutputStream.java:123)
    at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1816)
    at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:716)
    at com.intellij.javascript.flex.maven.Flexmojos4GenerateConfigTask.writeWorkspaceMap(Flexmojos4GenerateConfigTask.java:379)
    at com.intellij.javascript.flex.maven.Flexmojos4GenerateConfigTask.runGeneratorServer(Flexmojos4GenerateConfigTask.java:198)
    at com.intellij.javascript.flex.maven.Flexmojos4GenerateConfigTask.perform(Flexmojos4GenerateConfigTask.java:80)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.doProcessPendingTasks(MavenProjectsProcessor.java:131)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor.access$100(MavenProjectsProcessor.java:28)
    at org.jetbrains.idea.maven.project.MavenProjectsProcessor$2.run(MavenProjectsProcessor.java:107)
    at org.jetbrains.idea.maven.utils.MavenUtil$9.run(MavenUtil.java:433)
    at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:454)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:724)
    at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:152)
2013-08-13 16:35:34,536 [1978501]  ERROR -      #org.jetbrains.idea.maven - IntelliJ IDEA 12.1.4  Build #IU-129.713 
2013-08-13 16:35:34,536 [1978501]  ERROR -      #org.jetbrains.idea.maven - JDK: 1.7.0_25 
2013-08-13 16:35:34,536 [1978501]  ERROR -      #org.jetbrains.idea.maven - VM: Java HotSpot(TM) 64-Bit Server VM 
2013-08-13 16:35:34,536 [1978501]  ERROR -      #org.jetbrains.idea.maven - Vendor: Oracle Corporation 
2013-08-13 16:35:34,536 [1978501]  ERROR -      #org.jetbrains.idea.maven - OS: Windows 7 
2013-08-13 16:35:34,536 [1978501]  ERROR -      #org.jetbrains.idea.maven - Last Action: SaveAll 
2013-08-13 16:35:34,537 [1978502]   WARN -      #org.jetbrains.idea.maven - Generating flex configs exited with exit code 1 
2013-08-13 16:35:34,537 [1978502]   INFO -      #org.jetbrains.idea.maven - Generating flex configs out:
java.lang.NoClassDefFoundError: org/sonatype/aether/RepositorySystemSession

    at java.lang.Class.getDeclaredMethods0(Native Method)

    at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)

    at java.lang.Class.getMethod0(Class.java:2764)

    at java.lang.Class.getMethod(Class.java:1653)

    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)

    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)

Caused by: java.lang.ClassNotFoundException: org.sonatype.aether.RepositorySystemSession

    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)

    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

    at java.security.AccessController.doPrivileged(Native Method)

    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)

    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

    ... 6 more

Exception in thread "main"  
2013-08-13 16:35:35,036 [1979001]   INFO -      #org.jetbrains.idea.maven - Generating flex configs took 824 ms: 0 min 0sec 

EDIT: A typical child pom file has no build tag, it is supposed to inherit it from the base pom, they still have packaging 'swc' though.

Base pom has:

<flexmojos.version>4.2-beta</flexmojos.version>
<playerglobal.version>11.0</playerglobal.version>
<flexunit.version>4.1.0.8</flexunit.version>
<flex.sdk.version>4.5.1.21328</flex.sdk.version>
<flexpmd.version>1.2</flexpmd.version>

The full base pom:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.XXXXXX</groupId>
    <artifactId>config</artifactId>
    <version>1.1.3-SNAPSHOT</version>
    <packaging>pom</packaging>

    <name>Toolbox - Config</name>

    <properties>

        <build.debug>false</build.debug>
        <swf.version>13</swf.version>

        <flex.flashPlayer.command>C:\FlashPlayer.exe</flex.flashPlayer.command>
        <flexmojos.version>4.2-beta</flexmojos.version>
        <playerglobal.version>11.0</playerglobal.version>
        <flexunit.version>4.1.0.8</flexunit.version>
        <flex.sdk.version>4.5.1.21328</flex.sdk.version>
        <flexpmd.version>1.2</flexpmd.version>

        <path.source>src</path.source>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <scm>
        <connection>scm:svn:XXXXXX</connection>
    </scm>

    <build>
        <sourceDirectory>${path.source}</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <version>${flexmojos.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <swfVersion>${swf.version}</swfVersion>
                    <compilerWarnings>
                        <warn-no-constructor>false</warn-no-constructor>
                    </compilerWarnings>
                    <dumpConfigAttach>false</dumpConfigAttach>
                    <verboseStacktraces>${build.debug}</verboseStacktraces>
                    <debug>${build.debug}</debug>
                    <!--<coverage>${build.debug}</coverage>-->
                    <defines>
                        <property>
                            <name>CONFIG::debug</name>
                            <value>${build.debug}</value>
                        </property>
                    </defines>
                    <storepass>true</storepass>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>${flex.sdk.version}</version>
                        <type>pom</type>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>com.googlecode.apparat</groupId>
                <artifactId>apparat-maven-plugin</artifactId>
                <version>1.0-RC9</version>
                <executions>
                    <execution>
                        <id>tdsi-package</id>
                        <goals>
                            <goal>tdsi</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <alchemyExpansion>false</alchemyExpansion>
                    <inlineExpansion>true</inlineExpansion>
                    <macroExpansion>true</macroExpansion>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.adobe.ac</groupId>
                <artifactId>flex-pmd-maven-plugin</artifactId>
                <version>${flexpmd.version}</version>
                <configuration>
                    <ruleSet>../../pmd-ruleset.xml</ruleSet>
                </configuration>
                <executions>
                    <execution>
                        <phase>site</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.adobe.ac</groupId>
                <artifactId>flex-pmd-cpd-maven-plugin</artifactId>
                <version>${flexpmd.version}</version>
                <configuration>
                    <minimumTokenCount>50</minimumTokenCount>
                </configuration>
                <executions>
                    <execution>
                        <phase>site</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.adobe.ac</groupId>
                <artifactId>flex-pmd-metrics-maven-plugin</artifactId>
                <version>${flexpmd.version}</version>
                <executions>
                    <execution>
                        <phase>site</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>debug</id>
            <properties>
                <build.debug>true</build.debug>
            </properties>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>snapshot</id>
            <name>XXXXX</name>
            <url>XXXXXX</url>
        </snapshotRepository>
        <repository>
            <id>release</id>
            <name>XXXXXX</name>
            <url>XXXXXX</url>
        </repository>
    </distributionManagement>

    <pluginRepositories>
        <pluginRepository>
            <id>flex-mojos-plugin-repository</id>
            <url>https://repository.sonatype.org/content/groups/flexgroup/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>XXXXX</id>
            <url>XXXXXXX</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </pluginRepository>
        <pluginRepository>
            <id>flexpmd.opensource.adobe</id>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <name>FlexPMD repository on opensource.adobe.com</name>
            <url>http://opensource.adobe.com/svn/opensource/flexpmd/maven-repository/release/</url>
        </pluginRepository>
    </pluginRepositories>

    <repositories>
        <repository>
            <id>XXXXX</id>
            <url>XXXXXX</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
        <repository>
            <id>flex-mojos-plugin-repository</id>
            <url>https://repository.sonatype.org/content/groups/flexgroup/</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>
    </repositories>
</project>
like image 555
Johan Tidén Avatar asked Dec 26 '22 22:12

Johan Tidén


1 Answers

It is bug due to "The switch in the core from Sonatype Aether to Eclipse Aether." since maven 3.1. Please watch&vote http://youtrack.jetbrains.com/issue/IDEA-112107.

like image 155
develar Avatar answered Apr 25 '23 01:04

develar