我正在尝试使用maven 2 firsttime创建和构建一个flex库项目(.swc)。 我能够创建目录结构,但构建失败。
我的maven设置是: Maven版本:apache-maven-3.0.2
根据我的需要创建了基本的项目框架。
执行此命令时,我遇到异常。
[ERROR] Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-pre-alpha-1:compile-swc (default-compile-swc) on project sampleflexproject2: The parameters 'output' for goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-pre-alpha-1:compile-swc are missing or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException:
Failed to execute goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-pre-alpha-1:compile-swc (default-compile-swc) on project sampleflexproject2: The parameters 'output' for goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-pre-alpha-1:compile-swc are missing or invalid
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:319)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:534)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: org.apache.maven.plugin.PluginParameterException:
The parameters 'out put' for goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-pre-alpha-1:compile-swc are missing or invalid
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.validateParameters(DefaultMavenPluginManager.java:688)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.populatePluginFields(DefaultMavenPluginManager.java:580)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:525)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:98)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
你能预见到这个问题吗?
答案 0 :(得分:0)
请发布简化版的POM。
问题似乎是你缺少flexmojos-maven-plugin的一些配置。它抱怨目标default-compile-swc没有定义输出属性。
看看你的插件定义:
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>4.0-pre-alpha-1</version>
<configuration>
<output>${basedir}/target/sampleflexproject2.swf</output>
</configuration>
</plugin>
虽然这可能不足以成功构建。
请查看https://repository.sonatype.org/content/sites/maven-sites/flexmojos/4.0-RC1/compile-swc-mojo.html,了解有关配置块中应设置内容的更多信息。