Comments on: Maven: multi-project and dashboard issues https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/ Friends of Oracle and Java Sat, 25 Apr 2015 11:36:47 +0000 hourly 1 http://wordpress.org/?v=4.2 By: AdSense Money Maker https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1994 Tue, 17 Apr 2007 16:57:46 +0000 /?p=490#comment-1994 AdSense Money Maker

Do you know how to make money from AdSense automatically? You don’t!? I’ll teach you how!

]]>
By: emerson https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1993 Wed, 28 Sep 2005 14:20:31 +0000 /?p=490#comment-1993 There is a typo at:
#
# Multiproject
#
maven.mu”tli”project.basedir=.

by the way, when i try to keep the master/root project.xml in a dir no subproject is constructed in the end :(

]]>
By: Zeger Hendrikse https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1992 Wed, 20 Jul 2005 13:00:26 +0000 /?p=490#comment-1992 The restructuring of our project is completed. However, we decided not to continue (temporarily) with Maven 1.1-beta. Some reasons were specific for our project, while others are more generic:

  1. We use velocity templates to generate a list of projects on our Maven generated web site. We get weird errors when going to Maven 1.1, which we don’t have time for to solve. Even more so, these errors are likely to be solved in the final Maven 1.1. release.
  2. Maven 1.1 requires JDK 1.4. As our project is not yet 100% JDK 1.4 compliant, we have to do some very dirty things to make Maven build successfully. This problem should be solved in october.
  3. There seem to be some (serious) quircks with Maven 1.1 and dashboard. More specifically, I couldn’t get dashboard properties right (maven.dashboard.includes, maven.dashboard.excludes), nor could I stop dashboard from starting a reactor in each subproject (and no, I’m not too stupid to do so, because I get it to work in Maven 1.0.2 😉 ).

All this made us decide to wait for the official release.

Some positive remarks to conclude though: Maven 1.1 has a much lower memory footprint indeed, and seems to be much faster, a typical site generation for our project went down from 45 to 30 minutes (approx.).

In fact, we cannot use the Maven reactor right now, because of “out of memory” problems, whereas Maven 1.1 did fine, except for the Dashboard and Velocity template generation.

]]>
By: Zeger Hendrikse https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1991 Tue, 12 Jul 2005 12:37:51 +0000 /?p=490#comment-1991 Currently we are migrating to Maven 1.1, while at the same time restructuring our project. I’ll collect our experiences and describe them in a forthcoming follow-up. I’ll leave a comment with a link to this new post here.

]]>
By: Khiet Tran https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1990 Thu, 07 Jul 2005 17:43:31 +0000 /?p=490#comment-1990 Thank you Rupert for your suggestion as it helps me make my multiproject dashboard work.
I have made a my own improvements though, I think it is better to separate the “multiproject/project.xml” from the “base/project.xml” where all subcomponents inherited. This way you don’t have to edit each subprojects dashboard settings

base/project.properties
–>maven.dashboard.basedir=${pom.getArtifactId()} (this value depends on where you’ve put the base/project.xml file)

I had to add this line to make the multiproject dashboard work:
–>maven.dashboard.includes=${maven.multiproject.includes}

]]>
By: Zeger Hendrikse https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1989 Mon, 30 May 2005 08:42:19 +0000 /?p=490#comment-1989 I still did not have time to check out your solution in details, but it looks promising!

The reason I had my project structure laid out as described above was that I started working on a real-life instance of such a project the first of January, so the structure was already completely fixed when I started. I then had to come up with a Dashboard solution for the existing project structure.

But again, your solution looks much neater and should be the to be preferred configuration for new projects.

Thanks for your feedback.

]]>
By: Rupert Smith https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1988 Mon, 30 May 2005 08:33:51 +0000 /?p=490#comment-1988 And my structure is actually:

basedir
|
|- project_1
|  |
|  |-project.xml
|  |-project.properties
|  |-maven.xml
|
|- ...
|
|- mavenbuild
|  |
|  |- project.xml
|  |- project.properties
|  |- maven.xml
]]>
By: Rupert Smith https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1987 Fri, 27 May 2005 16:22:16 +0000 /?p=490#comment-1987 I forgot something else. To each sub projects project.properties you need to add (for project_n):

# Tell dashboard to run in on this project only when run in this directory. This relative directory trick will work when called from the
# main build directory or from this directory.
maven.dashboard.basedir=../project_n
maven.dashboard.includes=project.xml

Otherwise you get the full multi-line dashboard report in each sub project because in the main project.properties you told dashboard to run in the parent directory and include all sub-projects and these properties are inherited by all the sub-projects. So you need to override this in each sub-project to create the dashboard just for it when dashboard is run in its individual directory or called from the main script.

Sorry for posting all this in bits in pieces. I should have planned my post out a little better. Hope its still usefull.

]]>
By: Rupert Smith https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1986 Fri, 27 May 2005 14:21:59 +0000 /?p=490#comment-1986 Like this:

basedir
|
|- project_1
| |
| |-project.xml
| |-project.properties
| |-maven.xml
|
|- …
|
|- mavenbuild
| |
| |- project.xml
| |- project.properties
| |- maven.xml

]]>
By: Rupert Smith https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1985 Fri, 27 May 2005 14:20:55 +0000 /?p=490#comment-1985 My diagram of teh project structure hasn’t come out right. The mavenbuild directory contains a project.xml, project.properties and maven.xml. They are not in the parent directory as the diagram has come out.

]]>
By: Rupert Smith https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1984 Fri, 27 May 2005 13:35:47 +0000 /?p=490#comment-1984 Zeger, Thanks for your post. It was helpful in pointing me in the right direction. I have a project structure with the master build project.xml in one of the sub-project as described in the root case above. However, I think the way you are running the dashboard is overly complicated and also inneficient. I have managed to get it working in a far simpler way with such a project structure.

My structure is:

basedir
|
|- project_1
| |
| |-project.xml
| |-project.properties
| |-maven.xml
|
|- …
|
|- mavenbuild
|
|- project.xml
|- project.properties
|- maven.xml

The projects in project_1, … all inherit from the master script in mavenbuild.

I have my reports set up in the mavenbuild/project.xml:

maven-checkstyle-plugin
maven-jdepend-plugin
maven-pmd-plugin
maven-jxr-plugin
maven-simian-plugin
maven-javadoc-plugin
maven-clover-plugin
maven-junit-report-plugin
maven-tasklist-plugin
maven-dashboard-plugin

In the mavenbuild/project.properties I set up multiproject and the dashboard. I also set up clover to output the raw .xml report so that the dashboard can re-use it:

# Set up the dashboard to run in the parent directory and to ignore this project.
maven.dashboard.basedir=..
maven.dashboard.excludes=mavenbuild/project.xml
maven.dashboard.rungoals=false
maven.dashboard.aggregators=csall,junitpassrate,junittests,juniterrors,junitfailures,clovertpc,cloverncloc

# Tell multiproject to work in this directory and to ignore this project.
maven.multiproject.basedir=..
maven.multiproject.excludes=mavenbuild/project.xml

# Tell clover to output the raw .xml report so taht the dashboard can re-use it without running clover again.
maven.clover.report.xml=true

Then in the mavenbuild directory I run the multiproject:site goal and it correctly generates the dashboard for all projects. This is much simpler than what you describe above. It is also more efficient because I have been able to use the rungoals=false setting to re-use the output of the other reports that I am generating. If this were set to true as in your example it would run all my tests, clover, checkstyle and so on two more times! Once when generating the single line dashboard for each individual sub-project and once when generating the full multi-line dashboard for the multi-project parent site.

My project layout is a little different to what you have described here as I don’t have a sub-project within my mavenbuild directory for generating the site. Possibly, I have not fully understood your reasons for doing it that way?

It seems to me that the important trick with my layout is telling the dashboard to work in the parent directory and to exclude the mavenbuild directory with the settings in the project.properties file.

I hope you find this helpful.

]]>
By: カジノ https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1983 Sun, 17 Apr 2005 16:07:19 +0000 /?p=490#comment-1983 I search for blog like this long time.You website is very good!I will come next time!

カジノ

]]>
By: Lucas https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1982 Tue, 05 Apr 2005 20:44:50 +0000 /?p=490#comment-1982 Well done, Zeger! Good to see you’re back.

]]>
By: Zeger Hendrikse https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1981 Tue, 05 Apr 2005 12:33:46 +0000 /?p=490#comment-1981 By the way, I forgot to mention that I got an excellent introduction into Maven myself from my colleague Marcel de Koster. Consequently, this example (code and structure) is also partly based on his work.

]]>
By: Zeger Hendrikse https://technology.amis.nl/2005/04/05/maven-multi-project-and-dashboard-issues/#comment-1980 Tue, 05 Apr 2005 11:02:20 +0000 /?p=490#comment-1980 As a matter of fact, I did so for the concrete instantiation of the "template" project presented in this post.

Basically, you set up the project structure exactly as discussed in this post, that is, with the root directory on the same level as your subprojects.

You have to play a bit with the project settings in Eclipse, to get the source and conf directories in your classpath, but then everything integrates seamlessly.

You may want to use the mevenide eclipse plugin to keep the dependencies section of your project.xml synchronized with your Eclipse classpath.

If this isn’t enough to get you started, just leave another comment, and I’ll seriously consider a follow-up!

]]>