|
Hi Carlos, Are you sure the multiproject plugin will always be loaded in the context before the dashboard project executes? If not, the maven.multiproject.aggregateDir property will not be set... Also, how is %%PROJECTID%% resolved? It seems to me all those properties are getting complex. Maybe it's time to create an interface for aggregators so that an aggregator script has to implement some methods such as: getLink(), getDescription(), etc. Dunno, just an idea. Lastly, could you please also add the modifications to changes.xml + to the aggregator how to page which explains how to create an aggregator. It seems aggregators now accept a new property (the link one). Or is that specific only to the juniterrors aggregator? (in which case, I think it needs to be differentiated from the other properties which are generic). Thanks! The first attachment was only a very small idea, now I have implemented it. I think it's a better idea to move the "Add link attribute" to the aggregator jelly script, so the linked file can be obtained by loading another plugin property instead of hardcoding it. <!-- Add link attribute --> But I get an error Any aggregator can have the link property, not just the junit report. My idea was to add The actual error is Seems that the imported file don't know about the <x:element name="aggregator"> in plugin.jelly My initial idea was different. It was to define an interface that each jelly aggregator has to implement. For example the interface is that each jelly aggregator has to define the following goals: "dashboard-[agrgegator name]-getLink" And then the main plugin.jelly would call these different goals as required to generate the raw ${maven.dashboard.report.single} file. The master dashboard.jsl will then render the report into HTML using all the elements defined in the XML format. ATM, I'm using a <j:import> tag but in that scheme we would need to use the <j:include> tag instead to import all scripts. What do you think? BTW, here's a comment I've found on the Jelly import tag: "By default, the imported script does not have access to the parent script's variable context. This behaviour may be modified using the inherit attribute.". That may (or may not!) explain your problem. Using your approach we'll need the following goals Do you think the parse goal is needed? it will only be used in "getValue". The scripts can be in a well-known location and a new property can be used to set another location for user scripts. About j:import the inherit attribute is already used so it should work, but it doesn't > Do you think the parse goal is needed? it will only be used Agreed. It's not required and the getValue is better. > The scripts can be in a well-known location and a new property can Sure. The scripts are already in a well-known location. I also agree about extensibility for user scripts. Applied thanks. I've had to make several modifications to make it work. Also I've noticed that the report links get generated only for subproject1 and not for the other subprojects in the plugin tests. Is that normal? I'm surprised that you had to make some changes, I expected that it was to many work (I use it on real projects without any trouble). That's normal that links are only generated for the first project (and this is tested : cf the comment The reasons are:
Hi, I just updated to the latest version of the dashboard plugin hoping to see the links to the sub-project reports but the only links I saw are from the sub-project name to its main page. From the comments I had the impression that all aggregators would also generate links to their specific reports. Is there anything else I need to udpate other then the dashboard jar? (I checked and I am using version 1.7) Regards, Nascif, your assumpotions are right. You should see links to the individual reports, provided they have been generated. Maybe we can discuss it on the mailing list i you have some issues? |
||||||||||||||||||||||||||||||||||||||||||||
A junit sample (not working). Just hope anyone with a better knowledge of the plugin could implement it faster