You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Quintin Beukes <qu...@skywalk.co.za> on 2009/09/29 10:32:05 UTC

Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Yes, writing an ant script that merges projects into a temporary place
is an ugly solution.

What are you using for the code quality analysis?

Quintin Beukes



On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
<ra...@bertelsmann.de> wrote:
>
> Hi all!
>
> I´m stuck with following problem:
>
> My Project consists of about 150 Maven projects. All of them are somehow
> dependent on each other.
> I´m able to build and analyze code quality for every single project.
> But to analyze special metrics I need all source code together in one
> folder. And there´s my problem.
>
> I could create a stupid dummy ant script that copies every code from
> /src/main/java to the common source folder. And then I start analyzing this.
> But that´s not really what I want. Apart from that I do need a new pom.xml
> for the new all-embracing project. And then I´m at the point where I have to
> copy/paste the source code from the single projects to the "big" project.
>
> I thought about using module for solving my problem, but I don´t know if
> that suits my needs?
>
> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar as
> code quality analyzer.
> Our platform is Windows.
>
> Does anyone have some suggestions or best practices for my problem?
> I´m sure I´m not the first one facing such problems.
>
> The main pre-conditions for the solution are:
> - I don´t want to change the structure of my projects (e.g. merge some
> projects together)
> - I´d like to use as many native Maven tools as possible (plugins,
> techniques like modules, ...) and avoid using handmade solutions like
> copy&paste or writing ant scripts
>
> Thanks already!
> --
> View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Luca Li Greci <lu...@gmail.com>.
2009/9/29 Luca Li Greci <lu...@gmail.com>

>
>
> 2009/9/29 ifsNabble <ra...@bertelsmann.de>
>
>>
>> Hi Quintin,
>>
>> I´m starting automatic build in Hudson with Maven target "mvn compile".
>> Then all tests are run and with Sonar-Plugin the code quality is anlyzed
>> and
>> published in Sonar.
>> The quality metrics rely on JUnit (-> Surefire), PMD, Cobertura etc. and
>> some specialties where object coupling, depth of inheritance tree etc. is
>> computed.
>> And for these special metrics I need all code together during compilation.
>>
>> Ralf
>>
>>
> Hi Quintin,
>
> We had the same problem, this because Cobertura doesn't provide a
> configuration params to "aggregate" the results (even the dashboard plugin
> didn't sort out our problem. ), moreover the Cobertura Maven Plugin is not
> in line with the version available on the Cobertura site.
>
> We decided to write an ANT script that instruments the jars file and we
> used maven-source-plugin to provide the source code. At the end the report
> shows the classes metrix.
>
> When we add a new project we don't need to do anythink, the ANT script
> instruments all the jars and the maven-source-plugin is configured in the
> parent module.
>
> Best regards
>
> Luca
>


... I mean... I Ralf....

sorry about that...

Luca


>
>> Quintin Beukes-2 wrote:
>> >
>> > Yes, writing an ant script that merges projects into a temporary place
>> > is an ugly solution.
>> >
>> > What are you using for the code quality analysis?
>> >
>> > Quintin Beukes
>> >
>> >
>> >
>> > On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
>> > <ra...@bertelsmann.de> wrote:
>> >>
>> >> Hi all!
>> >>
>> >> I´m stuck with following problem:
>> >>
>> >> My Project consists of about 150 Maven projects. All of them are
>> somehow
>> >> dependent on each other.
>> >> I´m able to build and analyze code quality for every single project.
>> >> But to analyze special metrics I need all source code together in one
>> >> folder. And there´s my problem.
>> >>
>> >> I could create a stupid dummy ant script that copies every code from
>> >> /src/main/java to the common source folder. And then I start analyzing
>> >> this.
>> >> But that´s not really what I want. Apart from that I do need a new
>> >> pom.xml
>> >> for the new all-embracing project. And then I´m at the point where I
>> have
>> >> to
>> >> copy/paste the source code from the single projects to the "big"
>> project.
>> >>
>> >> I thought about using module for solving my problem, but I don´t know
>> if
>> >> that suits my needs?
>> >>
>> >> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar
>> as
>> >> code quality analyzer.
>> >> Our platform is Windows.
>> >>
>> >> Does anyone have some suggestions or best practices for my problem?
>> >> I´m sure I´m not the first one facing such problems.
>> >>
>> >> The main pre-conditions for the solution are:
>> >> - I don´t want to change the structure of my projects (e.g. merge some
>> >> projects together)
>> >> - I´d like to use as many native Maven tools as possible (plugins,
>> >> techniques like modules, ...) and avoid using handmade solutions like
>> >> copy&paste or writing ant scripts
>> >>
>> >> Thanks already!
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> >> For additional commands, e-mail: users-help@maven.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> > For additional commands, e-mail: users-help@maven.apache.org
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25659063.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>
>
> --
> Victor Hugo wrote, “The future has many names: For the weak, it means the
> unattainable. For the fearful, it means the unknown. For the courageous, it
> means opportunity.”
>



-- 
Victor Hugo wrote, “The future has many names: For the weak, it means the
unattainable. For the fearful, it means the unknown. For the courageous, it
means opportunity.”

Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Luca Li Greci <lu...@gmail.com>.
2009/9/29 ifsNabble <ra...@bertelsmann.de>

>
> Hi Quintin,
>
> I´m starting automatic build in Hudson with Maven target "mvn compile".
> Then all tests are run and with Sonar-Plugin the code quality is anlyzed
> and
> published in Sonar.
> The quality metrics rely on JUnit (-> Surefire), PMD, Cobertura etc. and
> some specialties where object coupling, depth of inheritance tree etc. is
> computed.
> And for these special metrics I need all code together during compilation.
>
> Ralf
>
>
Hi Quintin,

We had the same problem, this because Cobertura doesn't provide a
configuration params to "aggregate" the results (even the dashboard plugin
didn't sort out our problem. ), moreover the Cobertura Maven Plugin is not
in line with the version available on the Cobertura site.

We decided to write an ANT script that instruments the jars file and we used
maven-source-plugin to provide the source code. At the end the report shows
the classes metrix.

When we add a new project we don't need to do anythink, the ANT script
instruments all the jars and the maven-source-plugin is configured in the
parent module.

Best regards

Luca

>
> Quintin Beukes-2 wrote:
> >
> > Yes, writing an ant script that merges projects into a temporary place
> > is an ugly solution.
> >
> > What are you using for the code quality analysis?
> >
> > Quintin Beukes
> >
> >
> >
> > On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
> > <ra...@bertelsmann.de> wrote:
> >>
> >> Hi all!
> >>
> >> I´m stuck with following problem:
> >>
> >> My Project consists of about 150 Maven projects. All of them are somehow
> >> dependent on each other.
> >> I´m able to build and analyze code quality for every single project.
> >> But to analyze special metrics I need all source code together in one
> >> folder. And there´s my problem.
> >>
> >> I could create a stupid dummy ant script that copies every code from
> >> /src/main/java to the common source folder. And then I start analyzing
> >> this.
> >> But that´s not really what I want. Apart from that I do need a new
> >> pom.xml
> >> for the new all-embracing project. And then I´m at the point where I
> have
> >> to
> >> copy/paste the source code from the single projects to the "big"
> project.
> >>
> >> I thought about using module for solving my problem, but I don´t know if
> >> that suits my needs?
> >>
> >> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar
> as
> >> code quality analyzer.
> >> Our platform is Windows.
> >>
> >> Does anyone have some suggestions or best practices for my problem?
> >> I´m sure I´m not the first one facing such problems.
> >>
> >> The main pre-conditions for the solution are:
> >> - I don´t want to change the structure of my projects (e.g. merge some
> >> projects together)
> >> - I´d like to use as many native Maven tools as possible (plugins,
> >> techniques like modules, ...) and avoid using handmade solutions like
> >> copy&paste or writing ant scripts
> >>
> >> Thanks already!
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25659063.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Victor Hugo wrote, “The future has many names: For the weak, it means the
unattainable. For the fearful, it means the unknown. For the courageous, it
means opportunity.”

Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Freddy Mallet <fr...@gmail.com>.
Hi Ralf,

You're touching a quite interesting subject as some quality metrics are
partially or even totally wrong in some cases when analyzing all Maven
projects in isolation. This is particularly true when dealing with Robert C.
Martin metrics collected for instance with JDepends library. Indeed,
Afferent and Efferent Coupling values can greatly change when you analyze
the sources of a Maven module (let's say an API) without taking into account
all the Maven modules which depend on it.

This can be also useful when you're looking for dead public methods or
looking for copy/paste between Maven modules. I haven't yet any solution to
solve this issue but, at least, I share your need.

Freddy


On Tue, Sep 29, 2009 at 12:34 PM, ifsNabble <ra...@bertelsmann.de>wrote:

>
> It´s quite simple:
> Let´s say you have a class A which is a central class in your application.
> And you have 5 Maven projects that are using the class A.
>
> If you do code analysis on Project 1 you will see that the class A is used
> by one class in project 1 - because you have only the project 1 in you
> focus.
> So you won´t assume that class a could be an important central class,
> because you don´t know the code of the other projects.
>
> So my approach is to focus every project in my application.
> In my example you will then copy all the code of Project 1, Project 2 ...
> and Project 5 into one folder and analyze it together.
> Then you will see that class A is used by many, many classes from all the
> projects. And you will know that refactoring class A isn´t dead easy,
> because now you have the overview - which you don´t have when focussing
> only
> a single project.
>
> Ralf
>
> to see which classes are using another class you have to have the code of
> both.
> If you have the classes in different Maven projects you
>
>
>
> Quintin Beukes-2 wrote:
> >
> > I don't have experience with this. Why exactly does all code need to
> > be together?
> >
> > Quintin Beukes
> >
> >
> >
> > On Tue, Sep 29, 2009 at 10:38 AM, ifsNabble
> > <ra...@bertelsmann.de> wrote:
> >>
> >> Hi Quintin,
> >>
> >> I´m starting automatic build in Hudson with Maven target "mvn compile".
> >> Then all tests are run and with Sonar-Plugin the code quality is anlyzed
> >> and
> >> published in Sonar.
> >> The quality metrics rely on JUnit (-> Surefire), PMD, Cobertura etc. and
> >> some specialties where object coupling, depth of inheritance tree etc.
> is
> >> computed.
> >> And for these special metrics I need all code together during
> >> compilation.
> >>
> >> Ralf
> >>
> >>
> >> Quintin Beukes-2 wrote:
> >>>
> >>> Yes, writing an ant script that merges projects into a temporary place
> >>> is an ugly solution.
> >>>
> >>> What are you using for the code quality analysis?
> >>>
> >>> Quintin Beukes
> >>>
> >>>
> >>>
> >>> On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
> >>> <ra...@bertelsmann.de> wrote:
> >>>>
> >>>> Hi all!
> >>>>
> >>>> I´m stuck with following problem:
> >>>>
> >>>> My Project consists of about 150 Maven projects. All of them are
> >>>> somehow
> >>>> dependent on each other.
> >>>> I´m able to build and analyze code quality for every single project.
> >>>> But to analyze special metrics I need all source code together in one
> >>>> folder. And there´s my problem.
> >>>>
> >>>> I could create a stupid dummy ant script that copies every code from
> >>>> /src/main/java to the common source folder. And then I start analyzing
> >>>> this.
> >>>> But that´s not really what I want. Apart from that I do need a new
> >>>> pom.xml
> >>>> for the new all-embracing project. And then I´m at the point where I
> >>>> have
> >>>> to
> >>>> copy/paste the source code from the single projects to the "big"
> >>>> project.
> >>>>
> >>>> I thought about using module for solving my problem, but I don´t know
> >>>> if
> >>>> that suits my needs?
> >>>>
> >>>> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar
> >>>> as
> >>>> code quality analyzer.
> >>>> Our platform is Windows.
> >>>>
> >>>> Does anyone have some suggestions or best practices for my problem?
> >>>> I´m sure I´m not the first one facing such problems.
> >>>>
> >>>> The main pre-conditions for the solution are:
> >>>> - I don´t want to change the structure of my projects (e.g. merge some
> >>>> projects together)
> >>>> - I´d like to use as many native Maven tools as possible (plugins,
> >>>> techniques like modules, ...) and avoid using handmade solutions like
> >>>> copy&paste or writing ant scripts
> >>>>
> >>>> Thanks already!
> >>>> --
> >>>> View this message in context:
> >>>>
> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
> >>>> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>>>
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>>> For additional commands, e-mail: users-help@maven.apache.org
> >>>>
> >>>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >>> For additional commands, e-mail: users-help@maven.apache.org
> >>>
> >>>
> >>>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25659063.html
> >> Sent from the Maven - Users mailing list archive at Nabble.com.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> >> For additional commands, e-mail: users-help@maven.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25660550.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Freddy Mallet <fr...@gmail.com>.
Hi Christian and Barrie,

FYI, I've just deployed on Nemo (http://nemo.sonarsource.org) a Sonar Views
plugin in a Beta version (this will be a commercial SonarSource plugin).
This plugin allows to create any kind of aggregation of technical Maven
projects. For instance you can group projects by application, applications
by team, teams by service, etc ...

I've created three views on Nemo (
http://nemo.sonarsource.org/plugins/home/views) and one of them is the
"Forges" view where all projects are grouped by forge (Apache, Codehaus,
SourceForge, ...).

On the dashboard of the "Forges" view (
http://nemo.sonarsource.org/project/index/Forges), you can see that there
are 7 795 000 physical lines under quality control, 64 842 unit tests, unit
tests require 5h11mn to be executed, etc. All classical Sonar services keep
on working on this view : TimeMachine, Violations drilldown, Hotspots, etc.

This is currently the ultimate solution to manage big aggregation trees with
hundreds of Maven projects.

regards,
Freddy

----------------------------------------
Freddy Mallet
www.SonarSource.com
Sonar.codehaus.org
http://twitter.com/FreddyMallet
----------------------------------------


On Tue, Oct 6, 2009 at 8:17 AM, Barrie Treloar <ba...@gmail.com> wrote:

> On Tue, Oct 6, 2009 at 4:05 PM, Christian Breuer <cy...@gmail.com>
> wrote:
> > <plugin>
> >              <groupId>org.codehaus.mojo</groupId>
> >              <artifactId>build-helper-maven-plugin</artifactId>
> >              <version>1.1</version>
> >              <executions>
> >                <execution>
> >                  <id>add-source</id>
> >                  <phase>generate-sources</phase>
> >                  <goals>
> >                      <goal>add-source</goal>
> >                  </goals>
> >                  <configuration>
> >                      <sources>
> >                          <source>[YOUR SOURCE DIRECTORY 2]</source>
> >                          <source>[YOUR SOURCE DIRECTORY 3]</source>
> >                      </sources>
> >                  </configuration>
> >                </execution>
> >              </executions>
> >           </plugin>
> >
> >
> http://docs.codehaus.org/display/SONAR/Collect+data#Collectdata-NonMavenprojects%28sonarlightmode%29
> >
> > best regards
>
>
> Wunderful
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Barrie Treloar <ba...@gmail.com>.
On Tue, Oct 6, 2009 at 4:05 PM, Christian Breuer <cy...@gmail.com> wrote:
> <plugin>
>              <groupId>org.codehaus.mojo</groupId>
>              <artifactId>build-helper-maven-plugin</artifactId>
>              <version>1.1</version>
>              <executions>
>                <execution>
>                  <id>add-source</id>
>                  <phase>generate-sources</phase>
>                  <goals>
>                      <goal>add-source</goal>
>                  </goals>
>                  <configuration>
>                      <sources>
>                          <source>[YOUR SOURCE DIRECTORY 2]</source>
>                          <source>[YOUR SOURCE DIRECTORY 3]</source>
>                      </sources>
>                  </configuration>
>                </execution>
>              </executions>
>           </plugin>
>
> http://docs.codehaus.org/display/SONAR/Collect+data#Collectdata-NonMavenprojects%28sonarlightmode%29
>
> best regards


Wunderful

Thanks.

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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Christian Breuer <cy...@gmail.com>.
<plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>build-helper-maven-plugin</artifactId>
              <version>1.1</version>
              <executions>
                <execution>
                  <id>add-source</id>
                  <phase>generate-sources</phase>
                  <goals>
                      <goal>add-source</goal>
                  </goals>
                  <configuration>
                      <sources>
                          <source>[YOUR SOURCE DIRECTORY 2]</source>
                          <source>[YOUR SOURCE DIRECTORY 3]</source>
                      </sources>
                  </configuration>
                </execution>
              </executions>
           </plugin>

http://docs.codehaus.org/display/SONAR/Collect+data#Collectdata-NonMavenprojects%28sonarlightmode%29

best regards
Christian

2009/10/5 Barrie Treloar <ba...@gmail.com>:
> On Sun, Oct 4, 2009 at 4:15 PM, ifsNabble <ra...@bertelsmann.de> wrote:
>>
>> Of course! Here´s the solution we found for our problem:
>>
>> As described we have the structure
>>
>> /trunk/projectA/pom.xml
>> /trunk/projectAB/pom.xml
>> /trunk/project.../pom.xml
>> /trunk/projectZ/pom.xml
>>
>> That makes us able to put a pom.xml in the highest hierarchy folder
>> (/trunk/pom.xml).
>> This pom.xml uses the maven-build-helper-plugin where you can specify
>> additional source folders.
>> And due to the fact that we´re on top of folder hierarchy we can use the
>> subfolders ("/project.../src/main/java") and create in that way a virtual
>> project with many many source folders.
>
> Could you paste the snippet of pom.xml that includes maven-build-helper-plugin.
>
> Concrete examples help people with problems trouble shoot there own :)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Barrie Treloar <ba...@gmail.com>.
On Sun, Oct 4, 2009 at 4:15 PM, ifsNabble <ra...@bertelsmann.de> wrote:
>
> Of course! Here´s the solution we found for our problem:
>
> As described we have the structure
>
> /trunk/projectA/pom.xml
> /trunk/projectAB/pom.xml
> /trunk/project.../pom.xml
> /trunk/projectZ/pom.xml
>
> That makes us able to put a pom.xml in the highest hierarchy folder
> (/trunk/pom.xml).
> This pom.xml uses the maven-build-helper-plugin where you can specify
> additional source folders.
> And due to the fact that we´re on top of folder hierarchy we can use the
> subfolders ("/project.../src/main/java") and create in that way a virtual
> project with many many source folders.

Could you paste the snippet of pom.xml that includes maven-build-helper-plugin.

Concrete examples help people with problems trouble shoot there own :)

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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by ifsNabble <ra...@bertelsmann.de>.
Of course! Here´s the solution we found for our problem:

As described we have the structure

/trunk/projectA/pom.xml
/trunk/projectAB/pom.xml
/trunk/project.../pom.xml
/trunk/projectZ/pom.xml

That makes us able to put a pom.xml in the highest hierarchy folder
(/trunk/pom.xml).
This pom.xml uses the maven-build-helper-plugin where you can specify
additional source folders.
And due to the fact that we´re on top of folder hierarchy we can use the
subfolders ("/project.../src/main/java") and create in that way a virtual
project with many many source folders.

The metrics we use work. we are now able to compute complexity of code or
inheritance and so on.
We now found out that we have about 860000 lines of code!

But some thing are still not possible: running JUnit tests for JUnit reports
or code coverage isn´t possible, because of the huge amount of test classes
we have. This would blow up our build server - or would last some weeks.

I hope you have an idea how it works.
Cheers 


baerrach wrote:
> 
> On Wed, Sep 30, 2009 at 10:53 PM, ifsNabble
> <ra...@bertelsmann.de> wrote:
>>
>> Hi Freddy,
>>
>> thanks for the hint.
>> But fortunately we don´t use Checkstyle.
>>
>> By the way: with this plugin we are able to the stuff we want.
>> My colleague tested it and it worked.
> 
> Can you supply detailed steps to educate future mailing list searches
> with similar problems.
> 
> Cheers
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25734856.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Barrie Treloar <ba...@gmail.com>.
On Wed, Sep 30, 2009 at 10:53 PM, ifsNabble
<ra...@bertelsmann.de> wrote:
>
> Hi Freddy,
>
> thanks for the hint.
> But fortunately we don´t use Checkstyle.
>
> By the way: with this plugin we are able to the stuff we want.
> My colleague tested it and it worked.

Can you supply detailed steps to educate future mailing list searches
with similar problems.

Cheers

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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by ifsNabble <ra...@bertelsmann.de>.
Hi Freddy,

thanks for the hint.
But fortunately we don´t use Checkstyle.

By the way: with this plugin we are able to the stuff we want.
My colleague tested it and it worked.

Ralf


Freddy Mallet wrote:
> 
> Hi Ralf,
> 
> FYI, the Sonar Core and most underlying Maven Quality plugins are
> compatible
> with the use of the Maven Build Helper Plugin but this is not the case of
> the Maven Checkstyle plugin :
> http://jira.codehaus.org/browse/MCHECKSTYLE-70.
> 
> 
> Freddy
> 
> ----------------------------------------
> Freddy Mallet
> www.SonarSource.com
> Sonar.codehaus.org
> http://twitter.com/FreddyMallet
> ----------------------------------------
> 
> 
> On Wed, Sep 30, 2009 at 6:56 AM, ifsNabble
> <ra...@bertelsmann.de>wrote:
> 
>>
>> The analysis is done by Sonar which takes all the configured reports and
>> the
>> source code.
>> Based on the compiled source the JDepend metrics are computed, based on
>> Cobertura report (created by maven plugin) the code coverage is computed
>> and
>> so on...
>>
>> Regarding your classpath hint:
>> I found another Maven plugin (build-helper-maven-plugin) which does
>> something like that. You can configure different source folders within
>> this
>> plugin.
>> Maybe this can be a somehow generic way to do the task without
>> copying&pasting code from one project to another.
>>
>> Our layout is
>> SVN - trunk - projectA - src - main - java
>> SVN - trunk - projectB - src - main - java
>> ...
>>
>> When placing a pom.xml in
>> SVN - trunk - pom.xml (above all other projects)
>> I ´m able to define with the maven-helper-plugin some source folders like
>> that:
>> <plugin>
>>              <groupId>org.codehaus.mojo</groupId>
>>              <artifactId>build-helper-maven-plugin</artifactId>
>>              <version>1.1</version>
>>              <executions>
>>                <execution>
>>                  <id>add-source</id>
>>                  <phase>generate-sources</phase>
>>                  <goals>
>>                      <goal>add-source</goal>
>>                  </goals>
>>                  <configuration>
>>                      <sources>
>>                          <source>projcetA/src/main/java/</source>
>>                          <source>projectB/src/main/java/</source>
>>                      </sources>
>>                  </configuration>
>>                </execution>
>>              </executions>
>>           </plugin>
>>
>> Maybe that works!?
>> A colleague of mine will find it out.
>>
>>
>> Quintin Beukes-2 wrote:
>> >
>> > OK, I understand.
>> >
>> > Of all those software systems you mentioned. Which one of them does
>> > the actual analysis? doesn't it have a feature to specify more
>> > classpaths?
>> >
>> > Quintin Beukes
>> >
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25675029.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25680960.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Freddy Mallet <fr...@gmail.com>.
Hi Ralf,

FYI, the Sonar Core and most underlying Maven Quality plugins are compatible
with the use of the Maven Build Helper Plugin but this is not the case of
the Maven Checkstyle plugin : http://jira.codehaus.org/browse/MCHECKSTYLE-70.


Freddy

----------------------------------------
Freddy Mallet
www.SonarSource.com
Sonar.codehaus.org
http://twitter.com/FreddyMallet
----------------------------------------


On Wed, Sep 30, 2009 at 6:56 AM, ifsNabble <ra...@bertelsmann.de>wrote:

>
> The analysis is done by Sonar which takes all the configured reports and
> the
> source code.
> Based on the compiled source the JDepend metrics are computed, based on
> Cobertura report (created by maven plugin) the code coverage is computed
> and
> so on...
>
> Regarding your classpath hint:
> I found another Maven plugin (build-helper-maven-plugin) which does
> something like that. You can configure different source folders within this
> plugin.
> Maybe this can be a somehow generic way to do the task without
> copying&pasting code from one project to another.
>
> Our layout is
> SVN - trunk - projectA - src - main - java
> SVN - trunk - projectB - src - main - java
> ...
>
> When placing a pom.xml in
> SVN - trunk - pom.xml (above all other projects)
> I ´m able to define with the maven-helper-plugin some source folders like
> that:
> <plugin>
>              <groupId>org.codehaus.mojo</groupId>
>              <artifactId>build-helper-maven-plugin</artifactId>
>              <version>1.1</version>
>              <executions>
>                <execution>
>                  <id>add-source</id>
>                  <phase>generate-sources</phase>
>                  <goals>
>                      <goal>add-source</goal>
>                  </goals>
>                  <configuration>
>                      <sources>
>                          <source>projcetA/src/main/java/</source>
>                          <source>projectB/src/main/java/</source>
>                      </sources>
>                  </configuration>
>                </execution>
>              </executions>
>           </plugin>
>
> Maybe that works!?
> A colleague of mine will find it out.
>
>
> Quintin Beukes-2 wrote:
> >
> > OK, I understand.
> >
> > Of all those software systems you mentioned. Which one of them does
> > the actual analysis? doesn't it have a feature to specify more
> > classpaths?
> >
> > Quintin Beukes
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25675029.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by ifsNabble <ra...@bertelsmann.de>.
The analysis is done by Sonar which takes all the configured reports and the
source code.
Based on the compiled source the JDepend metrics are computed, based on
Cobertura report (created by maven plugin) the code coverage is computed and
so on...

Regarding your classpath hint:
I found another Maven plugin (build-helper-maven-plugin) which does
something like that. You can configure different source folders within this
plugin.
Maybe this can be a somehow generic way to do the task without
copying&pasting code from one project to another.

Our layout is 
SVN - trunk - projectA - src - main - java
SVN - trunk - projectB - src - main - java
...

When placing a pom.xml in 
SVN - trunk - pom.xml (above all other projects)
I ´m able to define with the maven-helper-plugin some source folders like
that:
<plugin>
              <groupId>org.codehaus.mojo</groupId>
              <artifactId>build-helper-maven-plugin</artifactId>
              <version>1.1</version>
              <executions>
                <execution>
                  <id>add-source</id>
                  <phase>generate-sources</phase>
                  <goals>
                      <goal>add-source</goal>
                  </goals>
                  <configuration>
                      <sources>
                          <source>projcetA/src/main/java/</source>
                          <source>projectB/src/main/java/</source>
                      </sources>
                  </configuration>
                </execution>
              </executions>
           </plugin>

Maybe that works!?
A colleague of mine will find it out.


Quintin Beukes-2 wrote:
> 
> OK, I understand.
> 
> Of all those software systems you mentioned. Which one of them does
> the actual analysis? doesn't it have a feature to specify more
> classpaths?
> 
> Quintin Beukes
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25675029.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Quintin Beukes <qu...@skywalk.co.za>.
OK, I understand.

Of all those software systems you mentioned. Which one of them does
the actual analysis? doesn't it have a feature to specify more
classpaths?

Quintin Beukes



On Tue, Sep 29, 2009 at 12:34 PM, ifsNabble
<ra...@bertelsmann.de> wrote:
>
> It´s quite simple:
> Let´s say you have a class A which is a central class in your application.
> And you have 5 Maven projects that are using the class A.
>
> If you do code analysis on Project 1 you will see that the class A is used
> by one class in project 1 - because you have only the project 1 in you
> focus.
> So you won´t assume that class a could be an important central class,
> because you don´t know the code of the other projects.
>
> So my approach is to focus every project in my application.
> In my example you will then copy all the code of Project 1, Project 2 ...
> and Project 5 into one folder and analyze it together.
> Then you will see that class A is used by many, many classes from all the
> projects. And you will know that refactoring class A isn´t dead easy,
> because now you have the overview - which you don´t have when focussing only
> a single project.
>
> Ralf
>
> to see which classes are using another class you have to have the code of
> both.
> If you have the classes in different Maven projects you
>
>
>
> Quintin Beukes-2 wrote:
>>
>> I don't have experience with this. Why exactly does all code need to
>> be together?
>>
>> Quintin Beukes
>>
>>
>>
>> On Tue, Sep 29, 2009 at 10:38 AM, ifsNabble
>> <ra...@bertelsmann.de> wrote:
>>>
>>> Hi Quintin,
>>>
>>> I´m starting automatic build in Hudson with Maven target "mvn compile".
>>> Then all tests are run and with Sonar-Plugin the code quality is anlyzed
>>> and
>>> published in Sonar.
>>> The quality metrics rely on JUnit (-> Surefire), PMD, Cobertura etc. and
>>> some specialties where object coupling, depth of inheritance tree etc. is
>>> computed.
>>> And for these special metrics I need all code together during
>>> compilation.
>>>
>>> Ralf
>>>
>>>
>>> Quintin Beukes-2 wrote:
>>>>
>>>> Yes, writing an ant script that merges projects into a temporary place
>>>> is an ugly solution.
>>>>
>>>> What are you using for the code quality analysis?
>>>>
>>>> Quintin Beukes
>>>>
>>>>
>>>>
>>>> On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
>>>> <ra...@bertelsmann.de> wrote:
>>>>>
>>>>> Hi all!
>>>>>
>>>>> I´m stuck with following problem:
>>>>>
>>>>> My Project consists of about 150 Maven projects. All of them are
>>>>> somehow
>>>>> dependent on each other.
>>>>> I´m able to build and analyze code quality for every single project.
>>>>> But to analyze special metrics I need all source code together in one
>>>>> folder. And there´s my problem.
>>>>>
>>>>> I could create a stupid dummy ant script that copies every code from
>>>>> /src/main/java to the common source folder. And then I start analyzing
>>>>> this.
>>>>> But that´s not really what I want. Apart from that I do need a new
>>>>> pom.xml
>>>>> for the new all-embracing project. And then I´m at the point where I
>>>>> have
>>>>> to
>>>>> copy/paste the source code from the single projects to the "big"
>>>>> project.
>>>>>
>>>>> I thought about using module for solving my problem, but I don´t know
>>>>> if
>>>>> that suits my needs?
>>>>>
>>>>> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar
>>>>> as
>>>>> code quality analyzer.
>>>>> Our platform is Windows.
>>>>>
>>>>> Does anyone have some suggestions or best practices for my problem?
>>>>> I´m sure I´m not the first one facing such problems.
>>>>>
>>>>> The main pre-conditions for the solution are:
>>>>> - I don´t want to change the structure of my projects (e.g. merge some
>>>>> projects together)
>>>>> - I´d like to use as many native Maven tools as possible (plugins,
>>>>> techniques like modules, ...) and avoid using handmade solutions like
>>>>> copy&paste or writing ant scripts
>>>>>
>>>>> Thanks already!
>>>>> --
>>>>> View this message in context:
>>>>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
>>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25659063.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25660550.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by ifsNabble <ra...@bertelsmann.de>.
It´s quite simple: 
Let´s say you have a class A which is a central class in your application.
And you have 5 Maven projects that are using the class A.

If you do code analysis on Project 1 you will see that the class A is used
by one class in project 1 - because you have only the project 1 in you
focus.
So you won´t assume that class a could be an important central class,
because you don´t know the code of the other projects.

So my approach is to focus every project in my application.
In my example you will then copy all the code of Project 1, Project 2 ...
and Project 5 into one folder and analyze it together.
Then you will see that class A is used by many, many classes from all the
projects. And you will know that refactoring class A isn´t dead easy,
because now you have the overview - which you don´t have when focussing only
a single project.

Ralf

to see which classes are using another class you have to have the code of
both.
If you have the classes in different Maven projects you 



Quintin Beukes-2 wrote:
> 
> I don't have experience with this. Why exactly does all code need to
> be together?
> 
> Quintin Beukes
> 
> 
> 
> On Tue, Sep 29, 2009 at 10:38 AM, ifsNabble
> <ra...@bertelsmann.de> wrote:
>>
>> Hi Quintin,
>>
>> I´m starting automatic build in Hudson with Maven target "mvn compile".
>> Then all tests are run and with Sonar-Plugin the code quality is anlyzed
>> and
>> published in Sonar.
>> The quality metrics rely on JUnit (-> Surefire), PMD, Cobertura etc. and
>> some specialties where object coupling, depth of inheritance tree etc. is
>> computed.
>> And for these special metrics I need all code together during
>> compilation.
>>
>> Ralf
>>
>>
>> Quintin Beukes-2 wrote:
>>>
>>> Yes, writing an ant script that merges projects into a temporary place
>>> is an ugly solution.
>>>
>>> What are you using for the code quality analysis?
>>>
>>> Quintin Beukes
>>>
>>>
>>>
>>> On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
>>> <ra...@bertelsmann.de> wrote:
>>>>
>>>> Hi all!
>>>>
>>>> I´m stuck with following problem:
>>>>
>>>> My Project consists of about 150 Maven projects. All of them are
>>>> somehow
>>>> dependent on each other.
>>>> I´m able to build and analyze code quality for every single project.
>>>> But to analyze special metrics I need all source code together in one
>>>> folder. And there´s my problem.
>>>>
>>>> I could create a stupid dummy ant script that copies every code from
>>>> /src/main/java to the common source folder. And then I start analyzing
>>>> this.
>>>> But that´s not really what I want. Apart from that I do need a new
>>>> pom.xml
>>>> for the new all-embracing project. And then I´m at the point where I
>>>> have
>>>> to
>>>> copy/paste the source code from the single projects to the "big"
>>>> project.
>>>>
>>>> I thought about using module for solving my problem, but I don´t know
>>>> if
>>>> that suits my needs?
>>>>
>>>> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar
>>>> as
>>>> code quality analyzer.
>>>> Our platform is Windows.
>>>>
>>>> Does anyone have some suggestions or best practices for my problem?
>>>> I´m sure I´m not the first one facing such problems.
>>>>
>>>> The main pre-conditions for the solution are:
>>>> - I don´t want to change the structure of my projects (e.g. merge some
>>>> projects together)
>>>> - I´d like to use as many native Maven tools as possible (plugins,
>>>> techniques like modules, ...) and avoid using handmade solutions like
>>>> copy&paste or writing ant scripts
>>>>
>>>> Thanks already!
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
>>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>> For additional commands, e-mail: users-help@maven.apache.org
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25659063.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25660550.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by Quintin Beukes <qu...@skywalk.co.za>.
I don't have experience with this. Why exactly does all code need to
be together?

Quintin Beukes



On Tue, Sep 29, 2009 at 10:38 AM, ifsNabble
<ra...@bertelsmann.de> wrote:
>
> Hi Quintin,
>
> I´m starting automatic build in Hudson with Maven target "mvn compile".
> Then all tests are run and with Sonar-Plugin the code quality is anlyzed and
> published in Sonar.
> The quality metrics rely on JUnit (-> Surefire), PMD, Cobertura etc. and
> some specialties where object coupling, depth of inheritance tree etc. is
> computed.
> And for these special metrics I need all code together during compilation.
>
> Ralf
>
>
> Quintin Beukes-2 wrote:
>>
>> Yes, writing an ant script that merges projects into a temporary place
>> is an ugly solution.
>>
>> What are you using for the code quality analysis?
>>
>> Quintin Beukes
>>
>>
>>
>> On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
>> <ra...@bertelsmann.de> wrote:
>>>
>>> Hi all!
>>>
>>> I´m stuck with following problem:
>>>
>>> My Project consists of about 150 Maven projects. All of them are somehow
>>> dependent on each other.
>>> I´m able to build and analyze code quality for every single project.
>>> But to analyze special metrics I need all source code together in one
>>> folder. And there´s my problem.
>>>
>>> I could create a stupid dummy ant script that copies every code from
>>> /src/main/java to the common source folder. And then I start analyzing
>>> this.
>>> But that´s not really what I want. Apart from that I do need a new
>>> pom.xml
>>> for the new all-embracing project. And then I´m at the point where I have
>>> to
>>> copy/paste the source code from the single projects to the "big" project.
>>>
>>> I thought about using module for solving my problem, but I don´t know if
>>> that suits my needs?
>>>
>>> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar as
>>> code quality analyzer.
>>> Our platform is Windows.
>>>
>>> Does anyone have some suggestions or best practices for my problem?
>>> I´m sure I´m not the first one facing such problems.
>>>
>>> The main pre-conditions for the solution are:
>>> - I don´t want to change the structure of my projects (e.g. merge some
>>> projects together)
>>> - I´d like to use as many native Maven tools as possible (plugins,
>>> techniques like modules, ...) and avoid using handmade solutions like
>>> copy&paste or writing ant scripts
>>>
>>> Thanks already!
>>> --
>>> View this message in context:
>>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
>>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25659063.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

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


Re: How-to implement Code Quality Analysis on multiple Maven Projects?

Posted by ifsNabble <ra...@bertelsmann.de>.
Hi Quintin,

I´m starting automatic build in Hudson with Maven target "mvn compile".
Then all tests are run and with Sonar-Plugin the code quality is anlyzed and
published in Sonar.
The quality metrics rely on JUnit (-> Surefire), PMD, Cobertura etc. and
some specialties where object coupling, depth of inheritance tree etc. is
computed.
And for these special metrics I need all code together during compilation.

Ralf


Quintin Beukes-2 wrote:
> 
> Yes, writing an ant script that merges projects into a temporary place
> is an ugly solution.
> 
> What are you using for the code quality analysis?
> 
> Quintin Beukes
> 
> 
> 
> On Tue, Sep 29, 2009 at 10:24 AM, ifsNabble
> <ra...@bertelsmann.de> wrote:
>>
>> Hi all!
>>
>> I´m stuck with following problem:
>>
>> My Project consists of about 150 Maven projects. All of them are somehow
>> dependent on each other.
>> I´m able to build and analyze code quality for every single project.
>> But to analyze special metrics I need all source code together in one
>> folder. And there´s my problem.
>>
>> I could create a stupid dummy ant script that copies every code from
>> /src/main/java to the common source folder. And then I start analyzing
>> this.
>> But that´s not really what I want. Apart from that I do need a new
>> pom.xml
>> for the new all-embracing project. And then I´m at the point where I have
>> to
>> copy/paste the source code from the single projects to the "big" project.
>>
>> I thought about using module for solving my problem, but I don´t know if
>> that suits my needs?
>>
>> I´m using Eclipse and m2eclipse-Plugin, Hudson as build tool and Sonar as
>> code quality analyzer.
>> Our platform is Windows.
>>
>> Does anyone have some suggestions or best practices for my problem?
>> I´m sure I´m not the first one facing such problems.
>>
>> The main pre-conditions for the solution are:
>> - I don´t want to change the structure of my projects (e.g. merge some
>> projects together)
>> - I´d like to use as many native Maven tools as possible (plugins,
>> techniques like modules, ...) and avoid using handmade solutions like
>> copy&paste or writing ant scripts
>>
>> Thanks already!
>> --
>> View this message in context:
>> http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25658865.html
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-implement-Code-Quality-Analysis-on-multiple-Maven-Projects--tp25658865p25659063.html
Sent from the Maven - Users mailing list archive at Nabble.com.


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