You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Simon Moore <Si...@condisline.com> on 2002/03/21 08:27:00 UTC

RV: Maven, jdepend, decimal separator

Hi 

> I've been having a slight problem with maven (See below).
> 
> If Pete Kazmier is around, could you take a look at this ;)
> Or any else whose interested for that matter.
> 
> Thanks
> 
> (Btw Can someone point me to how I can get the source code for things like
> commons-lang, io and the jakarta-site2 module which seem to only be in cvs
> (I'm stuck behind an MS proxy and don't have cvs access, only http
> traffic)
> 
> Saimon
> -----Mensaje original-----
> De:	Jason van Zyl [SMTP:jvanzyl@zenplex.com]
> Enviado el:	miƩrcoles 20 de marzo de 2002 20:23
> Para:	Simon Moore
> Asunto:	Re: Maven, jdepend, decimal separator
> 
> On Wed, 2002-03-20 at 06:24, Simon Moore wrote:
> > Hi Jason,
> > 
> > Very sorry to email you directly but as I've joined the turbine list at
> home
> > I didn't want to join up again at work. I hope you don't mind (say so if
> you
> > do ;)
> > 
> > I've been trying out maven and I've got the maven:jar target to work no
> > problem, but when it comes to generating the metrics, I've run into a
> > problem.
> > 
> > >From the stack trace you can see that jdepend seems to generating
> numbers
> > using the comma , as the decimal separator which then causes a
> > NumberFormatException in commons.lang.Number...
> 
> Ok, this is in the velocity formatting tool. I'm in NYC for the week but
> Pete Kazmier wrote the tool that is causing the problem so just pop him
> a message and he will take care of it. Or post to the list.
> 
> > I'm in Barcelona (btw if you're ever over here for a visit, i'd love to
> meet
> > and chat about turbine etc)  and the default separator here is the comma
> (as
> > you probably know)..so you can see the problem...
> 
> I will be in Amsterdam for a small conference on April 28/29. Look for
> it on the Turbine list.
> 
> > I've got win NT 4 at work and the problem persists even though I changed
> the
> > decimal separator via the control panel. I tried setting the environment
> > variable decimal.separator=. before launching ant and adding an env task
> to
> > the metrics target but that didn't seem to help either.
> > 
> > I'm not really sure what else I can do aside from going into the
> > commons-lang code (I don't have access to cvs here (MS Proxy server) and
> I
> > can't seem to find the code on the jakarta site anyway)
> > 
> > 
> > Hope I'm not being a pain as I realise you're very busy atm...
> 
> No problem :-) I imagine the problem is in Maven somewhere. We can
> definitely figure it out.
> 
> > kind regards
> > 
> > Saimon Moore
> > 
> > (P.S. please cc this message to the turbine-user list if you can)
> > 
> > maven:docs stack trace:
> > D:\java\maven\build-metrics.xml:175:
> > org.apache.velocity.exception.MethodInvocationException: Invocation of
> > method 'applyTemplates' in  class org.apache.tools.dvsl.Transformer
> threw
> > exception class org.apache.velocity.exception.MethodInvocationException
> :
> > Invocation of method 'createNumber' in  class
> > org.apache.commons.lang.Numbers threw exception class
> > java.lang.NumberFormatException : Unable to convert: 0,22
> > 	at org.apache.tools.dvsl.DVSLTask.process(DVSLTask.java:565)
> > 	at org.apache.tools.dvsl.DVSLTask.execute(DVSLTask.java:301)
> > 	at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
> > 	at org.apache.tools.ant.Task.perform(Task.java:217)
> > 	at org.apache.tools.ant.Target.execute(Target.java:184)
> > 	at org.apache.tools.ant.Target.performTasks(Target.java:202)
> > 	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> > 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
> > 	at org.apache.tools.ant.Task.perform(Task.java:217)
> > 	at org.apache.tools.ant.Target.execute(Target.java:184)
> > 	at org.apache.tools.ant.Target.performTasks(Target.java:202)
> > 	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> > 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
> > 	at org.apache.tools.ant.Task.perform(Task.java:217)
> > 	at org.apache.tools.ant.Target.execute(Target.java:184)
> > 	at org.apache.tools.ant.Target.performTasks(Target.java:202)
> > 	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> > 	at org.apache.tools.ant.Project.executeTargets(Project.java:560)
> > 	at org.apache.tools.ant.Main.runBuild(Main.java:454)
> > 	at org.apache.tools.ant.Main.start(Main.java:153)
> > 	at org.apache.tools.ant.Main.main(Main.java:176)
> > --- Nested Exception ---
> > org.apache.velocity.exception.MethodInvocationException: Invocation of
> > method 'applyTemplates' in  class org.apache.tools.dvsl.Transformer
> threw
> > exception class org.apache.velocity.exception.MethodInvocationException
> :
> > Invocation of method 'createNumber' in  class
> > org.apache.commons.lang.Numbers threw exception class
> > java.lang.NumberFormatException : Unable to convert: 0,22
> > 	at
> >
> org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:3
> 08
> > )
> > 	at
> >
> org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.
> ja
> > va:207)
> > 	at
> >
> org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.j
> av
> > a:250)
> > 	at
> >
> org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:94)
> > 	at
> > org.apache.tools.dvsl.TemplateHandler.render(TemplateHandler.java:143)
> > 	at org.apache.tools.dvsl.Transformer.invoke(Transformer.java:204)
> > 	at org.apache.tools.dvsl.Transformer.transform(Transformer.java:189)
> > 	at org.apache.tools.dvsl.Transformer.transform(Transformer.java:167)
> > 	at org.apache.tools.dvsl.Transformer.transform(Transformer.java:153)
> > 	at org.apache.tools.dvsl.DVSL.xform(DVSL.java:471)
> > 	at org.apache.tools.dvsl.DVSL.transform(DVSL.java:491)
> > 	at org.apache.tools.dvsl.DVSLTask.transform(DVSLTask.java:586)
> > 	at org.apache.tools.dvsl.DVSLTask.process(DVSLTask.java:554)
> > 	at org.apache.tools.dvsl.DVSLTask.execute(DVSLTask.java:301)
> > 	at
> > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:104)
> > 	at org.apache.tools.ant.Task.perform(Task.java:217)
> > 	at org.apache.tools.ant.Target.execute(Target.java:184)
> > 	at org.apache.tools.ant.Target.performTasks(Target.java:202)
> > 	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> > 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
> > 	at org.apache.tools.ant.Task.perform(Task.java:217)
> > 	at org.apache.tools.ant.Target.execute(Target.java:184)
> > 	at org.apache.tools.ant.Target.performTasks(Target.java:202)
> > 	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> > 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:266)
> > 	at org.apache.tools.ant.Task.perform(Task.java:217)
> > 	at org.apache.tools.ant.Target.execute(Target.java:184)
> > 	at org.apache.tools.ant.Target.performTasks(Target.java:202)
> > 	at org.apache.tools.ant.Project.executeTarget(Project.java:601)
> > 	at org.apache.tools.ant.Project.executeTargets(Project.java:560)
> > 	at org.apache.tools.ant.Main.runBuild(Main.java:454)
> > 	at org.apache.tools.ant.Main.start(Main.java:153)
> > 	at org.apache.tools.ant.Main.main(Main.java:176)
> -- 
> jvz.
> 
> Jason van Zyl
> jvanzyl@apache.org
> 
> http://tambora.zenplex.org

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: RV: Maven, jdepend, decimal separator

Posted by Pete Kazmier <pe...@kazmier.com>.
Fixed.  

The class used previously to create Numbers did not take into account
the default locale.  It has been replaced with java.text.DecimalFormat.
Let me know if that fixes your problem.

Thanks for reporting the issue,
Pete

On Thu, Mar 21, 2002 at 08:27:00AM +0100, Simon Moore wrote:
> > > Invocation of method 'createNumber' in  class
> > > org.apache.commons.lang.Numbers threw exception class
> > > java.lang.NumberFormatException : Unable to convert: 0,22
> > > 	at org.apache.tools.dvsl.DVSLTask.process(DVSLTask.java:565)
> > > 	at org.apache.tools.dvsl.DVSLTask.execute(DVSLTask.java:301)
> > > 	at

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>