使用 org.sonatype.flexmojos 的 Flex .swc 构建失败

发布于 2024-10-14 06:48:02 字数 3603 浏览 4 评论 0原文

我正在尝试第一次使用 Maven 2 创建和构建一个 Flex 库项目(.swc)。 我能够创建目录结构,但构建失败。

我的 Maven 设置是: Maven 版本:apache-maven-3.0.2

  1. mvn archetype:generate -DarchetypeGroupId=org.sonatype.flexmojos -DarchetypeArtifactId=flexmojos-archetypes-library -Darchetype版本=3.8 -DgroupId=com.test -DartifactId=sampleflexproject2 –e

这根据我的需要创建了基本的项目框架。

  1. mvn clean install –e –X

在执行此命令时出现以下异常。

[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)

您预见到这方面有什么明显的问题吗?

I am trying to create and build a flex library project (.swc) using maven 2 firsttime.
I am able to create directory structure but build is failing.

My maven settings are :
Maven version : apache-maven-3.0.2

  1. mvn archetype:generate
    -DarchetypeGroupId=org.sonatype.flexmojos
    -DarchetypeArtifactId=flexmojos-archetypes-library
    -DarchetypeVersion=3.8
    -DgroupId=com.test
    -DartifactId=sampleflexproject2 –e

This created the basic project skeleton as per my need.

  1. mvn clean install –e –X

I get below exception while executing this command.

[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)

Do you foresee any obvious issue in this ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时间海 2024-10-21 06:48:02

请发布 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 有关应在配置块中设置的内容的更多信息。

Please post a simplified version of the POM.

The issue seems to be though that you are missing some configuration for the flexmojos-maven-plugin. It is complaining that the goal default-compile-swc has no output property defined.

Take a look at your plugin definition:

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

That though alone will probably not be sufficient for a successful build.

Take a look https://repository.sonatype.org/content/sites/maven-sites/flexmojos/4.0-RC1/compile-swc-mojo.html for more information on what should be set in the configuration block.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文