gpt4 book ai didi

maven - IntelliJ、Maven、Flexmojos - 无法生成 Flex 编译器配置文件

转载 作者:行者123 更新时间:2023-12-04 22:47:33 25 4
gpt4 key购买 nike

我正在使用 Flexmojos 在 IntelliJ 设置中运行多项目构建。

所有的 flex 模块都有一个公共(public)的父 pom 文件,该文件是从 Artifactory 下载的。这种依赖关系似乎得到了正确解决,但是当我点击“重新导入所有 Maven 项目”或对任何子 pom 文件进行更改时,我得到一个错误

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

在父 pom 中定义的全局变量(使用 maven 'defines' 标签)在任何子项目中都不可见,如果我进入“项目结构”,则会出现
"Build configurations '[child artifactId]': additional compiler configuration file not found: [absolute path]"

,这是缺少配置文件的症状。

我认为这是一个设置(IntelliJ?Maven?Java?)问题,因为我的同事有来自 SVN 的相同代码并且没有相同的问题。

关于从哪里开始寻找的任何线索?

编辑:

摘自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

编辑:
一个典型的子 pom 文件没有构建标签,它应该从基础 pom 继承它,但它们仍然有包装“swc”。

基础 pom 有:
<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>

完整的基础 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>

最佳答案

这是由于“核心从 Sonatype Aether 切换到 Eclipse Aether”而导致的错误。从 Maven 3.1 开始。请关注并投票 http://youtrack.jetbrains.com/issue/IDEA-112107 .

关于maven - IntelliJ、Maven、Flexmojos - 无法生成 Flex 编译器配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18207024/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com