2011-01-24 84 views
1

我想用maven 2首次創建和構建一個flex庫項目(.swc)。 我能夠創建目錄結構但構建失敗。使用org.sonatype.flexmojos構建Flex .swc失敗

我的Maven的設置是: Maven的版本:Apache的行家-3.0.2

  1. MVN原型:產生 -DarchetypeGroupId = org.sonatype.flexmojos -DarchetypeArtifactId =的Flexmojos-原型庫 - DarchetypeVersion = 3.8 -DgroupId = com.test -DartifactId = sampleflexproject2 -e

這創造了基本的項目框架按照我的需要。

  1. MVN全新安裝-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) 

你預見到了任何明顯的問題?

回答

0

請發佈POM的簡化版本。

雖然您錯過了flexmojos-maven插件的一些配置,但問題似乎是。它抱怨目標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