I think we can probably make the startup property exception a warning and just 
ignore the argument. The application itself should be checking for required 
arguments anyways, so this should be OK.

Re: PIVOT-383 - you are welcome to re-assign this to yourself and move it to a 
different version if you would like.

G

On Apr 13, 2010, at 6:44 AM, Sandro Martini wrote:

> 
> Hi to all,
> I'm doing some experiments with Scala and Pivot, and in standard (Eclipse)
> projects all starts th work good.
> But I have a problem when these projects are handled by Maven, when I run
> the application I get this error (with some additional log info added
> temporary in DesktopApplicationContext):
> 
> 13-apr-2010 12.01.23 - Scala Application Started (main class
> scavot.experiments.scala_use_pivot.HelloJavaApp)
> Startup property 1: "-target:jvm-1.5"
> 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_scala_tools_maven_executions.MainHelper.runMain(MainHelper.java:151)
>       at
> org_scala_tools_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
> Caused by: java.lang.IllegalArgumentException: Startup property names must
> begin with "--".
>       at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source)
>       at org.apache.pivot.wtk.DesktopApplicationContext.main(Unknown Source)
>       at
> scavot.experiments.scala_use_pivot.HelloJavaApp$.main(HelloJavaApp.scala:15)
>       at 
> scavot.experiments.scala_use_pivot.HelloJavaApp.main(HelloJavaApp.scala)
>       ... 6 more
> 
> This is something related to maven and scala, ok ... and so my proposal of a
> little patch (useful to all, for the 1.5 release !!):
> what do you think on make the generated IllegalArgumentException give more
> detail to the user, reporting the wrong argument inside the message, like
> adding at the end of message " and not <the given argument>".
> In any case this could be useful, a lot when Pivot sources are not available
> (as currently is using Maven).
> 
> After this, to make this type of applications run, what do you think on
> wrapping the generation of the  IllegalArgumentException so the application
> can report it but discard and continue its execution ?
> If not I'll have to extend DesktopApplicationContext to provide this feature
> ... and also this could makes sense.
> 
> 
> Sorry, a last thing on maven, and our ticket PIVOT-383 (Greg has this
> assigned):
> someone is working on it ? I've seen it has been moved to the (future)
> release 2.1, but why ?
> Tell me if I can help in this, if possible also for the 1.5.
> 
> 
> 
> If someone is interested I can post the Scala-converted samples (at the
> moment only HelloJava and HelloWTKX). Or if the Scala license is compatible
> with ours (Apache) maybe I could put in a custom folder out of trunk ...
> 
> Tell me what you think.
> 
> Bye,
> Sandro
> 
> -- 
> View this message in context: 
> http://n3.nabble.com/Little-change-in-DesktopApplicationContext-for-Startup-Properties-tp715672p715672.html
> Sent from the Apache Pivot - Developers mailing list archive at Nabble.com.

Reply via email to