You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Thomas Tardy <th...@gmail.com> on 2008/02/01 09:24:39 UTC

Count line of code

Hi all,

is there a convenient way to count the line of codes during the maven build?

Kind Regards,
Thomas

Re: Count line of code

Posted by Scott Ryan <sr...@gmail.com>.
You can also try the NCSS plugin at:

http://mojo.codehaus.org/javancss-maven-plugin/index.html


Scott Ryan
CTO Soaring Eagle L.L.C.
Denver, Co. 80129
www.soaringeagleco.com
www.theryansplace.com
(303) 263-3044
scott@theryansplace.com



On Feb 1, 2008, at 1:30 AM, <ni...@planet.nl> wrote:

> Yes, there is. Take a look at the StatSCM Maven Plugin [1].
>
> Hth,
>
> Nick Stolwijk
>
> [1] http://stat-scm.sourceforge.net/
>
>
> -----Original Message-----
> From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> Sent: Fri 2/1/2008 9:24 AM
> To: Maven Users List
> Subject: Count line of code
>
> Hi all,
>
> is there a convenient way to count the line of codes during the  
> maven build?
>
> Kind Regards,
> Thomas
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Cannot invoke Tomcat manager Embedded error: "Server redirected too many

Posted by "VanIngen, Erik (ESTG)" <Er...@fao.org>.
Hi all,

I am using maven tomcat:deploy to deploy. It worked fine but now I am having
this error:

Cannot invoke Tomcat manager Embedded error: "Server redirected too many
times (20)

Does anyone have an idea?

Kind Regards,
Erik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: Count line of code

Posted by ni...@planet.nl.
If you look at the report, you should see an explanation section, see also [1].

In short:
Non Commenting Source Statements (NCSS)

Statements for JavaNCSS are not statements as specified in the Java Language Specification but include all kinds of declarations too. Roughly spoken, NCSS is approximately equivalent to counting ';' and '{' characters in Java source files.

Cyclomatic Complexity Number (CCN)

CCN is also know as McCabe Metric. There exists a much hyped theory behind it based on graph theory, but it all comes down to simply counting 'if', 'for', 'while' statements etc. in a method. Whenever the control flow of a method splits, the "CCN counter" gets incremented by one.

Hth,

Nick Stolwijk

[1] http://mojo.codehaus.org/javancss-maven-plugin/reports/javancss-report.html#explanation


-----Original Message-----
From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
Sent: Fri 2/1/2008 2:37 PM
To: Maven Users List
Subject: Re: Count line of code
 
I got it working. Does anybody know where I can see the line of codes? Is it
the NCSS total information?

On Feb 1, 2008 2:22 PM, <ni...@planet.nl> wrote:

> I think this is the same problem as MJNCSS-16 [1], which has the following
> comment:
>
> > Thanks for the report.
> > Unfortunatly, as of today, we can't do much since the problem lies
> within javancss core library, beside sending a bug report to the original
> author of javancss :
> > http://www.kclee.de/clemens/java/javancss/
> > Btw we are using the latest available version of it (28.49).
>
> Hth,
>
> Nick Stolwijk
>
> [1] http://jira.codehaus.org/browse/MJNCSS-16
>
> -----Original Message-----
> From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> Sent: Fri 2/1/2008 1:35 PM
> To: Maven Users List
> Subject: Re: Count line of code
>
> I'm using beta-2 and yes, we are using annotations.
>
> On Feb 1, 2008 1:12 PM, <ni...@planet.nl> wrote:
>
> > I guess your problem is caused by annotations:
> >
> > > Encountered "@" at line 71, column 17.
> >
> > What version of the plugin are you using? There seems to be a beta-1 and
> a
> > beta-2. The beta-2 has better annotation support.
> >
> > Hth,
> >
> > Nick Stolwijk
> >
> > -----Original Message-----
> > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > Sent: Fri 2/1/2008 11:27 AM
> > To: Maven Users List
> > Subject: Re: Count line of code
> >
> > Hello Nick,
> >
> > I get the following error:
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Error during page generation
> >
> > Embedded error: Error rendering Maven report: Error while JavaNCSS was
> > executing
> >
> > Encountered "@" at line 71, column 17.
> > Was expecting one of:
> >    "assert" ...
> >    "boolean" ...
> >    "break" ...
> >    "byte" ...
> >    "char" ...
> >    "class" ...
> >    "continue" ...
> >    "do" ...
> >    "double" ...
> >    "enum" ...
> >    "false" ...
> >    "final" ...
> >    "float" ...
> >    "for" ...
> >    "if" ...
> >    "int" ...
> >    "interface" ...
> >    "long" ...
> >    "new" ...
> >    "null" ...
> >    "return" ...
> >    "short" ...
> >    "super" ...
> >    "switch" ...
> >    "synchronized" ...
> >    "this" ...
> >    "throw" ...
> >    "true" ...
> >    "try" ...
> >    "void" ...
> >    "while" ...
> >    <INTEGER_LITERAL> ...
> >    <FLOATING_POINT_LITERAL> ...
> >    <CHARACTER_LITERAL> ...
> >    <STRING_LITERAL> ...
> >    <IDENTIFIER> ...
> >    "(" ...
> >    "{" ...
> >    "}" ...
> >    ";" ...
> >    "++" ...
> >    "--" ...
> >
> > Any idea what the problem could be?
> >
> > Regards,
> > Thomas
> >
> > On Feb 1, 2008 10:20 AM, Erez Nahir <er...@gmail.com> wrote:
> >
> > > And: http://mojo.codehaus.org/javancss-maven-plugin/
> > >
> > > Erez.
> > >
> > > On Feb 1, 2008 10:30 AM, <ni...@planet.nl> wrote:
> > >
> > > > Yes, there is. Take a look at the StatSCM Maven Plugin [1].
> > > >
> > > > Hth,
> > > >
> > > > Nick Stolwijk
> > > >
> > > > [1] http://stat-scm.sourceforge.net/
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > > > Sent: Fri 2/1/2008 9:24 AM
> > > > To: Maven Users List
> > > > Subject: Count line of code
> > > >
> > > > Hi all,
> > > >
> > > > is there a convenient way to count the line of codes during the
> maven
> > > > build?
> > > >
> > > > Kind Regards,
> > > > Thomas
> > > >
> > > >
> > >
> >
> >
>
>


Re: Count line of code

Posted by Thomas Tardy <th...@gmail.com>.
I got it working. Does anybody know where I can see the line of codes? Is it
the NCSS total information?

On Feb 1, 2008 2:22 PM, <ni...@planet.nl> wrote:

> I think this is the same problem as MJNCSS-16 [1], which has the following
> comment:
>
> > Thanks for the report.
> > Unfortunatly, as of today, we can't do much since the problem lies
> within javancss core library, beside sending a bug report to the original
> author of javancss :
> > http://www.kclee.de/clemens/java/javancss/
> > Btw we are using the latest available version of it (28.49).
>
> Hth,
>
> Nick Stolwijk
>
> [1] http://jira.codehaus.org/browse/MJNCSS-16
>
> -----Original Message-----
> From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> Sent: Fri 2/1/2008 1:35 PM
> To: Maven Users List
> Subject: Re: Count line of code
>
> I'm using beta-2 and yes, we are using annotations.
>
> On Feb 1, 2008 1:12 PM, <ni...@planet.nl> wrote:
>
> > I guess your problem is caused by annotations:
> >
> > > Encountered "@" at line 71, column 17.
> >
> > What version of the plugin are you using? There seems to be a beta-1 and
> a
> > beta-2. The beta-2 has better annotation support.
> >
> > Hth,
> >
> > Nick Stolwijk
> >
> > -----Original Message-----
> > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > Sent: Fri 2/1/2008 11:27 AM
> > To: Maven Users List
> > Subject: Re: Count line of code
> >
> > Hello Nick,
> >
> > I get the following error:
> > [INFO]
> > ------------------------------------------------------------------------
> > [ERROR] BUILD ERROR
> > [INFO]
> > ------------------------------------------------------------------------
> > [INFO] Error during page generation
> >
> > Embedded error: Error rendering Maven report: Error while JavaNCSS was
> > executing
> >
> > Encountered "@" at line 71, column 17.
> > Was expecting one of:
> >    "assert" ...
> >    "boolean" ...
> >    "break" ...
> >    "byte" ...
> >    "char" ...
> >    "class" ...
> >    "continue" ...
> >    "do" ...
> >    "double" ...
> >    "enum" ...
> >    "false" ...
> >    "final" ...
> >    "float" ...
> >    "for" ...
> >    "if" ...
> >    "int" ...
> >    "interface" ...
> >    "long" ...
> >    "new" ...
> >    "null" ...
> >    "return" ...
> >    "short" ...
> >    "super" ...
> >    "switch" ...
> >    "synchronized" ...
> >    "this" ...
> >    "throw" ...
> >    "true" ...
> >    "try" ...
> >    "void" ...
> >    "while" ...
> >    <INTEGER_LITERAL> ...
> >    <FLOATING_POINT_LITERAL> ...
> >    <CHARACTER_LITERAL> ...
> >    <STRING_LITERAL> ...
> >    <IDENTIFIER> ...
> >    "(" ...
> >    "{" ...
> >    "}" ...
> >    ";" ...
> >    "++" ...
> >    "--" ...
> >
> > Any idea what the problem could be?
> >
> > Regards,
> > Thomas
> >
> > On Feb 1, 2008 10:20 AM, Erez Nahir <er...@gmail.com> wrote:
> >
> > > And: http://mojo.codehaus.org/javancss-maven-plugin/
> > >
> > > Erez.
> > >
> > > On Feb 1, 2008 10:30 AM, <ni...@planet.nl> wrote:
> > >
> > > > Yes, there is. Take a look at the StatSCM Maven Plugin [1].
> > > >
> > > > Hth,
> > > >
> > > > Nick Stolwijk
> > > >
> > > > [1] http://stat-scm.sourceforge.net/
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > > > Sent: Fri 2/1/2008 9:24 AM
> > > > To: Maven Users List
> > > > Subject: Count line of code
> > > >
> > > > Hi all,
> > > >
> > > > is there a convenient way to count the line of codes during the
> maven
> > > > build?
> > > >
> > > > Kind Regards,
> > > > Thomas
> > > >
> > > >
> > >
> >
> >
>
>

RE: Count line of code

Posted by ni...@planet.nl.
I think this is the same problem as MJNCSS-16 [1], which has the following comment:

> Thanks for the report.
> Unfortunatly, as of today, we can't do much since the problem lies within javancss core library, beside sending a bug report to the original author of javancss : 
> http://www.kclee.de/clemens/java/javancss/
> Btw we are using the latest available version of it (28.49).

Hth,

Nick Stolwijk

[1] http://jira.codehaus.org/browse/MJNCSS-16

-----Original Message-----
From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
Sent: Fri 2/1/2008 1:35 PM
To: Maven Users List
Subject: Re: Count line of code
 
I'm using beta-2 and yes, we are using annotations.

On Feb 1, 2008 1:12 PM, <ni...@planet.nl> wrote:

> I guess your problem is caused by annotations:
>
> > Encountered "@" at line 71, column 17.
>
> What version of the plugin are you using? There seems to be a beta-1 and a
> beta-2. The beta-2 has better annotation support.
>
> Hth,
>
> Nick Stolwijk
>
> -----Original Message-----
> From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> Sent: Fri 2/1/2008 11:27 AM
> To: Maven Users List
> Subject: Re: Count line of code
>
> Hello Nick,
>
> I get the following error:
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error during page generation
>
> Embedded error: Error rendering Maven report: Error while JavaNCSS was
> executing
>
> Encountered "@" at line 71, column 17.
> Was expecting one of:
>    "assert" ...
>    "boolean" ...
>    "break" ...
>    "byte" ...
>    "char" ...
>    "class" ...
>    "continue" ...
>    "do" ...
>    "double" ...
>    "enum" ...
>    "false" ...
>    "final" ...
>    "float" ...
>    "for" ...
>    "if" ...
>    "int" ...
>    "interface" ...
>    "long" ...
>    "new" ...
>    "null" ...
>    "return" ...
>    "short" ...
>    "super" ...
>    "switch" ...
>    "synchronized" ...
>    "this" ...
>    "throw" ...
>    "true" ...
>    "try" ...
>    "void" ...
>    "while" ...
>    <INTEGER_LITERAL> ...
>    <FLOATING_POINT_LITERAL> ...
>    <CHARACTER_LITERAL> ...
>    <STRING_LITERAL> ...
>    <IDENTIFIER> ...
>    "(" ...
>    "{" ...
>    "}" ...
>    ";" ...
>    "++" ...
>    "--" ...
>
> Any idea what the problem could be?
>
> Regards,
> Thomas
>
> On Feb 1, 2008 10:20 AM, Erez Nahir <er...@gmail.com> wrote:
>
> > And: http://mojo.codehaus.org/javancss-maven-plugin/
> >
> > Erez.
> >
> > On Feb 1, 2008 10:30 AM, <ni...@planet.nl> wrote:
> >
> > > Yes, there is. Take a look at the StatSCM Maven Plugin [1].
> > >
> > > Hth,
> > >
> > > Nick Stolwijk
> > >
> > > [1] http://stat-scm.sourceforge.net/
> > >
> > >
> > > -----Original Message-----
> > > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > > Sent: Fri 2/1/2008 9:24 AM
> > > To: Maven Users List
> > > Subject: Count line of code
> > >
> > > Hi all,
> > >
> > > is there a convenient way to count the line of codes during the maven
> > > build?
> > >
> > > Kind Regards,
> > > Thomas
> > >
> > >
> >
>
>


Re: Count line of code

Posted by Thomas Tardy <th...@gmail.com>.
I'm using beta-2 and yes, we are using annotations.

On Feb 1, 2008 1:12 PM, <ni...@planet.nl> wrote:

> I guess your problem is caused by annotations:
>
> > Encountered "@" at line 71, column 17.
>
> What version of the plugin are you using? There seems to be a beta-1 and a
> beta-2. The beta-2 has better annotation support.
>
> Hth,
>
> Nick Stolwijk
>
> -----Original Message-----
> From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> Sent: Fri 2/1/2008 11:27 AM
> To: Maven Users List
> Subject: Re: Count line of code
>
> Hello Nick,
>
> I get the following error:
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Error during page generation
>
> Embedded error: Error rendering Maven report: Error while JavaNCSS was
> executing
>
> Encountered "@" at line 71, column 17.
> Was expecting one of:
>    "assert" ...
>    "boolean" ...
>    "break" ...
>    "byte" ...
>    "char" ...
>    "class" ...
>    "continue" ...
>    "do" ...
>    "double" ...
>    "enum" ...
>    "false" ...
>    "final" ...
>    "float" ...
>    "for" ...
>    "if" ...
>    "int" ...
>    "interface" ...
>    "long" ...
>    "new" ...
>    "null" ...
>    "return" ...
>    "short" ...
>    "super" ...
>    "switch" ...
>    "synchronized" ...
>    "this" ...
>    "throw" ...
>    "true" ...
>    "try" ...
>    "void" ...
>    "while" ...
>    <INTEGER_LITERAL> ...
>    <FLOATING_POINT_LITERAL> ...
>    <CHARACTER_LITERAL> ...
>    <STRING_LITERAL> ...
>    <IDENTIFIER> ...
>    "(" ...
>    "{" ...
>    "}" ...
>    ";" ...
>    "++" ...
>    "--" ...
>
> Any idea what the problem could be?
>
> Regards,
> Thomas
>
> On Feb 1, 2008 10:20 AM, Erez Nahir <er...@gmail.com> wrote:
>
> > And: http://mojo.codehaus.org/javancss-maven-plugin/
> >
> > Erez.
> >
> > On Feb 1, 2008 10:30 AM, <ni...@planet.nl> wrote:
> >
> > > Yes, there is. Take a look at the StatSCM Maven Plugin [1].
> > >
> > > Hth,
> > >
> > > Nick Stolwijk
> > >
> > > [1] http://stat-scm.sourceforge.net/
> > >
> > >
> > > -----Original Message-----
> > > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > > Sent: Fri 2/1/2008 9:24 AM
> > > To: Maven Users List
> > > Subject: Count line of code
> > >
> > > Hi all,
> > >
> > > is there a convenient way to count the line of codes during the maven
> > > build?
> > >
> > > Kind Regards,
> > > Thomas
> > >
> > >
> >
>
>

RE: Count line of code

Posted by ni...@planet.nl.
I guess your problem is caused by annotations:

> Encountered "@" at line 71, column 17.

What version of the plugin are you using? There seems to be a beta-1 and a beta-2. The beta-2 has better annotation support.

Hth,

Nick Stolwijk

-----Original Message-----
From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
Sent: Fri 2/1/2008 11:27 AM
To: Maven Users List
Subject: Re: Count line of code
 
Hello Nick,

I get the following error:
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error during page generation

Embedded error: Error rendering Maven report: Error while JavaNCSS was
executing

Encountered "@" at line 71, column 17.
Was expecting one of:
    "assert" ...
    "boolean" ...
    "break" ...
    "byte" ...
    "char" ...
    "class" ...
    "continue" ...
    "do" ...
    "double" ...
    "enum" ...
    "false" ...
    "final" ...
    "float" ...
    "for" ...
    "if" ...
    "int" ...
    "interface" ...
    "long" ...
    "new" ...
    "null" ...
    "return" ...
    "short" ...
    "super" ...
    "switch" ...
    "synchronized" ...
    "this" ...
    "throw" ...
    "true" ...
    "try" ...
    "void" ...
    "while" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <CHARACTER_LITERAL> ...
    <STRING_LITERAL> ...
    <IDENTIFIER> ...
    "(" ...
    "{" ...
    "}" ...
    ";" ...
    "++" ...
    "--" ...

Any idea what the problem could be?

Regards,
Thomas

On Feb 1, 2008 10:20 AM, Erez Nahir <er...@gmail.com> wrote:

> And: http://mojo.codehaus.org/javancss-maven-plugin/
>
> Erez.
>
> On Feb 1, 2008 10:30 AM, <ni...@planet.nl> wrote:
>
> > Yes, there is. Take a look at the StatSCM Maven Plugin [1].
> >
> > Hth,
> >
> > Nick Stolwijk
> >
> > [1] http://stat-scm.sourceforge.net/
> >
> >
> > -----Original Message-----
> > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > Sent: Fri 2/1/2008 9:24 AM
> > To: Maven Users List
> > Subject: Count line of code
> >
> > Hi all,
> >
> > is there a convenient way to count the line of codes during the maven
> > build?
> >
> > Kind Regards,
> > Thomas
> >
> >
>


Re: Count line of code

Posted by Thomas Tardy <th...@gmail.com>.
Hello Nick,

I get the following error:
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Error during page generation

Embedded error: Error rendering Maven report: Error while JavaNCSS was
executing

Encountered "@" at line 71, column 17.
Was expecting one of:
    "assert" ...
    "boolean" ...
    "break" ...
    "byte" ...
    "char" ...
    "class" ...
    "continue" ...
    "do" ...
    "double" ...
    "enum" ...
    "false" ...
    "final" ...
    "float" ...
    "for" ...
    "if" ...
    "int" ...
    "interface" ...
    "long" ...
    "new" ...
    "null" ...
    "return" ...
    "short" ...
    "super" ...
    "switch" ...
    "synchronized" ...
    "this" ...
    "throw" ...
    "true" ...
    "try" ...
    "void" ...
    "while" ...
    <INTEGER_LITERAL> ...
    <FLOATING_POINT_LITERAL> ...
    <CHARACTER_LITERAL> ...
    <STRING_LITERAL> ...
    <IDENTIFIER> ...
    "(" ...
    "{" ...
    "}" ...
    ";" ...
    "++" ...
    "--" ...

Any idea what the problem could be?

Regards,
Thomas

On Feb 1, 2008 10:20 AM, Erez Nahir <er...@gmail.com> wrote:

> And: http://mojo.codehaus.org/javancss-maven-plugin/
>
> Erez.
>
> On Feb 1, 2008 10:30 AM, <ni...@planet.nl> wrote:
>
> > Yes, there is. Take a look at the StatSCM Maven Plugin [1].
> >
> > Hth,
> >
> > Nick Stolwijk
> >
> > [1] http://stat-scm.sourceforge.net/
> >
> >
> > -----Original Message-----
> > From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> > Sent: Fri 2/1/2008 9:24 AM
> > To: Maven Users List
> > Subject: Count line of code
> >
> > Hi all,
> >
> > is there a convenient way to count the line of codes during the maven
> > build?
> >
> > Kind Regards,
> > Thomas
> >
> >
>

Re: Count line of code

Posted by Erez Nahir <er...@gmail.com>.
And: http://mojo.codehaus.org/javancss-maven-plugin/

Erez.

On Feb 1, 2008 10:30 AM, <ni...@planet.nl> wrote:

> Yes, there is. Take a look at the StatSCM Maven Plugin [1].
>
> Hth,
>
> Nick Stolwijk
>
> [1] http://stat-scm.sourceforge.net/
>
>
> -----Original Message-----
> From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
> Sent: Fri 2/1/2008 9:24 AM
> To: Maven Users List
> Subject: Count line of code
>
> Hi all,
>
> is there a convenient way to count the line of codes during the maven
> build?
>
> Kind Regards,
> Thomas
>
>

RE: Count line of code

Posted by ni...@planet.nl.
Yes, there is. Take a look at the StatSCM Maven Plugin [1].

Hth,

Nick Stolwijk

[1] http://stat-scm.sourceforge.net/


-----Original Message-----
From: Thomas Tardy [mailto:thomas.tardy@gmail.com]
Sent: Fri 2/1/2008 9:24 AM
To: Maven Users List
Subject: Count line of code
 
Hi all,

is there a convenient way to count the line of codes during the maven build?

Kind Regards,
Thomas