Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/apache-flex/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache flex 使用Maven编译多个.as文件_Apache Flex_Maven_Actionscript_Pom.xml_Flexmojos - Fatal编程技术网

Apache flex 使用Maven编译多个.as文件

Apache flex 使用Maven编译多个.as文件,apache-flex,maven,actionscript,pom.xml,flexmojos,Apache Flex,Maven,Actionscript,Pom.xml,Flexmojos,我在让maven执行简单的清洁安装时遇到问题,我遇到以下错误: 未能在project flex上执行目标org.sonatype.flexmojos:flexmojos maven插件:3.8:compile swf(默认编译swf):源文件未指定且未找到默认值!->[帮助1] 我在本网站上阅读了教程: 我所有的.as文件都位于:src/main/flex/,但问题是我没有主类,这些基本上都是接口,所以我不能只选择其中一个作为源文件 我也安装了Eclipse,它对我大喊POM的插件部分,说: M

我在让maven执行简单的
清洁安装时遇到问题,我遇到以下错误:

未能在project flex上执行目标org.sonatype.flexmojos:flexmojos maven插件:3.8:compile swf(默认编译swf):源文件未指定且未找到默认值!->[帮助1]

我在本网站上阅读了教程:

我所有的.as文件都位于:
src/main/flex/
,但问题是我没有主类,这些基本上都是接口,所以我不能只选择其中一个作为源文件

我也安装了Eclipse,它对我大喊POM的插件部分,说:

Multiple annotations found at this line:
    - Plugin execution not covered by lifecycle configuration: org.sonatype.flexmojos:flexmojos-maven-plugin:
     3.8:compile-swf (execution: default-compile-swf, phase: compile)
    - Plugin execution not covered by lifecycle configuration: org.sonatype.flexmojos:flexmojos-maven-plugin:
     3.8:test-compile (execution: default-test-compile, phase: test-compile)
因此,我不确定这是否相关,但我已经尝试从上面的链接逐字复制/粘贴代码,但我仍然得到了错误,而且那个家伙从未提及任何有关它的内容,所以可能这只是Eclipse中maven插件中的一个bug

这是我的POM.xml文件:

<?xml version="1.0"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.company</groupId>
        <artifactId>parent</artifactId>
        <version>1.0</version>
    </parent>
    <artifactId>flex</artifactId>
    <name>flex</name>
    <packaging>swf</packaging>
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencies>
        <dependency>
            <groupId>com.company</groupId>
            <artifactId>common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.adobe.flex.framework</groupId>
            <artifactId>flex-framework</artifactId>
            <version>3.6.0.16995</version>
            <type>pom</type>            
        </dependency>
    </dependencies>
    <build>
        <sourceDirectory>src/main/flex</sourceDirectory>
        <plugins>
            <plugin>
                <groupId>org.sonatype.flexmojos</groupId>
                <artifactId>flexmojos-maven-plugin</artifactId>
                <extensions>true</extensions>
                <dependencies>
                    <dependency>
                        <groupId>com.adobe.flex</groupId>
                        <artifactId>compiler</artifactId>
                        <version>3.6.0.16995</version>
                        <type>pom</type>
                    </dependency>                   
                </dependencies>             
            </plugin>
        </plugins>
    </build>
</project>

4.0.0
com公司
父母亲
1
弯曲
弯曲
主权财富基金
UTF-8
com公司
常见的
com.adobe.flex.framework
flex框架
3.6.0.16995
聚甲醛
src/main/flex
org.sonatype.flexmojos
flexmojos maven插件
真的
com.adobe.flex
编译程序
3.6.0.16995
聚甲醛
我愿意接受任何关于如何让它编译这些.as文件的想法。谢谢大家!


编辑:好吧,我想出来了。我把包装从swf换成了swc,效果很好。非常遗憾。

您需要配置标签,以便flexmojos知道从何处开始构建。(默认应用程序或主类)


org.sonatype.flexmojos
flexmojos maven插件
真的
com.adobe.flex
编译程序
Module.mxml
3.6.0.16995
聚甲醛

您需要配置标签,以便flexmojos知道从何处开始构建。(默认应用程序或主类)


org.sonatype.flexmojos
flexmojos maven插件
真的
com.adobe.flex
编译程序
Module.mxml
3.6.0.16995
聚甲醛

我将软件包从
swf
转换为
swc
,它就像一个冠军。希望这对将来的人有所帮助。

我将软件包从
swf
转换为
swc
,它就像一个冠军。希望这对将来的人有所帮助。

不幸的是,我的项目没有任何.mxml文件,只是.as文件。但我发现了。。。谢谢你的回复!是的,maven工作时是一个奇迹,不工作时是一个诅咒:)不幸的是,我的项目没有任何.mxml文件,它只是.as文件。但我发现了。。。谢谢你的回复!是的,maven成功时是个奇迹,失败时是个诅咒:)
<plugin>
            <groupId>org.sonatype.flexmojos</groupId>
            <artifactId>flexmojos-maven-plugin</artifactId>
            <extensions>true</extensions>
            <dependencies>
                <dependency>
                    <groupId>com.adobe.flex</groupId>
                    <artifactId>compiler</artifactId>
                    <configuration>
                           <sourceFile>Module.mxml</sourceFile>
                    </configuration>
                    <version>3.6.0.16995</version>
                    <type>pom</type>
                </dependency>                   
            </dependencies>             
        </plugin>