same problem with the 4.0-RC2 when trying to build the todo-list sample.
it seems that the problem comes from the useFinalName property
this property is set by default to true
so if you had not set a <finalName> tag in your swf pom, it throws a
NPE on the CopyMojo.java line 211:

pomProject.getBuild().getFinalName()

the workaround is to configure teh copy-flex-resources goal with
<useFinalName>false</useFinalName>

I think that Velo should switch the default value of the useFinalName
property to false to prevent this problem.

regards

remi P


On Fri, Jul 22, 2011 at 1:24 PM, Christofer Dutz
<[email protected]> wrote:
>
> Hi,
>
> I guess this problem is related to something in my build. I am getting
> this error after upgrading from FM3.7 to FM4.0-RC1 in one of my
> Projects. In another project (similar complexity) I am not getting
> this error.
>
>
> [ERROR] Failed to execute goal
> org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources
> (default) on project de.upw.tiller.pgm.webapp.blazeds.server:
> Execution default of goal
> org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources
> failed. NullPointerException -> [Help 1]
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to
> execute goal 
> org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources
> (default) on project de.upw.tiller.pgm.webapp.blazeds.server:
> Execution default of goal
> org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources
> failed.
>        at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225)
>        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:537)
>        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:597)
>        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)
>        at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
>        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:597)
>        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: org.apache.maven.plugin.PluginExecutionException: Execution
> default of goal
> org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources
> failed.
>        at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:110)
>        at 
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
>        ... 25 more
> Caused by: java.lang.NullPointerException
>        at 
> org.sonatype.flexmojos.plugin.war.CopyMojo.getDestinationFile(CopyMojo.java:211)
>        at 
> org.sonatype.flexmojos.plugin.war.CopyMojo.execute_aroundBody0(CopyMojo.java:144)
>        at 
> org.sonatype.flexmojos.plugin.war.CopyMojo.execute_aroundBody1$advice(CopyMojo.java:24)
>        at 
> org.sonatype.flexmojos.plugin.war.CopyMojo.execute_aroundBody2(CopyMojo.java:124)
>        at 
> org.sonatype.flexmojos.plugin.war.CopyMojo.execute_aroundBody3$advice(CopyMojo.java:17)
>        at org.sonatype.flexmojos.plugin.war.CopyMojo.execute(CopyMojo.java:1)
>        at 
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
>        ... 26 more
>
> I Debugged this a few days ago and could see that the problem is
> related to pomProject.getBuild() returning null. It would be great, if
> FM would be a little more verbouse with such errors. Currently I have
> no idea what's actually wrong.
>
> Chris
>
> --
> You received this message because you are subscribed to the Google
> Groups "Flex Mojos" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/flex-mojos
>
> http://flexmojos.sonatype.org/

-- 
You received this message because you are subscribed to the Google
Groups "Flex Mojos" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex-mojos

http://flexmojos.sonatype.org/

Reply via email to