Hi Ryan,
nice work around, thanks.
VELO, I'm no expert at java and/or making maven plugins and the maven plugin
API, however I will have a go at suggesting a patch. It might take a while
though.
Conrad
On 13 Dec 2010, at 22:54, Ryan Gardner wrote:
> I'd comment on the Jira issue but it is taking forever to reset my password.
>
> I was able to get it to work just fine by changing the project to use
> ${project.build.sourceDirectory} in the properties instead of /src/main/flex
>
> The compcMojo.java on line 287 says:
>
> PathUtil.file( path, getResourcesTargetDirectories() );
>
> It looks like it's trying to resolve the given path either as an absolute
> path or with the tarrget resources directory- so it looks like it is
> currently designed to not want relative paths...
>
> The workaround I would suggest is to use the placeholder like I mention.
>
> Ryan
>
> On Mon, Dec 13, 2010 at 1:29 PM, Marvin Froeder <[email protected]> wrote:
> Ok, lemme know when you file a patch for it.
>
> VELO
>
>
> On Mon, Dec 13, 2010 at 6:25 PM, Conrad Winchester
> <[email protected]> wrote:
> Hi managed to find issues.sonatype.org and sign up. Have reported the issue
>
> https://issues.sonatype.org/browse/FLEXMOJOS-375
>
> Thanks
>
> Conrad
> On 12 Dec 2010, at 19:49, Conrad Winchester wrote:
>
>> Hi,
>>
>> I think I have identified a bug in flexmojos 4 beta 4 on a mac running os x
>> 10.6.5 and maven 3.0.1
>>
>> Inside properties I have
>>
>> <properties>
>>
>> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
>> <flex.sdk.version>4.1.0.16076</flex.sdk.version>
>> <flexmojos.version>4.0-beta-4</flexmojos.version>
>> <flexunit.version>4.1.0-beta3</flexunit.version>
>>
>>
>> <library.namespace.uri>library://www.dz015.com/ns</library.namespace.uri>
>>
>> <library.manifest.file>src/main/flex/manifest.xml</library.manifest.file>
>> <library.design.file>src/main/flex/design.xml</library.design.file>
>>
>> <library.defaults.css>src/main/flex/defaults.css</library.defaults.css>
>>
>> </properties>
>>
>>
>> Inside the build configuration I have
>>
>> <includeNamespaces>
>> <namespace>${library.namespace.uri}</namespace>
>> </includeNamespaces>
>>
>> and
>>
>> <includeStylesheets>
>> <stylesheet>
>> <name>defaults.css</name>
>> <path>${library.defaults.css}</path>
>> </stylesheet>
>> </includeStylesheets>
>>
>> If I try to build it I get a null pointer exception (see after this email
>> for error output with 'mvn -e -X compile'). If I make both of the file
>> references (library.default.css and library.namespaice.uri) absolute from
>> the root then the error does not occur. If I make the file reference
>> absolute, but spelt wrong the I get a 'can not find file' error. And so this
>> only happens with relative file references.
>>
>> I have attached my project (its very simple) and would appreciate any help
>> and/or acknowledgement of whether or not this is a bug - If there is a place
>> for me to report this issue then please tell me where that is.
>>
>> Thanks for any help
>>
>>
>> Conrad Winchester
>>
>> <ExampleSWCProject.zip>
>>
>> ERROR FOLLOWS >>>>>>>
>>
>> [ERROR] Failed to execute goal
>> org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-beta-4:compile-swc
>> (default-compile-swc) on project example-swc-project:
>> java.lang.reflect.InvocationTargetException: NullPointerException -> [Help 1]
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute
>> goal org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-beta-4:compile-swc
>> (default-compile-swc) on project example-swc-project:
>> java.lang.reflect.InvocationTargetException
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:203)
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
>> 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:314)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:151)
>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:445)
>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:168)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:132)
>> 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)
>> Caused by: org.apache.maven.plugin.MojoExecutionException:
>> java.lang.reflect.InvocationTargetException
>> at
>> org.sonatype.flexmojos.plugin.AbstractMavenMojo.checkResult(AbstractMavenMojo.java:278)
>> at
>> org.sonatype.flexmojos.plugin.compiler.AbstractFlexCompilerMojo.executeCompiler(AbstractFlexCompilerMojo.java:1737)
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo.execute_aroundBody0(CompcMojo.java:224)
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo.execute_aroundBody1$advice(CompcMojo.java:36)
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo.execute_aroundBody2(CompcMojo.java:218)
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo.execute_aroundBody3$advice(CompcMojo.java:14)
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo.execute_aroundBody4(CompcMojo.java:1)
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo.execute_aroundBody5$advice(CompcMojo.java:17)
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo.execute(CompcMojo.java:1)
>> at
>> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:107)
>> at
>> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:195)
>> ... 19 more
>> Caused by: java.lang.RuntimeException:
>> java.lang.reflect.InvocationTargetException
>> at
>> org.sonatype.flexmojos.compiler.util.DefaultFlexCompilerArgumentParser.getArgumentsList(DefaultFlexCompilerArgumentParser.java:56)
>> at
>> org.sonatype.flexmojos.compiler.util.DefaultFlexCompilerArgumentParser.parseArguments(DefaultFlexCompilerArgumentParser.java:38)
>> at
>> org.sonatype.flexmojos.compiler.util.DefaultFlexCompilerArgumentParser.parseArguments(DefaultFlexCompilerArgumentParser.java:33)
>> at
>> org.sonatype.flexmojos.compiler.DefaultFlexCompiler$1.command(DefaultFlexCompiler.java:38)
>> at
>> org.sonatype.flexmojos.compiler.DefaultFlexCompiler$6.run(DefaultFlexCompiler.java:134)
>> at java.lang.Thread.run(Thread.java:680)
>> Caused by: java.lang.reflect.InvocationTargetException
>> 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.sonatype.flexmojos.compiler.util.DefaultFlexCompilerArgumentParser.doGetArgs(DefaultFlexCompilerArgumentParser.java:180)
>> at
>> org.sonatype.flexmojos.compiler.util.DefaultFlexCompilerArgumentParser.getArgumentsList(DefaultFlexCompilerArgumentParser.java:52)
>> ... 5 more
>> Caused by: java.lang.NullPointerException
>> at
>> org.sonatype.flexmojos.plugin.compiler.CompcMojo$1.path(CompcMojo.java:296)
>> ... 11 more
>> [ERROR]
>> [ERROR]
>> [ERROR] For more information about the errors and possible solutions, please
>> read the following articles:
>> [ERROR] [Help 1]
>> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
>>
>>
>>
>>
>>
>
>
> --
> 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/
>
>
> --
> 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/